|
1 | | -<fieldset class="pma-fieldset" id="fieldset_add_user_login"> |
2 | | - <legend>{% trans 'Login Information' %}</legend> |
3 | | - <div class="item"> |
4 | | - <label for="select_pred_username">{% trans 'User name:' %}</label> |
5 | | - <span class="options"> |
6 | | - <select name="pred_username" id="select_pred_username" title="{% trans 'User name' %}"> |
7 | | - <option value="any"{{ pred_username == 'any' ? ' selected' }}>{% trans 'Any user' %}</option> |
8 | | - <option value="userdefined"{{ pred_username is null or pred_username == 'userdefined' ? ' selected' }}>{% trans 'Use text field' %}</option> |
9 | | - </select> |
10 | | - </span> |
11 | | - <input type="text" name="username" id="pma_username" class="autofocus" maxlength="{{ username_length }}" title="{% trans 'User name' %}" |
12 | | - {%- if username is not empty %} value="{{ new_username is not null ? new_username : username }}"{% endif -%} |
13 | | - {{- pred_username is null or pred_username == 'userdefined' ? ' required' }}> |
| 1 | +<div class="card mb-3" id="fieldset_add_user_login"> |
| 2 | + <div class="card-header">{% trans 'Login Information' %}</div> |
| 3 | + <div class="card-body"> |
| 4 | + <div class="item"> |
| 5 | + <label for="select_pred_username">{% trans 'User name:' %}</label> |
| 6 | + <span class="options"> |
| 7 | + <select name="pred_username" id="select_pred_username" title="{% trans 'User name' %}"> |
| 8 | + <option value="any"{{ pred_username == 'any' ? ' selected' }}>{% trans 'Any user' %}</option> |
| 9 | + <option value="userdefined"{{ pred_username is null or pred_username == 'userdefined' ? ' selected' }}>{% trans 'Use text field' %}</option> |
| 10 | + </select> |
| 11 | + </span> |
| 12 | + <input type="text" name="username" id="pma_username" class="autofocus" maxlength="{{ username_length }}" title="{% trans 'User name' %}" |
| 13 | + {%- if username is not empty %} value="{{ new_username is not null ? new_username : username }}"{% endif -%} |
| 14 | + {{- pred_username is null or pred_username == 'userdefined' ? ' required' }}> |
14 | 15 |
|
15 | | - <div id="user_exists_warning" class="hide"> |
16 | | - {{ 'An account already exists with the same username but possibly a different hostname.'|trans|notice }} |
| 16 | + <div id="user_exists_warning" class="hide"> |
| 17 | + {{ 'An account already exists with the same username but possibly a different hostname.'|trans|notice }} |
| 18 | + </div> |
17 | 19 | </div> |
18 | | - </div> |
19 | 20 |
|
20 | | - <div class="item"> |
21 | | - <label for="select_pred_hostname"> |
22 | | - {% trans 'Host name:' %} |
23 | | - </label> |
24 | | - <span class="options"> |
25 | | - <select name="pred_hostname" id="select_pred_hostname" title="{% trans 'Host name' %}" |
26 | | - {{- this_host is not null and this_host != 'localhost' and this_host != '127.0.0.1' ? ' data-thishost="' ~ this_host ~ '"' }}> |
27 | | - <option value="any"{{ pred_hostname == 'any' ? ' selected' }}>{% trans 'Any host' %}</option> |
28 | | - <option value="localhost"{{ pred_hostname == 'localhost' ? ' selected' }}>{% trans 'Local' %}</option> |
29 | | - {% if this_host is not empty %} |
30 | | - <option value="thishost"{{ pred_hostname == 'thishost' ? ' selected' }}>{% trans 'This host' %}</option> |
31 | | - {% endif %} |
32 | | - <option value="hosttable"{{ pred_hostname == 'hosttable' ? ' selected' }}>{% trans 'Use host table' %}</option> |
33 | | - <option value="userdefined"{{ pred_hostname == 'userdefined' ? ' selected' }}>{% trans 'Use text field' %}</option> |
34 | | - </select> |
35 | | - </span> |
36 | | - <input type="text" name="hostname" id="pma_hostname" maxlength="{{ hostname_length }}" value="{{ hostname|default('%') }}" title=" |
37 | | - {%- trans 'Host name' %}"{{ pred_hostname == 'userdefined' ? ' required' }}> |
| 21 | + <div class="item"> |
| 22 | + <label for="select_pred_hostname"> |
| 23 | + {% trans 'Host name:' %} |
| 24 | + </label> |
| 25 | + <span class="options"> |
| 26 | + <select name="pred_hostname" id="select_pred_hostname" title="{% trans 'Host name' %}" |
| 27 | + {{- this_host is not null and this_host != 'localhost' and this_host != '127.0.0.1' ? ' data-thishost="' ~ this_host ~ '"' }}> |
| 28 | + <option value="any"{{ pred_hostname == 'any' ? ' selected' }}>{% trans 'Any host' %}</option> |
| 29 | + <option value="localhost"{{ pred_hostname == 'localhost' ? ' selected' }}>{% trans 'Local' %}</option> |
| 30 | + {% if this_host is not empty %} |
| 31 | + <option value="thishost"{{ pred_hostname == 'thishost' ? ' selected' }}>{% trans 'This host' %}</option> |
| 32 | + {% endif %} |
| 33 | + <option value="hosttable"{{ pred_hostname == 'hosttable' ? ' selected' }}>{% trans 'Use host table' %}</option> |
| 34 | + <option value="userdefined"{{ pred_hostname == 'userdefined' ? ' selected' }}>{% trans 'Use text field' %}</option> |
| 35 | + </select> |
| 36 | + </span> |
| 37 | + <input type="text" name="hostname" id="pma_hostname" maxlength="{{ hostname_length }}" value="{{ hostname|default('%') }}" title=" |
| 38 | + {%- trans 'Host name' %}"{{ pred_hostname == 'userdefined' ? ' required' }}> |
38 | 39 |
|
39 | | - {{ show_hint('When Host table is used, this field is ignored and values stored in Host table are used instead.'|trans) }} |
40 | | - </div> |
| 40 | + {{ show_hint('When Host table is used, this field is ignored and values stored in Host table are used instead.'|trans) }} |
| 41 | + </div> |
41 | 42 |
|
42 | | - <div class="item"> |
43 | | - <label for="select_pred_password">{% trans 'Password:' %}</label> |
44 | | - <span class="options"> |
45 | | - <select name="pred_password" id="select_pred_password" title="{% trans 'Password' %}"> |
46 | | - {% if is_change %} |
47 | | - <option value="keep" selected>{% trans 'Do not change the password' %}</option> |
48 | | - {% endif %} |
49 | | - <option value="none"{{ username is not null and not is_change ? ' selected' }}>{% trans 'No password' %}</option> |
50 | | - <option value="userdefined"{{ username is null ? ' selected' }}>{% trans 'Use text field' %}</option> |
51 | | - </select> |
52 | | - </span> |
53 | | - <input type="password" id="text_pma_pw" name="pma_pw" title="{% trans 'Password' %}"{{ username is null ? ' required' }}> |
54 | | - <span>{% trans %}Strength:{% context %}Password strength{% endtrans %}</span> |
55 | | - <meter max="4" id="password_strength_meter" name="pw_meter"></meter> |
56 | | - <span id="password_strength" name="pw_strength"></span> |
57 | | - </div> |
| 43 | + <div class="item"> |
| 44 | + <label for="select_pred_password">{% trans 'Password:' %}</label> |
| 45 | + <span class="options"> |
| 46 | + <select name="pred_password" id="select_pred_password" title="{% trans 'Password' %}"> |
| 47 | + {% if is_change %} |
| 48 | + <option value="keep" selected>{% trans 'Do not change the password' %}</option> |
| 49 | + {% endif %} |
| 50 | + <option value="none"{{ username is not null and not is_change ? ' selected' }}>{% trans 'No password' %}</option> |
| 51 | + <option value="userdefined"{{ username is null ? ' selected' }}>{% trans 'Use text field' %}</option> |
| 52 | + </select> |
| 53 | + </span> |
| 54 | + <input type="password" id="text_pma_pw" name="pma_pw" title="{% trans 'Password' %}"{{ username is null ? ' required' }}> |
| 55 | + <span>{% trans %}Strength:{% context %}Password strength{% endtrans %}</span> |
| 56 | + <meter max="4" id="password_strength_meter" name="pw_meter"></meter> |
| 57 | + <span id="password_strength" name="pw_strength"></span> |
| 58 | + </div> |
58 | 59 |
|
59 | | - <div class="item" id="div_element_before_generate_password"> |
60 | | - <label for="text_pma_pw2">{% trans 'Re-type:' %}</label> |
61 | | - <span class="options"> </span> |
62 | | - <input type="password" name="pma_pw2" id="text_pma_pw2" title="{% trans 'Re-type' %}"{{ username is null ? ' required' }}> |
63 | | - </div> |
| 60 | + <div class="item" id="div_element_before_generate_password"> |
| 61 | + <label for="text_pma_pw2">{% trans 'Re-type:' %}</label> |
| 62 | + <span class="options"> </span> |
| 63 | + <input type="password" name="pma_pw2" id="text_pma_pw2" title="{% trans 'Re-type' %}"{{ username is null ? ' required' }}> |
| 64 | + </div> |
64 | 65 |
|
65 | | - <div class="item" id="authentication_plugin_div"> |
66 | | - <label for="select_authentication_plugin"> |
67 | | - {% if is_new %} |
68 | | - {% trans 'Authentication plugin' %} |
69 | | - {% else %} |
70 | | - {% trans 'Password hashing method' %} |
71 | | - {% endif %} |
72 | | - </label> |
73 | | - <span class="options"> </span> |
| 66 | + <div class="item" id="authentication_plugin_div"> |
| 67 | + <label for="select_authentication_plugin"> |
| 68 | + {% if is_new %} |
| 69 | + {% trans 'Authentication plugin' %} |
| 70 | + {% else %} |
| 71 | + {% trans 'Password hashing method' %} |
| 72 | + {% endif %} |
| 73 | + </label> |
| 74 | + <span class="options"> </span> |
74 | 75 |
|
75 | | - <select name="authentication_plugin" id="select_authentication_plugin"> |
76 | | - {% for plugin_name, plugin_description in active_auth_plugins %} |
77 | | - <option value="{{ plugin_name }}"{{ plugin_name == auth_plugin ? ' selected' }}>{{ plugin_description }}</option> |
78 | | - {% endfor %} |
79 | | - </select> |
| 76 | + <select name="authentication_plugin" id="select_authentication_plugin"> |
| 77 | + {% for plugin_name, plugin_description in active_auth_plugins %} |
| 78 | + <option value="{{ plugin_name }}"{{ plugin_name == auth_plugin ? ' selected' }}>{{ plugin_description }}</option> |
| 79 | + {% endfor %} |
| 80 | + </select> |
80 | 81 |
|
81 | | - <div id="ssl_reqd_warning"{{ auth_plugin != 'sha256_password' ? ' class="hide"' }}> |
82 | | - {% apply notice %} |
83 | | - {% trans %} |
84 | | - This method requires using an '<em>SSL connection</em>' or an '<em>unencrypted connection that encrypts the password using RSA</em>'; while connecting to the server. |
85 | | - {% endtrans %} |
86 | | - {{ show_mysql_docu('sha256-authentication-plugin') }} |
87 | | - {% endapply %} |
| 82 | + <div id="ssl_reqd_warning"{{ auth_plugin != 'sha256_password' ? ' class="hide"' }}> |
| 83 | + {% apply notice %} |
| 84 | + {% trans %} |
| 85 | + This method requires using an '<em>SSL connection</em>' or an '<em>unencrypted connection that encrypts the password using RSA</em>'; while connecting to the server. |
| 86 | + {% endtrans %} |
| 87 | + {{ show_mysql_docu('sha256-authentication-plugin') }} |
| 88 | + {% endapply %} |
| 89 | + </div> |
88 | 90 | </div> |
| 91 | + {# Generate password added here via jQuery #} |
89 | 92 | </div> |
90 | | - {# Generate password added here via jQuery #} |
91 | | -</fieldset> |
| 93 | +</div> |
0 commit comments