mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Fix the preferences form: Labels' for attributes, boolean fields and autofill of the new password field
This commit is contained in:
parent
5962fe808b
commit
22530a6b80
5 changed files with 13 additions and 5 deletions
|
|
@ -428,6 +428,10 @@ a.footer_link {
|
|||
width: 250px;
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* override jquery css to match tracks defaults better */
|
||||
div.pref_new_token a { color: #CC3334; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
module PreferencesHelper
|
||||
|
||||
def pref(model, pref_name, &block)
|
||||
s = content_tag(:label, Preference.human_attribute_name(pref_name), :for => model+pref_name)
|
||||
s = content_tag(:label, Preference.human_attribute_name(pref_name), :for => model + "_" + pref_name)
|
||||
s << yield
|
||||
s
|
||||
end
|
||||
|
||||
def pref_with_check_box_field(model, pref_name)
|
||||
pref(model, pref_name) { check_box(model, pref_name, class: "form-control") }
|
||||
end
|
||||
|
||||
def pref_with_select_field(model, pref_name, collection = [ [t('preferences.is_true'),true], [t('preferences.is_false'), false] ])
|
||||
pref(model, pref_name) { select(model, pref_name, collection, {}, class: "form-control") }
|
||||
end
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<%= pref_with_text_field('prefs', 'refresh') %>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%= pref_with_select_field('prefs', "verbose_action_descriptors") %>
|
||||
<%= pref_with_check_box_field('prefs', "verbose_action_descriptors") %>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%= pref_with_text_field('prefs', "mobile_todos_per_page") %>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<div class="form-group">
|
||||
<label for="user[password]"><%= t('users.new_password_label') %>:</label>
|
||||
<%= password_field "user", "password", :size => 40, :autocomplete => "off", class: "form-control" %>
|
||||
<%= password_field "user", "password", :size => 40, :autocomplete => "new-password", class: "form-control" %>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="user[password_confirmation]"><%= t('users.password_confirmation_label') %>:</label>
|
||||
<%= password_field "user", "password_confirmation", :size => 40, :autocomplete => "off", class: "form-control" %>
|
||||
<%= password_field "user", "password_confirmation", :size => 40, :autocomplete => "new-password", class: "form-control" %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ en:
|
|||
date_format: Date format
|
||||
show_hidden_contexts_in_sidebar: Show hidden contexts in sidebar
|
||||
mobile_todos_per_page: Actions per page (Mobile View)
|
||||
verbose_action_descriptors: Verbose action descriptors
|
||||
verbose_action_descriptors: Show descriptors (context, project) of actions in a verbose form
|
||||
staleness_starts: Start of staleness
|
||||
review_period: Project review interval
|
||||
sms_context: Default email context
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue