Add missing translations in admin area

#341
This commit is contained in:
Artur Beljajev 2017-01-18 08:31:28 +02:00
parent c18def3c12
commit 40459e8b2e
33 changed files with 138 additions and 95 deletions

View file

@ -46,12 +46,12 @@
= f.label :role, class: 'required'
.col-md-7
= select_tag 'api_user[roles][]',
options_for_select(ApiUser::ROLES.map {|x| [t(x), x] }, @api_user.roles.try(:first)),
options_for_select(ApiUser::ROLES.map {|x| [x, x] }, @api_user.roles.try(:first)),
class: 'form-control selectize'
.checkbox
%label{for: 'api_user_active'}
= f.check_box(:active)
= t(:active)
= t('.active')
%hr
@ -59,6 +59,8 @@
.col-md-8.text-right
= button_tag(t(:save), class: 'btn btn-primary')
:coffee
Autocomplete.bindAdminRegistrarSearch()
$("#api_user_password").removeAttr('required')
:javascript
window.addEventListener('load', function() {
Autocomplete.bindAdminRegistrarSearch();
$("#api_user_password").removeAttr('required');
});

View file

@ -1,6 +1,6 @@
- content_for :actions do
= link_to(t(:create_new_api_user), new_admin_api_user_path, class: 'btn btn-primary')
= render 'shared/title', name: t(:api_users)
= link_to(t('.new_btn'), new_admin_api_user_path, class: 'btn btn-primary')
= render 'shared/title', name: t('.title')
.row
.col-md-12
@ -13,7 +13,7 @@
%th{class: 'col-xs-2'}
= sort_link(@q, 'registrar_name', t(:registrar_name))
%th{class: 'col-xs-2'}
= sort_link(@q, 'active', t(:active))
= sort_link(@q, 'active', t('.active'))
%tbody
- @api_users.each do |x|
%tr

View file

@ -1,3 +1,3 @@
= render 'shared/title', name: t(:create_new_api_user)
= render 'shared/title', name: t('.title')
= render 'form'