|
1 | | -<%= f.input :firstname, input_html: {autocomplete: "given-name"} %> |
2 | | -<%= f.input :lastname, input_html: {autocomplete: "family-name"} %> |
3 | | -<%= f.input :login, autofocus: true, required: f.object.login_required?, input_html: {autocomplete: "username"} %> |
4 | | -<%= f.input :email, required: f.object.email_required?, input_html: {autocomplete: "email"} %> |
| 1 | +<%= f.input :firstname, input_html: {autocomplete: while_signup? ? "given-name" : "off"} %> |
| 2 | +<%= f.input :lastname, input_html: {autocomplete: while_signup? ? "family-name" : "off"} %> |
| 3 | +<%= f.input :login, autofocus: true, required: f.object.login_required?, input_html: {autocomplete: while_signup? ? "username" : "off"} %> |
| 4 | +<%= f.input :email, required: f.object.email_required?, input_html: {autocomplete: while_signup? ? "email" : "off"} %> |
5 | 5 | <% if Alchemy::I18n.available_locales.many? %> |
6 | 6 | <div class="input select"> |
7 | 7 | <%= f.label(:language) %> |
8 | 8 | <%= render Alchemy::Admin::LocaleSelect.new(f.field_name(:language), auto_submit: false) %> |
9 | 9 | </div> |
10 | 10 | <% end %> |
11 | | -<%= f.input :password, required: while_signup?, input_html: {autocomplete: "new-password"} %> |
12 | | -<%= f.input :password_confirmation, required: while_signup?, input_html: {autocomplete: "new-password"} %> |
| 11 | +<%= f.input :password, required: while_signup?, input_html: {autocomplete: while_signup? ? "new-password" : "off"} %> |
| 12 | +<%= f.input :password_confirmation, required: while_signup?, input_html: {autocomplete: while_signup? ? "new-password" : "off"} %> |
13 | 13 | <%= f.input :timezone, |
14 | 14 | collection: ActiveSupport::TimeZone.all, label_method: :to_s, value_method: :name, |
| 15 | + include_blank: Alchemy.t("Default"), |
15 | 16 | input_html: { |
16 | 17 | is: "alchemy-select", |
17 | 18 | data: {allow_clear: true} |
18 | | - } %> |
| 19 | + }, hint: Alchemy.t("admin.users.preferred_timezone", server_timezone: Time.zone) %> |
19 | 20 | <% if local_assigns[:user_roles] && can_update_role? %> |
20 | 21 | <%= f.input :alchemy_roles, |
21 | 22 | collection: user_roles, |
|
35 | 36 | object: f.object %> |
36 | 37 | </div> |
37 | 38 | <% end %> |
38 | | -<%= f.input :send_credentials, as: 'boolean' %> |
39 | | -<div class="submit align-right"> |
| 39 | +<div class="submit"> |
| 40 | + <label class="checkbox"> |
| 41 | + <%= f.check_box :send_credentials %> |
| 42 | + <%= Alchemy.config.user_class.human_attribute_name :send_credentials %> |
| 43 | + </label> |
40 | 44 | <button type="submit"> |
41 | 45 | <%= Alchemy.t(:save) %> |
42 | 46 | </button> |
|
0 commit comments