Remove inline JS, extract translation

This commit is contained in:
Artur Beljajev 2018-01-26 01:32:38 +02:00
parent 951bfd4854
commit d2ea3fc944
7 changed files with 16 additions and 23 deletions

View file

@ -30,8 +30,7 @@
   
%span.glyphicon.glyphicon-search %span.glyphicon.glyphicon-search
   
%button.btn.btn-default.js-reset-form = link_to(t('.reset_btn'), registrar_account_activities_path, class: 'btn btn-default')
= t(:clear_fields)
%hr %hr
.row .row
@ -60,8 +59,3 @@
.row .row
.col-md-12 .col-md-12
= paginate @account_activities = paginate @account_activities
:coffee
$(".js-reset-form").on "click", (e) ->
e.preventDefault();
window.location = "#{registrar_account_activities_path}"

View file

@ -66,8 +66,7 @@
   
%span.glyphicon.glyphicon-search %span.glyphicon.glyphicon-search
   
%button.btn.btn-default.js-reset-form = link_to(t('.reset_btn'), registrar_contacts_path, class: 'btn btn-default')
= t(:clear_fields)
.row .row
.col-md-3 .col-md-3
.btn-group{:role => "group"} .btn-group{:role => "group"}
@ -119,8 +118,3 @@
.col-md-6.text-right .col-md-6.text-right
.pagination .pagination
= t(:result_count, count: @contacts.total_count) = t(:result_count, count: @contacts.total_count)
:coffee
$(".js-reset-form").on "click", (e) ->
e.preventDefault();
window.location = "#{registrar_contacts_path}"

View file

@ -43,8 +43,7 @@
   
%span.glyphicon.glyphicon-search %span.glyphicon.glyphicon-search
   
%button.btn.btn-default.js-reset-form = link_to(t('.reset_btn'), registrar_invoices_path, class: 'btn btn-default')
= t(:clear_fields)
%hr %hr
.row .row
.col-md-12 .col-md-12
@ -72,9 +71,3 @@
.row .row
.col-md-12 .col-md-12
= paginate @invoices = paginate @invoices
:coffee
$(".js-reset-form").on "click", (e) ->
e.preventDefault();
window.location = "#{registrar_invoices_path}"

View file

@ -417,7 +417,6 @@ en:
attribute_is_invalid: 'Attribute is invalid: %{attribute}' attribute_is_invalid: 'Attribute is invalid: %{attribute}'
request_successful: 'Request successful' request_successful: 'Request successful'
choose: 'Choose...' choose: 'Choose...'
clear_fields: 'Clear fields'
created_before: 'Created before' created_before: 'Created before'
created_after: 'Created after' created_after: 'Created after'
billing_address: 'Billing address' billing_address: 'Billing address'

View file

@ -0,0 +1,5 @@
en:
registrar:
account_activities:
index:
reset_btn: Reset

View file

@ -1,6 +1,9 @@
en: en:
registrar: registrar:
contacts: contacts:
index:
reset_btn: Reset
partials: partials:
domains: domains:
roles: Roles roles: Roles

View file

@ -0,0 +1,5 @@
en:
registrar:
invoices:
index:
reset_btn: Reset