Add keypress events to text input fields on orders search page

This commit is contained in:
Luis Ramos
2020-06-13 12:08:13 +01:00
parent 1740879261
commit e6e4b6f95c

View File

@@ -16,17 +16,17 @@
.four.columns
.field
= label_tag nil, t(:order_number)
= text_field_tag "q[number_cont]", nil, 'ng-model' => 'q.number_cont'
= text_field_tag "q[number_cont]", nil, "ng-model" => "q.number_cont", "ng-keypress" => "$event.keyCode === 13 && fetchResults()"
.field
= label_tag nil, t(:email)
= email_field_tag "q[email_cont", nil, 'ng-model' => 'q.email_cont'
= email_field_tag "q[email_cont", nil, "ng-model" => "q.email_cont", "ng-keypress" => "$event.keyCode === 13 && fetchResults()"
.four.columns
.field
= label_tag nil, t(:first_name_begins_with)
= text_field_tag "q[bill_address_firstname_start]", nil, size: 25, 'ng-model' => 'q.bill_address_firstname_start'
= text_field_tag "q[bill_address_firstname_start]", nil, size: 25, "ng-model" => "q.bill_address_firstname_start", "ng-keypress" => "$event.keyCode === 13 && fetchResults()"
.field
= label_tag nil, t(:last_name_begins_with)
= text_field_tag "q[bill_address_lastname_start]", nil, size: 25, 'ng-model' => 'q.bill_address_lastname_start'
= text_field_tag "q[bill_address_lastname_start]", nil, size: 25, "ng-model" => "q.bill_address_lastname_start", "ng-keypress" => "$event.keyCode === 13 && fetchResults()"
.omega.four.columns
.field.checkbox
%label