mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Add scaffold for a controller & view
This commit is contained in:
parent
de37732a56
commit
ee2601b8de
8 changed files with 63 additions and 0 deletions
9
app/controllers/registrar/bulk_renew_controller.rb
Normal file
9
app/controllers/registrar/bulk_renew_controller.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
class Registrar
|
||||
class BulkRenewController < DeppController
|
||||
def index; end
|
||||
|
||||
def new
|
||||
authorize! :manage, :repp
|
||||
end
|
||||
end
|
||||
end
|
9
app/views/registrar/bulk_change/_api_errors.html.erb
Normal file
9
app/views/registrar/bulk_change/_api_errors.html.erb
Normal 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 %>
|
22
app/views/registrar/bulk_change/_bulk_renew_form.html.erb
Normal file
22
app/views/registrar/bulk_change/_bulk_renew_form.html.erb
Normal 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 %>
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue