aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/ilias_interface/soap_methods.php
blob: aa84917d0904ceee08e9a58645d9664df8ff3997 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/**
 * @var Admin_IliasInterfaceController $controller
 * @var string $ilias_index
 * @var string $ilias_soap_method
 * @var array $soap_methods
 * @var array $params
 * @var array|string $result
 */
?>
<form class="default" action="<?= $controller->url_for('admin/ilias_interface/soap_methods/'.$ilias_index) ?>" method="post">
    <? if (!empty($result)) : ?>
    <article class="studip">
    	<section><?=_('Ergebnis')?></section>
        <? if (is_array($result)) : ?> 
        <pre>
            <? print_r($result)?>
        </pre>
        <? else : ?>
            <?=htmlReady($result)?>
        <? endif ?>
    </article>
    <? endif ?>
    <?= CSRFProtection::tokenTag() ?>
    <? if (empty($ilias_soap_method)) : ?>
    <label>
        <span class="required"><?= _('SOAP-Methode') ?></span>
        <select name="ilias_soap_method">
            <? foreach ($soap_methods as $method => $params) : ?>
                <option value="<?=htmlReady($method)?>"><?=htmlReady($method)?></option>
            <? endforeach ?>
        </select>
    </label>
    <? else : ?>
        <input type="hidden" name="ilias_call" value="<?= $ilias_soap_method ?>">
        <? foreach ($soap_methods[$ilias_soap_method] as $param) : ?>
        <label>
            <span>  <?= $param ?></span>
            <input type="text" name="ilias_soap_param_<?=$param?>" size="50" value="<?=!empty($params[$param]) ? $params[$param] : ''?>">
        </label>
        <? endforeach ?>
    <? endif ?>
    <footer>
        <? if (empty($ilias_soap_method)) : ?>
            <?= Studip\Button::createAccept(_('Weiter'), 'submit') ?>
        <? else : ?>
            <?= Studip\Button::createAccept(_('Ausführen'), 'submit') ?>
        <? endif ?>
    </footer>
</form>