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
 
%button.btn.btn-default.js-reset-form
= t(:clear_fields)
= link_to(t('.reset_btn'), registrar_account_activities_path, class: 'btn btn-default')
%hr
.row
@ -60,8 +59,3 @@
.row
.col-md-12
= 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
 
%button.btn.btn-default.js-reset-form
= t(:clear_fields)
= link_to(t('.reset_btn'), registrar_contacts_path, class: 'btn btn-default')
.row
.col-md-3
.btn-group{:role => "group"}
@ -119,8 +118,3 @@
.col-md-6.text-right
.pagination
= 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
 
%button.btn.btn-default.js-reset-form
= t(:clear_fields)
= link_to(t('.reset_btn'), registrar_invoices_path, class: 'btn btn-default')
%hr
.row
.col-md-12
@ -72,9 +71,3 @@
.row
.col-md-12
= 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}'
request_successful: 'Request successful'
choose: 'Choose...'
clear_fields: 'Clear fields'
created_before: 'Created before'
created_after: 'Created after'
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:
registrar:
contacts:
index:
reset_btn: Reset
partials:
domains:
roles: Roles

View file

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