mirror of
https://github.com/internetee/registry.git
synced 2025-07-14 06:55:11 +02:00
Status attaching
This commit is contained in:
parent
d286a67cc0
commit
a72560c3d3
7 changed files with 117 additions and 4 deletions
18
app/views/admin/domain_statuses/_form.haml
Normal file
18
app/views/admin/domain_statuses/_form.haml
Normal file
|
@ -0,0 +1,18 @@
|
|||
= form_for([:admin, @domain, @domain_status]) do |f|
|
||||
= render 'admin/shared/errors', object: @domain
|
||||
= render 'admin/shared/errors', object: f.object
|
||||
|
||||
- if @domain.errors.any?
|
||||
%hr
|
||||
.row
|
||||
.col-md-6
|
||||
.form-group
|
||||
= f.label :value
|
||||
= f.select :value, options_for_select(DomainStatus::STATUSES, @domain_status.value), {}, {class: 'form-control'}
|
||||
.col-md-6
|
||||
.form-group
|
||||
= f.label :description
|
||||
= f.text_field :description, class: 'form-control', autocomplete: 'off'
|
||||
.row
|
||||
.col-md-12.text-right
|
||||
= button_tag(t('shared.save'), class: 'btn btn-primary')
|
9
app/views/admin/domain_statuses/edit.haml
Normal file
9
app/views/admin/domain_statuses/edit.haml
Normal file
|
@ -0,0 +1,9 @@
|
|||
.row
|
||||
.col-sm-6
|
||||
%h2.text-center-xs
|
||||
= "#{t('shared.edit_domain_status')}"
|
||||
.col-sm-6
|
||||
%h2.text-right.text-center-xs
|
||||
= link_to(t('shared.back_to_domain'), [:admin, @domain], class: 'btn btn-default')
|
||||
%hr
|
||||
= render 'form'
|
9
app/views/admin/domain_statuses/new.haml
Normal file
9
app/views/admin/domain_statuses/new.haml
Normal file
|
@ -0,0 +1,9 @@
|
|||
.row
|
||||
.col-sm-6
|
||||
%h2.text-center-xs
|
||||
= "#{t('shared.new_domain_status')}"
|
||||
.col-sm-6
|
||||
%h2.text-right.text-center-xs
|
||||
= link_to(t('shared.back_to_domain'), [:admin, @domain], class: 'btn btn-default')
|
||||
%hr
|
||||
= render 'form'
|
Loading…
Add table
Add a link
Reference in a new issue