diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:46:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:46:43 +0000 |
commit | 3e02d5aff85babc3ffbfcf52313f2108e313aa23 (patch) | |
tree | b01f3923360c20a6a504aff42d45670c58af3ec5 /application/views/scripts/form | |
parent | Initial commit. (diff) | |
download | icingaweb2-3e02d5aff85babc3ffbfcf52313f2108e313aa23.tar.xz icingaweb2-3e02d5aff85babc3ffbfcf52313f2108e313aa23.zip |
Adding upstream version 2.12.1.upstream/2.12.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'application/views/scripts/form')
-rw-r--r-- | application/views/scripts/form/reorder-authbackend.phtml | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/application/views/scripts/form/reorder-authbackend.phtml b/application/views/scripts/form/reorder-authbackend.phtml new file mode 100644 index 0000000..34b10b3 --- /dev/null +++ b/application/views/scripts/form/reorder-authbackend.phtml @@ -0,0 +1,83 @@ +<form id="<?= +$this->escape($form->getId()) +?>" name="<?= +$this->escape($form->getName()) +?>" enctype="<?= +$this->escape($form->getEncType()) +?>" method="<?= +$this->escape($form->getMethod()) +?>" action="<?= +$this->escape($form->getAction()) +?>"> + <table class="table-row-selectable common-table" data-base-target="_next"> + <thead> + <th><?= $this->translate('Backend') ?></th> + <th></th> + <th></th> + </thead> + <tbody> +<?php + $backendNames = $form->getBackendOrder(); + $backendConfigs = $form->getConfig(); + for ($i = 0; $i < count($backendNames); $i++): + $type = $backendConfigs->getSection($backendNames[$i])->get('backend'); +?> + <tr> + <td class="action"> + <?= $this->qlink( + $backendNames[$i], + 'config/edituserbackend', + array('backend' => $backendNames[$i]), + array( + 'icon' => $type === 'external' ? + 'magic' : ($type === 'ldap' || $type === 'msldap' ? 'sitemap' : 'database'), + 'class' => 'rowaction', + 'title' => sprintf($this->translate('Edit user backend %s'), $backendNames[$i]) + ) + ) ?> + </td> + <td class="icon-col text-right"> + <?= $this->qlink( + '', + 'config/removeuserbackend', + array('backend' => $backendNames[$i]), + array( + 'class' => 'action-link', + 'icon' => 'cancel', + 'title' => sprintf($this->translate('Remove user backend %s'), $backendNames[$i]) + ) + ) ?> + </td> + <td class="icon-col text-right" data-base-target="_self"> +<?php if ($i > 0): ?> + <button type="submit" name="backend_newpos" class="link-button icon-only animated move-up" value="<?= $this->escape( + $backendNames[$i] . '|' . ($i - 1) + ) ?>" title="<?= $this->translate( + 'Move up in authentication order' + ) ?>" aria-label="<?= $this->escape(sprintf( + $this->translate('Move user backend %s upwards'), + $backendNames[$i] + )) ?>"> + <?= $this->icon('up-small') ?> + </button> +<?php endif ?> +<?php if ($i + 1 < count($backendNames)): ?> + <button type="submit" name="backend_newpos" class="link-button icon-only animated move-down" value="<?= $this->escape( + $backendNames[$i] . '|' . ($i + 1) + ) ?>" title="<?= $this->translate( + 'Move down in authentication order' + ) ?>" aria-label="<?= $this->escape(sprintf( + $this->translate('Move user backend %s downwards'), + $backendNames[$i] + )) ?>"> + <?= $this->icon('down-small') ?> + </button> +<?php endif ?> + </td> + </tr> +<?php endfor ?> + </tbody> + </table> + <?= $form->getElement($form->getTokenElementName()) ?> + <?= $form->getElement($form->getUidElementName()) ?> +</form> |