diff --git a/app/views/admin/epp_logs/index.haml b/app/views/admin/epp_logs/index.haml index 255cd3b7d..19f357d26 100644 --- a/app/views/admin/epp_logs/index.haml +++ b/app/views/admin/epp_logs/index.haml @@ -28,13 +28,14 @@ = f.label :registrar = f.search_field :api_user_registrar_cont, class: 'form-control', placeholder: t('registrar') .col-md-3 + .col-md-3 .form-group - = f.label :created_at - = f.search_field :created_at_gteq, class: 'form-control', placeholder: t('created_at') + = f.label t(:created_after) + = f.search_field :created_at_gteq, class: 'form-control', placeholder: t('created_after') .col-md-3 .form-group - = f.label :created_at - = f.search_field :created_at_lteq, class: 'form-control', placeholder: t('created_at') + = f.label t(:created_before) + = f.search_field :created_at_lteq, class: 'form-control', placeholder: t('created_before') .col-md-3{style: 'padding-top: 25px;'} %button.btn.btn-primary   diff --git a/app/views/admin/repp_logs/index.haml b/app/views/admin/repp_logs/index.haml index b90c9796b..0cac3bd90 100644 --- a/app/views/admin/repp_logs/index.haml +++ b/app/views/admin/repp_logs/index.haml @@ -1,6 +1,47 @@ .row .col-sm-12 %h2.text-center-xs= t('repp_logs') +.row + .col-md-12 + %hr + = search_form_for @q, url: [:admin, :repp_logs], html: { style: 'margin-bottom: 0;', class: 'js-form' } do |f| + .row + .col-md-3 + .form-group + = f.label :request_path + = f.select :request_path_eq, [[t('choose'),''], '/repp/v1/domains', '/repp/v1/contacts'], {}, class: 'form-control selectize', placeholder: t('choose') + .col-md-3 + .form-group + = f.label :request_method + = f.select :request_method_eq, [[t('choose'),''], 'GET', 'POST', 'PUT', 'DELETE'], {}, class: 'form-control selectize', placeholder: t('choose') + .col-md-3 + .form-group + = f.label :response_code_eq + = f.search_field :response_code_eq, class: 'form-control', placeholder: t('api_user') + .col-md-3 + .form-group + = f.label :api_user + = f.search_field :api_user_name_cont, class: 'form-control', placeholder: t('api_user') + .row + .col-md-3 + .form-group + = f.label :registrar + = f.search_field :api_user_registrar_cont, class: 'form-control', placeholder: t('registrar') + .col-md-3 + .form-group + = f.label t(:created_after) + = f.search_field :created_at_gteq, class: 'form-control', placeholder: t('created_after') + .col-md-3 + .form-group + = f.label t(:created_before) + = f.search_field :created_at_lteq, class: 'form-control', placeholder: t('created_before') + .col-md-3{style: 'padding-top: 25px;'} + %button.btn.btn-primary +   + %span.glyphicon.glyphicon-search +   + %button.btn.btn-default.js-reset-form + = t('clear_fields') %hr .row .col-md-12 @@ -27,3 +68,8 @@ .row .col-md-12 = paginate @repp_logs + +:coffee + $(".js-reset-form").on "click", (e) -> + e.preventDefault(); + window.location = "#{admin_repp_logs_path}" diff --git a/config/locales/en.yml b/config/locales/en.yml index c05c1558b..2d078dcc2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -504,3 +504,5 @@ en: request_successful: 'Request successful' choose: 'Choose...' clear_fields: 'Clear fields' + created_before: 'Created before' + created_after: 'Created after'