mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 09:45:11 +02:00
Issue invoices via admin #2566
This commit is contained in:
parent
4569cc11cd
commit
935c547016
8 changed files with 86 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
|||
.row
|
||||
.col-sm-12
|
||||
%h2.text-center-xs= t(:invoices)
|
||||
%hr
|
||||
- content_for :actions do
|
||||
= link_to(t(:add), new_admin_invoice_path, class: 'btn btn-primary')
|
||||
= render 'shared/title', name: t(:invoices)
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
.table-responsive
|
||||
|
|
33
app/views/admin/invoices/new.haml
Normal file
33
app/views/admin/invoices/new.haml
Normal file
|
@ -0,0 +1,33 @@
|
|||
- content_for :actions do
|
||||
= link_to(t(:back), admin_invoices_path, class: 'btn btn-default')
|
||||
= render 'shared/title', name: t(:create_new_invoice)
|
||||
|
||||
= form_for([:admin, @deposit], url: admin_invoices_path, method: :post, html: { class: 'form-horizontal' }) do |f|
|
||||
= render 'shared/full_errors', object: @deposit
|
||||
|
||||
.row
|
||||
.col-md-8
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :registrar_id, class: 'required'
|
||||
.col-md-8
|
||||
= f.select :registrar_id, Registrar.all.map { |r| [r.name, r.id] }, { include_blank: true }, class: 'form-control selectize', required: true
|
||||
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :amount, class: 'required'
|
||||
.col-md-8
|
||||
.input-group
|
||||
= f.text_field :amount, class: 'form-control', required: true
|
||||
.input-group-addon
|
||||
EUR
|
||||
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :description
|
||||
.col-md-8
|
||||
= f.text_area :description, class: 'form-control'
|
||||
%hr
|
||||
.row
|
||||
.col-md-8.text-right
|
||||
= button_tag(t(:add), class: 'btn btn-warning')
|
|
@ -5,7 +5,7 @@
|
|||
.col-sm-6
|
||||
%h1.text-right.text-center-xs
|
||||
- if !@invoice.cancelled? && !@invoice.binded?
|
||||
= link_to(t(:cancel), cancel_admin_invoice_path(@invoice), method: :patch, class: 'btn btn-default')
|
||||
= link_to(t(:cancel), cancel_admin_invoice_path(@invoice), method: :patch, class: 'btn btn-warning')
|
||||
= link_to(t(:back), admin_invoices_path, class: 'btn btn-default')
|
||||
%hr
|
||||
= render 'shared/full_errors', object: @invoice
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue