mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Avoid deleting profiles while pressing enter in user details (management)
This commit is contained in:
parent
410d517a92
commit
d86d0ff090
@ -1143,7 +1143,7 @@ if ($meta) {
|
|||||||
$metaconsole_access_node .= html_print_checkbox('metaconsole_access_node', 1, $user_info['metaconsole_access_node'], true).'</div>';
|
$metaconsole_access_node .= html_print_checkbox('metaconsole_access_node', 1, $user_info['metaconsole_access_node'], true).'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<form id="user_profile_form" method="post" autocomplete="off">';
|
echo '<form id="user_profile_form" method="post" autocomplete="off" action="#">';
|
||||||
|
|
||||||
|
|
||||||
if (!$id) {
|
if (!$id) {
|
||||||
@ -1195,6 +1195,8 @@ if (!empty($ehorus)) {
|
|||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
|
echo '</form>';
|
||||||
|
|
||||||
profile_print_profile_table($id);
|
profile_print_profile_table($id);
|
||||||
|
|
||||||
echo '<div style="width: 100%" class="action-buttons">';
|
echo '<div style="width: 100%" class="action-buttons">';
|
||||||
@ -1218,7 +1220,6 @@ echo '<br />';
|
|||||||
enterprise_hook('close_meta_frame');
|
enterprise_hook('close_meta_frame');
|
||||||
$delete_image = html_print_input_image('del', 'images/cross.png', 1, '', true, ['onclick' => 'delete_profile(event, this)']);
|
$delete_image = html_print_input_image('del', 'images/cross.png', 1, '', true, ['onclick' => 'delete_profile(event, this)']);
|
||||||
|
|
||||||
|
|
||||||
if (!is_metaconsole()) {
|
if (!is_metaconsole()) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -1335,7 +1336,7 @@ $(document).ready (function () {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var rows = $("#table_profiles tr").length;
|
var rows = $("#table_profiles tr").length;
|
||||||
if (rows <= 3) {
|
if (rows <= 3) {
|
||||||
if (!confirm('<?php echo __('Deleting last profile'); ?>' + '. ' + '<?php echo __('Are you sure?'); ?>')) {
|
if (!confirm('<?php echo __('Deleting last profile will delete this user'); ?>' + '. ' + '<?php echo __('Are you sure?'); ?>')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user