Merge branch 'ent-8357-12828-Bug-en-reset-Reset-password' into 'develop'

Ent 8357 12828 bug en reset reset password

See merge request artica/pandorafms!4627
This commit is contained in:
Daniel Rodriguez 2022-01-14 10:59:13 +00:00
commit 6170ad290e
1 changed files with 42 additions and 2 deletions

View File

@ -330,8 +330,30 @@ if ($config['enterprise_installed']) {
$reset_pass_link = 'reset_pass.php';
// Reset password link.
echo '<div class="reset_password">';
echo '<a href="index.php?reset=true&first=true">'.__('Forgot your password?');
echo '</a>';
if ((!$config['centralized_management'])) {
echo '<a href="index.php?reset=true&first=true">'.__('Forgot your password?');
echo '</a>';
} else {
echo '<a href="javascript:centralized_mode_reset_dialog();">'.__('Forgot your password?');
echo '</a>';
echo '<div id="centralized_mode_reset_dialog" title="'.__('Password reset').'" style="display:none">';
echo '<div class="content_alert">';
echo '<div class="icon_message_alert">';
echo html_print_image('images/icono_stop.png', true, ['alt' => __('Password reset'), 'border' => 0]);
echo '</div>';
echo '<div class="content_message_alert">';
echo '<div class="text_message_alert">';
echo '<p>'.__('This node is configured with centralized mode. Go to metaconsole to reset the password').'</p>';
echo '</div>';
echo '<div class="button_message_alert">';
html_print_submit_button('Ok', 'centralized_mode_reset_button', false);
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
}
echo '</div>';
}
}
@ -826,5 +848,23 @@ html_print_div(['id' => 'forced_title_layer', 'class' => 'forced_title_layer', '
});
});
function centralized_mode_reset_dialog() {
$("#centralized_mode_reset_dialog").dialog({
resizable: true,
draggable: true,
modal: true,
height: 220,
width: 528,
overlay: {
opacity: 0.5,
background: "black"
}
});
$("#submit-centralized_mode_reset_button").click (function () {
$("#centralized_mode_reset_dialog").dialog('close');
});
}
/* ]]> */
</script>