mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 00:42:04 +02:00
Remove domain editing and adding from admin
This commit is contained in:
parent
482d77c319
commit
302f51a4cb
12 changed files with 64 additions and 124 deletions
|
@ -1,25 +0,0 @@
|
|||
#domain_contacts
|
||||
= f.fields_for :domain_contacts do |contact_fields|
|
||||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left= t('shared.contact')
|
||||
.pull-right
|
||||
= link_to(t('shared.add_another'), '#', class: 'btn btn-primary btn-xs add-domain-contact')
|
||||
= link_to(t('shared.delete'), '#', class: 'btn btn-danger btn-xs destroy')
|
||||
.panel-body
|
||||
.errors
|
||||
= render 'shared/errors', object: contact_fields.object
|
||||
- if contact_fields.object.errors.any?
|
||||
%hr
|
||||
.row
|
||||
.col-md-6
|
||||
.form-group
|
||||
= contact_fields.label :contact_type
|
||||
= contact_fields.select :contact_type, options_for_select(DomainContact::TYPES, contact_fields.object.contact_type), {}, {class: 'form-control'}
|
||||
.col-md-6
|
||||
.form-group.has-feedback.js-typeahead-container
|
||||
= contact_fields.label :value_typeahead
|
||||
= contact_fields.text_field(:value_typeahead, class: 'form-control js-contact-typeahead', placeholder: t('shared.contact_code'), autocomplete: 'off')
|
||||
%span.glyphicon.glyphicon-ok.form-control-feedback.js-typeahead-ok.hidden
|
||||
%span.glyphicon.glyphicon-remove.form-control-feedback.js-typeahead-remove
|
||||
= contact_fields.hidden_field(:contact_id, class: 'js-contact-id')
|
|
@ -1,25 +0,0 @@
|
|||
.row
|
||||
.col-md-6
|
||||
.form-group
|
||||
= f.label :name
|
||||
= f.text_field(:name, class: 'form-control')
|
||||
.form-group
|
||||
= f.label :period
|
||||
.row
|
||||
.col-md-6
|
||||
= f.text_field(:period, class: 'form-control')
|
||||
.col-md-6
|
||||
= f.select :period_unit, options_for_select(['y', 'm', 'd'], @domain.period_unit), {}, {class: 'form-control'}
|
||||
.col-md-6
|
||||
.form-group.has-feedback.js-typeahead-container
|
||||
= f.label :registrar_typeahead
|
||||
= f.text_field(:registrar_typeahead, class: 'form-control js-registrar-typeahead', placeholder: t('shared.registrar_name'), autocomplete: 'off')
|
||||
%span.glyphicon.glyphicon-ok.form-control-feedback.js-typeahead-ok.hidden
|
||||
%span.glyphicon.glyphicon-remove.form-control-feedback.js-typeahead-remove
|
||||
= f.hidden_field(:registrar_id, class: 'js-registrar-id')
|
||||
.form-group.has-feedback.js-typeahead-container
|
||||
= f.label :owner_contact_typeahead
|
||||
= f.text_field(:owner_contact_typeahead, class: 'form-control js-contact-typeahead', placeholder: t('shared.contact_code'), autocomplete: 'off')
|
||||
%span.glyphicon.glyphicon-ok.form-control-feedback.js-typeahead-ok.hidden
|
||||
%span.glyphicon.glyphicon-remove.form-control-feedback.js-typeahead-remove
|
||||
= f.hidden_field(:owner_contact_id, class: 'js-contact-id')
|
|
@ -1,34 +0,0 @@
|
|||
#nameservers
|
||||
= f.fields_for :nameservers do |ns_fields|
|
||||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
.pull-left= t('shared.nameserver')
|
||||
.pull-right
|
||||
= link_to(t('shared.add_another'), '#', class: 'btn btn-primary btn-xs add-nameserver')
|
||||
= link_to(t('shared.delete'), '#', class: 'btn btn-danger btn-xs destroy')
|
||||
.panel-body
|
||||
.errors
|
||||
= render 'shared/errors', object: ns_fields.object
|
||||
- if ns_fields.object.errors.any?
|
||||
%hr
|
||||
.row
|
||||
.col-md-12
|
||||
.form-group
|
||||
= ns_fields.label :hostname
|
||||
= ns_fields.text_field :hostname, class: 'form-control'
|
||||
.row
|
||||
.col-md-6
|
||||
.form-group
|
||||
= ns_fields.label :ipv4
|
||||
= ns_fields.text_field :ipv4, class: 'form-control'
|
||||
.col-md-6
|
||||
.form-group
|
||||
= ns_fields.label :ipv6
|
||||
= ns_fields.text_field :ipv6, class: 'form-control'
|
||||
:javascript
|
||||
$("#nameservers").nestedAttributes({
|
||||
bindAddTo: $(".add-nameserver"),
|
||||
afterAdd: function(item) {
|
||||
item.find('.errors').html('');
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue