diff options
| author | Rasmus Fuhse <fuhse@data-quest.de> | 2024-01-17 16:46:09 +0000 |
|---|---|---|
| committer | Rasmus Fuhse <fuhse@data-quest.de> | 2024-01-17 16:46:09 +0000 |
| commit | ce27c274bd49733630a69b4467b72d3519f9974c (patch) | |
| tree | e634260969a1cb3ea06f0bc87209292a385350f0 /templates | |
| parent | 6722029b73e7383856fd0777ca58863c7d0faab4 (diff) | |
Resolve "Wiki modernisieren"
Closes #3215
Merge request studip/studip!2180
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/forms/form.php | 7 | ||||
| -rw-r--r-- | templates/forms/select_input.php | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/templates/forms/form.php b/templates/forms/form.php index 96cd2c0..4745225 100644 --- a/templates/forms/form.php +++ b/templates/forms/form.php @@ -32,6 +32,7 @@ $form_id = md5(uniqid()); data-debugmode="<?= htmlReady(json_encode($form->getDebugMode())) ?>" data-required="<?= htmlReady(json_encode($required_inputs)) ?>" data-server_validation="<?= $server_validation ? 1 : 0?>" + data-validation_url="<?= htmlReady($_SERVER['REQUEST_URI']) ?>" class="default studipform<?= $form->isCollapsable() ? ' collapsable' : '' ?>"> <?= CSRFProtection::tokenTag(['ref' => 'securityToken']) ?> @@ -77,5 +78,11 @@ $form_id = md5(uniqid()); <? if (Request::isDialog()) : ?> <footer data-dialog-button> <?= \Studip\Button::create($form->getSaveButtonText(), $form->getSaveButtonName(), ['form' => $form_id]) ?> + <? foreach ($form->getButtons() as $button) : ?> + <? + $button->attributes['form'] = $form_id; + echo $button; + ?> + <? endforeach ?> </footer> <? endif ?> diff --git a/templates/forms/select_input.php b/templates/forms/select_input.php index 07a03ca..1552ace 100644 --- a/templates/forms/select_input.php +++ b/templates/forms/select_input.php @@ -7,7 +7,7 @@ <span class="asterisk" title="<?= _('Dies ist ein Pflichtfeld') ?>" aria-hidden="true">*</span> <? endif ?> </label> - <select class="select2" v-model="<?= htmlReady($this->name) ?>" <?= ($this->required ? 'required aria-required="true"' : '') ?> id="<?= $id ?>" <?= $attributes ?>> + <select class="select2" v-model="<?= htmlReady($this->name) ?>" name="<?= htmlReady($this->name) ?>" <?= ($this->required ? 'required aria-required="true"' : '') ?> id="<?= $id ?>" <?= $attributes ?>> <? foreach ($options as $key => $option) : ?> <option value="<?= htmlReady($key) ?>"<?= ($key == $value ? " selected" : "") ?>> <?= htmlReady($option) ?> |
