mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 11:38:30 +02:00
Cleanups, design improvements
This commit is contained in:
parent
eac302bafb
commit
8c309c2b0f
9 changed files with 68 additions and 34 deletions
|
@ -1,4 +1,9 @@
|
|||
%h2= t('shared.domains')
|
||||
.row
|
||||
.col-sm-6
|
||||
%h2.text-center-xs= t('shared.domains')
|
||||
.col-sm-6
|
||||
%h2.text-right.text-center-xs
|
||||
= link_to(t('shared.add'), new_admin_domain_path, class: 'btn btn-primary')
|
||||
%hr
|
||||
.row
|
||||
.col-md-12
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
%h2= t('shared.new_domain')
|
||||
%hr
|
||||
= form_for([:admin, @domain]) do |f|
|
||||
= @domain.errors.inspect
|
||||
- if @domain.errors.any?
|
||||
- @domain.errors.each do |attr, err|
|
||||
= err
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
%td= x.ipv4
|
||||
%td= x.ipv6
|
||||
%td
|
||||
= link_to(t('shared.edit'), root_path, class: 'btn btn-primary btn-xs')
|
||||
= link_to(t('shared.delete'), [:admin, x], method: :delete, data: { confirm: t('shared.are_you_sure') }, class: 'btn btn-danger btn-xs')
|
||||
= link_to(t('shared.edit'), edit_admin_domain_nameserver_path(@domain, x), class: 'btn btn-primary btn-xs')
|
||||
= link_to(t('shared.delete'), admin_domain_nameserver_path(@domain, x), method: :delete, data: { confirm: t('shared.are_you_sure') }, class: 'btn btn-danger btn-xs')
|
||||
- if @domain.errors.messages[:nameservers]
|
||||
%tfoot
|
||||
- @domain.errors.messages[:nameservers].each do |x|
|
||||
|
|
28
app/views/admin/nameservers/_form.html.haml
Normal file
28
app/views/admin/nameservers/_form.html.haml
Normal file
|
@ -0,0 +1,28 @@
|
|||
= form_for([:admin, @domain, @nameserver]) 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
|
||||
= label_tag t('shared.domain')
|
||||
= text_field_tag :domain, @domain.name, disabled: true, class: 'form-control'
|
||||
.col-md-6
|
||||
.form-group
|
||||
= f.label :hostname
|
||||
= f.text_field(:hostname, class: 'form-control', autocomplete: 'off')
|
||||
.row
|
||||
.col-md-6
|
||||
.form-group
|
||||
= f.label :ipv4
|
||||
= f.text_field(:ipv4, class: 'form-control', autocomplete: 'off')
|
||||
.col-md-6
|
||||
.form-group
|
||||
= f.label :ipv6
|
||||
= f.text_field(:ipv6, class: 'form-control', autocomplete: 'off')
|
||||
.row
|
||||
.col-md-12.text-right
|
||||
= button_tag(t('shared.save'), class: 'btn btn-primary')
|
3
app/views/admin/nameservers/edit.haml
Normal file
3
app/views/admin/nameservers/edit.haml
Normal file
|
@ -0,0 +1,3 @@
|
|||
%h2= t('shared.edit_nameserver')
|
||||
%hr
|
||||
= render 'form'
|
|
@ -1,30 +1,3 @@
|
|||
%h2= t('shared.new_nameserver')
|
||||
%hr
|
||||
= form_for([:admin, @domain, @nameserver]) 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
|
||||
= label_tag t('shared.domain')
|
||||
= text_field_tag :domain, @domain.name, disabled: true, class: 'form-control'
|
||||
.col-md-6
|
||||
.form-group
|
||||
= f.label :hostname
|
||||
= f.text_field(:hostname, class: 'form-control', autocomplete: 'off')
|
||||
.row
|
||||
.col-md-6
|
||||
.form-group
|
||||
= f.label :ipv4
|
||||
= f.text_field(:ipv4, class: 'form-control', autocomplete: 'off')
|
||||
.col-md-6
|
||||
.form-group
|
||||
= f.label :ipv6
|
||||
= f.text_field(:ipv6, class: 'form-control', autocomplete: 'off')
|
||||
.row
|
||||
.col-md-12.text-right
|
||||
= button_tag(t('shared.save'), class: 'btn btn-primary')
|
||||
= render 'form'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue