diff options
| author | Rasmus Fuhse <fuhse@data-quest.de> | 2023-07-11 13:49:47 +0000 |
|---|---|---|
| committer | Rasmus Fuhse <fuhse@data-quest.de> | 2023-07-11 13:49:47 +0000 |
| commit | e234779f2cf3195b2a14a4179f05c31038e478be (patch) | |
| tree | 6eed77119dd36103f8164556123e7198b15aef93 /templates/sidebar | |
| parent | 3beb9a1c6a6d5df15ac0fc3d856b44c9da2faeec (diff) | |
Resolve "Umstellung der Adminseite für Veranstaltungen auf vue.js"
Closes #1965
Merge request studip/studip!1280
Diffstat (limited to 'templates/sidebar')
| -rw-r--r-- | templates/sidebar/search-widget.php | 6 | ||||
| -rw-r--r-- | templates/sidebar/select-widget.php | 14 | ||||
| -rw-r--r-- | templates/sidebar/selector-widget.php | 4 |
3 files changed, 18 insertions, 6 deletions
diff --git a/templates/sidebar/search-widget.php b/templates/sidebar/search-widget.php index 13d6bed..6d870ba 100644 --- a/templates/sidebar/search-widget.php +++ b/templates/sidebar/search-widget.php @@ -1,4 +1,8 @@ -<form action="<?= URLHelper::getLink($url) ?>" method="<?= $method ?>" <? if (isset($id)) printf('id="%s"', htmlReady($id)); ?> class="sidebar-search"> +<form action="<?= URLHelper::getLink($url) ?>" + method="<?= $method ?>" + <? if (isset($id)) printf('id="%s"', htmlReady($id)); ?> + <?= $onsubmit ? 'onsubmit="'.htmlReady($onsubmit).'"' : '' ?> + class="sidebar-search"> <? foreach ($url_params as $key => $value): ?> <?=addHiddenFields($key,$value)?> <? endforeach; ?> diff --git a/templates/sidebar/select-widget.php b/templates/sidebar/select-widget.php index 7c7b039..b7aa596 100644 --- a/templates/sidebar/select-widget.php +++ b/templates/sidebar/select-widget.php @@ -1,9 +1,15 @@ -<form action="<?= URLHelper::getLink($url) ?>" method="<?= $method ?>"> +<form action="<?= URLHelper::getLink($url) ?>" + <?= $onsubmit ? 'onsubmit="'.htmlReady($onsubmit).'"' : '' ?> + method="<?= $method ?>"> <?= \SelectWidget::arrayToHiddenInput($params) ?> <?= (strtolower($method) == 'post') ? CSRFProtection::tokenTag() : ''; ?> - <select class="sidebar-selectlist <?= $class ?> <? if ($__is_nested): ?>nested-select<? endif; ?>" <? !empty($size) ? printf('size="%u"', $size) : '' ?> <?= !empty($attributes) ? arrayToHtmlAttributes($attributes) : '' ?> - name="<?= sprintf('%s%s', htmlReady($name), $multiple ? '[]' : '') ?>" <? if ($multiple) echo 'multiple'; ?> - aria-label="<?= htmlReady($title) ?>" <?= $dropdownAutoWidth ? 'data-dropdown-auto-width="1"' : '' ?>> + <select class="sidebar-selectlist <?= $class ?> <? if ($__is_nested): ?>nested-select<? endif; ?>" + <? !empty($size) ? printf('size="%u"', $size) : '' ?> + <?= !empty($attributes) ? arrayToHtmlAttributes($attributes) : '' ?> + name="<?= sprintf('%s%s', htmlReady($name), $multiple ? '[]' : '') ?>" + <? if ($multiple) echo 'multiple'; ?> + aria-label="<?= htmlReady($title) ?>" + <?= $dropdownAutoWidth ? 'data-dropdown-auto-width="1"' : '' ?>> <? foreach ($elements as $element): ?> <? if ($element instanceof SelectGroupElement && count($element->getElements()) > 0): ?> diff --git a/templates/sidebar/selector-widget.php b/templates/sidebar/selector-widget.php index 62f384c..f96e6b3 100644 --- a/templates/sidebar/selector-widget.php +++ b/templates/sidebar/selector-widget.php @@ -1,4 +1,6 @@ -<form action="<?= URLHelper::getLink($url, [], true) ?>" method="<?= $method?>" class="selector-widget"> +<form action="<?= URLHelper::getLink($url, [], true) ?>" + method="<?= $method?>" + class="selector-widget"> <?= ($method == 'post' ? CSRFProtection::tokenTag() : '') ?> <select name="<?=htmlReady($name)?>" class="sidebar-selectlist submit-upon-select text-top" size="<?= (int) $size ?: 8 ?>" aria-label="<?= _("Wählen Sie ein Objekt aus. Sie gelangen dann zur neuen Seite.") ?>"> <? foreach ($elements as $element): ?> |
