diff options
author | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2020-07-29 23:57:55 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2020-07-29 23:57:55 +0300 |
commit | 904d8f99c66ed603a54dc28725465761f49548d6 (patch) | |
tree | f19847b67bfda515fec7d77f882fbdd425787a3c /templates/display | |
parent | 14bd9a1f2e3b97e49ef9067ab3dc4a1b809d4419 (diff) |
Merge Display\ChangePassword template files
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'templates/display')
-rw-r--r-- | templates/display/change_password.twig | 72 | ||||
-rw-r--r-- | templates/display/change_password/file_a.twig | 35 | ||||
-rw-r--r-- | templates/display/change_password/file_b.twig | 22 | ||||
-rw-r--r-- | templates/display/change_password/file_c.twig | 2 | ||||
-rw-r--r-- | templates/display/change_password/file_d.twig | 14 | ||||
-rw-r--r-- | templates/display/change_password/file_e.twig | 6 |
6 files changed, 72 insertions, 79 deletions
diff --git a/templates/display/change_password.twig b/templates/display/change_password.twig new file mode 100644 index 0000000000..0baa79dab8 --- /dev/null +++ b/templates/display/change_password.twig @@ -0,0 +1,72 @@ +<form method="post" id="change_password_form" action=" + {{- is_privileges ? url('/server/privileges') : url('/user-password') }}" name="chgPassword" class="{{ is_privileges ? 'submenu-item' }}"> + {{ get_hidden_inputs() }} + {% if is_privileges %} + <input type="hidden" name="username" value="{{ username }}"> + <input type="hidden" name="hostname" value="{{ hostname }}"> + {% endif %} + + <fieldset id="fieldset_change_password"> + <legend{{ is_privileges ? ' data-submenu-label="Change password"' }}>{% trans 'Change password' %}</legend> + <table class="data noclick"> + <tr> + <td colspan="2"> + <input type="radio" name="nopass" value="1" id="nopass_1" onclick="pma_pw.value = ''; pma_pw2.value = ''; this.checked = true"> + <label for="nopass_1">{% trans 'No Password' %}</label> + </td> + </tr> + <tr class="vmiddle"> + <td> + <input type="radio" name="nopass" value="0" id="nopass_0" onclick="document.getElementById('text_pma_change_pw').focus();" checked="checked"> + <label for="nopass_0">{% trans 'Password:' %} </label> + </td> + <td> + {% trans 'Enter:' %} + <input type="password" name="pma_pw" id="text_pma_change_pw" size="10" class="textfield" + onkeyup="Functions.checkPasswordStrength($(this).val(), $('#change_password_strength_meter'), meter_obj_label = $('#change_password_strength'), CommonParams.get('user'));" + onchange="nopass[1].checked = true"> + <span>Strength:</span> + <meter max="4" id="change_password_strength_meter" name="pw_meter"></meter> + <span id="change_password_strength" name="pw_strength">Good</span> + <br> + {% trans 'Re-type:' %} + <input type="password" name="pma_pw2" id="text_pma_change_pw2" size="10" class="textfield" onchange="nopass[1].checked = true"> + </td> + </tr> + + {% if not is_new or (is_new and has_more_auth_plugins) %} + <tr class="vmiddle"> + <td> + <label for="select_authentication_plugin_cp">{% trans 'Password Hashing:' %}</label> + </td> + <td> + <select name="authentication_plugin" id="select_authentication_plugin_cp"> + {% for plugin_name, plugin_description in active_auth_plugins %} + <option value="{{ plugin_name }}"{{ plugin_name == orig_auth_plugin ? ' selected' }}>{{ plugin_description }}</option> + {% endfor %} + </select> + </td> + </tr> + {% endif %} + + <tr id="tr_element_before_generate_password"></tr> + </table> + + {% if is_new and has_more_auth_plugins %} + <div{{ orig_auth_plugin != 'sha256_password' ? ' class="hide"' }} id="ssl_reqd_warning_cp"> + {% apply notice %} + {% trans %} + This method requires using an '<i>SSL connection</i>' or an '<i>unencrypted connection that encrypts the password using RSA</i>'; while connecting to the server. + {% endtrans %} + {{ show_mysql_docu('sha256-authentication-plugin') }} + {% endapply %} + </div> + {% endif %} + + </fieldset> + + <fieldset id="fieldset_change_password_footer" class="tblFooters"> + <input type="hidden" name="change_pw" value="1"> + <input class="btn btn-primary" type="submit" value="{% trans 'Go' %}"> + </fieldset> +</form> diff --git a/templates/display/change_password/file_a.twig b/templates/display/change_password/file_a.twig deleted file mode 100644 index 5f99a7b118..0000000000 --- a/templates/display/change_password/file_a.twig +++ /dev/null @@ -1,35 +0,0 @@ -<form method="post" id="change_password_form" -action="{{ is_privileges ? url('/server/privileges') : url('/user-password') }}" name="chgPassword" class="{{ is_privileges ? 'submenu-item' }}"> -{{ get_hidden_inputs() }} -{% if is_privileges %} - <input type="hidden" name="username" value="{{ username }}"> - <input type="hidden" name="hostname" value="{{ hostname }}"> -{% endif %} -<fieldset id="fieldset_change_password"> - <legend{{ is_privileges ? ' data-submenu-label="Change password"' }}>{% trans 'Change password' %}</legend> - <table class="data noclick"> - <tr> - <td colspan="2"> - <input type="radio" name="nopass" value="1" id="nopass_1" onclick="pma_pw.value = \'\'; pma_pw2.value = \'\'; this.checked = true"> - <label for="nopass_1">{% trans 'No Password' %}</label> - </td> - </tr> - <tr class="vmiddle"> - <td> - <input type="radio" name="nopass" value="0" id="nopass_0" onclick="document.getElementById(\'text_pma_change_pw\').focus();" checked="checked"> - <label for="nopass_0">{% trans 'Password:' %} </label> - </td> - <td> - {% trans 'Enter:' %} - <input type="password" name="pma_pw" id="text_pma_change_pw" size="10" class="textfield" - onkeyup="Functions.checkPasswordStrength($(this).val(), $(\'#change_password_strength_meter\'), meter_obj_label = $(\'#change_password_strength\'), - CommonParams.get(\'user\'));" - {{ chg_evt_handler }}="nopass[1].checked = true"> - <span>Strength:</span> - <meter max="4" id="change_password_strength_meter" name="pw_meter"></meter> - <span id="change_password_strength" name="pw_strength">Good</span> - <br> - {% trans 'Re-type:' %} - <input type="password" name="pma_pw2" id="text_pma_change_pw2" size="10" class="textfield" {{ chg_evt_handler }}="nopass[1].checked = true"> - </td> - </tr> diff --git a/templates/display/change_password/file_b.twig b/templates/display/change_password/file_b.twig deleted file mode 100644 index b4086ee957..0000000000 --- a/templates/display/change_password/file_b.twig +++ /dev/null @@ -1,22 +0,0 @@ -<tr class="vmiddle"> - <td> - <label for="select_authentication_plugin_cp">{% trans 'Password Hashing:' %}</label> - </td> - <td> - <select name="authentication_plugin" id="select_authentication_plugin_cp"> - {% for plugin_name, plugin_description in active_auth_plugins %} - <option value="{{ plugin_name }}"{{ plugin_name == orig_auth_plugin ? ' selected' }}>{{ plugin_description }}</option> - {% endfor %} - </select> - </td> -</tr> -<tr id="tr_element_before_generate_password"></tr> -</table> -<div{{ orig_auth_plugin != 'sha256_password' ? ' class="hide"' }} id="ssl_reqd_warning_cp"> - {% apply notice %} - {% trans %} - This method requires using an '<i>SSL connection</i>' or an '<i>unencrypted connection that encrypts the password using RSA</i>'; while connecting to the server. - {% endtrans %} - {{ show_mysql_docu('sha256-authentication-plugin') }} - {% endapply %} -</div> diff --git a/templates/display/change_password/file_c.twig b/templates/display/change_password/file_c.twig deleted file mode 100644 index f1d3f79d59..0000000000 --- a/templates/display/change_password/file_c.twig +++ /dev/null @@ -1,2 +0,0 @@ -<tr id="tr_element_before_generate_password"></tr> -</table> diff --git a/templates/display/change_password/file_d.twig b/templates/display/change_password/file_d.twig deleted file mode 100644 index 80cf5ccdcd..0000000000 --- a/templates/display/change_password/file_d.twig +++ /dev/null @@ -1,14 +0,0 @@ -<tr class="vmiddle"> - <td> - <label for="select_authentication_plugin_cp">{% trans 'Password Hashing:' %}</label> - </td> - <td> - <select name="authentication_plugin" id="select_authentication_plugin_cp"> - {% for plugin_name, plugin_description in active_auth_plugins %} - <option value="{{ plugin_name }}"{{ plugin_name == orig_auth_plugin ? ' selected' }}>{{ plugin_description }}</option> - {% endfor %} - </select> - </td> -</tr> -<tr id="tr_element_before_generate_password"></tr> -</table> diff --git a/templates/display/change_password/file_e.twig b/templates/display/change_password/file_e.twig deleted file mode 100644 index f01a562a32..0000000000 --- a/templates/display/change_password/file_e.twig +++ /dev/null @@ -1,6 +0,0 @@ -</fieldset> -<fieldset id="fieldset_change_password_footer" class="tblFooters"> -<input type="hidden" name="change_pw" value="1"> -<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}"> -</fieldset> -</form> |