Skip to content

Commit e812d20

Browse files
author
Kristan Kenney
committed
Add 'Delete' button to edit user page toolbar
1 parent f74c74a commit e812d20

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

web/templates/admin/edit_user.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,20 @@
1111

1212
</div>
1313
<div class="l-unit-toolbar__buttonstrip float-right">
14+
<? if (($_SESSION['user'] == $v_username) || (isset($_SESSION['look']))) {?>
15+
<!-- Do not show delete button for currently logged in user-->
16+
<?} else {?>
17+
<div class="actions-panel display-inline-block" key-action="js">
18+
<a class="data-controls do_delete ui-button danger cancel">
19+
<i class="do_delete fas fa-times-circle status-icon red"></i>
20+
<?=_('Delete')?>
21+
<input type="hidden" name="delete_url" value="/delete/user/?user=<?=$v_username?>&token=<?=$_SESSION['token']?>" />
22+
<div class="confirmation-text-delete hidden" title="<?=_('Confirmation')?>">
23+
<p class="confirmation"><?=sprintf(_('DELETE_USER_CONFIRMATION'),$v_username)?></p>
24+
</div>
25+
</a>
26+
</div>
27+
<? } ?>
1428
<a href="#" class="ui-button" data-action="submit" data-id="vstobjects"><i class="fas fa-save status-icon purple"></i> <?=_('Save')?></a>
1529
</div>
1630
</div>

0 commit comments

Comments
 (0)