ソースを参照

fix: move disable button before remove button in user management (#8944)

* fix: move disable button before remove button in user management

The order of action buttons when modifying a user was inconsistent.
The "disable" button appeared after the "remove" button, which is
counterintuitive since disabling a user is a less destructive action
than removing one.

This commit reorders the buttons in `details.phtml` to reflect the
severity of each action, from least to most destructive:
update → purge → promote/demote → disable/enable → delete

Closes #8877

* Remove blank lines

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Thomas Vermeer 2 日 前
コミット
3161fd1333
1 ファイル変更1 行追加1 行削除
  1. 1 1
      app/views/user/details.phtml

+ 1 - 1
app/views/user/details.phtml

@@ -75,7 +75,6 @@
 			<div class="group-controls">
 				<button type="submit" class="btn btn-important" name="action" value="update"><?= _t('gen.action.update') ?></button>
 				<button type="submit" class="btn btn-attention confirm" name="action" value="purge"<?= $disabledIfAjax ?>><?= _t('gen.action.purge') ?></button>
-				<button type="submit" class="btn btn-attention confirm" name="action" value="delete"<?= $disabledIfAjax ?>><?= _t('gen.action.remove') ?></button>
 				<?php if ($isAdmin && !$isDefault): ?>
 					<button type="submit" class="btn btn-attention confirm" name="action" value="demote"<?= $disabledIfAjax ?>><?= _t('gen.action.demote') ?></button>
 				<?php elseif (!$isAdmin): ?>
@@ -86,6 +85,7 @@
 				<?php elseif (!$enabled): ?>
 					<button type="submit" class="btn btn-attention" name="action" value="enable"><?= _t('gen.action.enable') ?></button>
 				<?php endif; ?>
+				<button type="submit" class="btn btn-attention confirm" name="action" value="delete"<?= $disabledIfAjax ?>><?= _t('gen.action.remove') ?></button>
 			<div>
 		</div>
 	</form>