Add scaffold for a controller & view

This commit is contained in:
Alex Sherman 2020-12-09 16:50:53 +05:00
parent de37732a56
commit ee2601b8de
8 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,9 @@
class Registrar
class BulkRenewController < DeppController
def index; end
def new
authorize! :manage, :repp
end
end
end

View file

@ -0,0 +1,9 @@
<% if @api_errors %>
<div class="alert alert-danger">
<ul>
<% @api_errors.each do |error| %>
<li><%= error[:title] %></li>
<% end %>
</ul>
</div>
<% end %>

View file

@ -0,0 +1,22 @@
<%= form_tag registrar_new_registrar_bulk_renew_path, multipart: true, class: 'form-horizontal' do %>
<%= render 'api_errors' %>
<div class="form-group">
<div class="col-md-2 control-label">
<%= label_tag 'expire_date', t('.expire_date') %>
</div>
<div class="col-md-4">
<%= text_field :expire_date, params[:expire_date],
class: 'form-control js-datepicker' %>
</div>
</div>
<div class="form-group">
<div class="col-md-4 col-md-offset-2 text-right">
<button class="btn btn-warning">
<%= t '.filter_btn' %>
</button>
</div>
</div>
<% end %>

View file

@ -19,6 +19,10 @@
<li class="<%= 'active' if active_tab == :bulk_transfer %>">
<a href="#bulk_transfer" data-toggle="tab"><%= t '.bulk_transfer' %></a>
</li>
<li class="<%= 'active' if active_tab == :bulk_renew %>">
<a href="#bulk_renew" data-toggle="tab"><%= t '.bulk_renew' %></a>
</li>
</ul>
<div class="tab-content">
@ -34,4 +38,8 @@
<div class="tab-pane<%= ' active' if active_tab == :bulk_transfer %>" id="bulk_transfer">
<%= render 'bulk_transfer_form' %>
</div>
<div class="tab-pane<%= ' active' if active_tab == :bulk_renew %>" id="bulk_renew">
<%= render 'bulk_renew_form' %>
</div>
</div>