mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Horizontal form for domain form
This commit is contained in:
parent
9f878f219c
commit
dae80e3cb8
7 changed files with 64 additions and 63 deletions
|
@ -8,6 +8,10 @@ class Dnskey < ActiveRecord::Base
|
|||
validate :validate_protocol
|
||||
validate :validate_flags
|
||||
|
||||
ALGORITHMS = %w(3 5 6 7 8 252 253 254 255)
|
||||
PROTOCOLS = %w(3)
|
||||
FLAGS = %w(0 256 257)
|
||||
|
||||
def epp_code_map
|
||||
{
|
||||
'2005' => [
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
= form_for([:client, @domain]) do |f|
|
||||
= form_for([:client, @domain], html: { class: 'form-horizontal' }) do |f|
|
||||
= render 'shared/errors', object: @domain
|
||||
- unless @domain.parent_valid?
|
||||
%hr
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#domain_contacts
|
||||
#domain-contacts
|
||||
= f.fields_for :domain_contacts do |contact_fields|
|
||||
.panel.panel-default
|
||||
.panel-heading.clearfix
|
||||
|
@ -11,14 +11,11 @@
|
|||
= 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.label :contact_type, t('shared.contact'), class: 'col-md-2 control-label'
|
||||
.col-md-5
|
||||
= 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
|
||||
.col-md-5.has-feedback.js-typeahead-container
|
||||
= 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
|
||||
|
|
|
@ -11,22 +11,24 @@
|
|||
= render 'shared/errors', object: key_fields.object
|
||||
- if key_fields.object.errors.any?
|
||||
%hr
|
||||
.row
|
||||
.col-md-4
|
||||
.form-group
|
||||
= key_fields.label :flags
|
||||
= key_fields.label :flags, class: 'col-md-2 control-label'
|
||||
.col-md-10
|
||||
= key_fields.text_field :flags, class: 'form-control'
|
||||
.col-md-4
|
||||
|
||||
.form-group
|
||||
= key_fields.label :protocol
|
||||
= key_fields.label :protocol, class: 'col-md-2 control-label'
|
||||
.col-md-10
|
||||
= key_fields.text_field :protocol, class: 'form-control'
|
||||
.col-md-4
|
||||
|
||||
.form-group
|
||||
= key_fields.label :alg
|
||||
= key_fields.label :alg, class: 'col-md-2 control-label'
|
||||
.col-md-10
|
||||
= key_fields.text_field :alg, class: 'form-control'
|
||||
.row
|
||||
.col-md-12
|
||||
= key_fields.label :public_key
|
||||
|
||||
.form-group
|
||||
= key_fields.label :public_key, class: 'col-md-2 control-label'
|
||||
.col-md-10
|
||||
= key_fields.text_field :public_key, class: 'form-control'
|
||||
:javascript
|
||||
$("#dnskeys").nestedAttributes({
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
.row
|
||||
.col-md-6
|
||||
.form-group
|
||||
= f.label :name
|
||||
= f.label :name, class: 'col-md-2 control-label'
|
||||
.col-md-10
|
||||
= f.text_field(:name, class: 'form-control')
|
||||
|
||||
.form-group
|
||||
= f.label :period
|
||||
.row
|
||||
.col-md-6
|
||||
= f.label :period, class: 'col-md-2 control-label'
|
||||
.col-md-5
|
||||
= f.text_field(:period, class: 'form-control')
|
||||
.col-md-6
|
||||
.col-md-5
|
||||
= 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 :owner_contact_typeahead
|
||||
|
||||
.form-group
|
||||
= f.label :owner_contact_typeahead, t('shared.owner'), class: 'col-md-2 control-label'
|
||||
.col-md-10.has-feedback.js-typeahead-container
|
||||
= 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')
|
||||
|
||||
|
|
|
@ -11,19 +11,17 @@
|
|||
= 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.label :hostname, class: 'col-md-2 control-label'
|
||||
.col-md-10
|
||||
= ns_fields.text_field :hostname, class: 'form-control'
|
||||
.row
|
||||
.col-md-6
|
||||
.form-group
|
||||
= ns_fields.label :ipv4
|
||||
= ns_fields.label :ipv4, class: 'col-md-2 control-label'
|
||||
.col-md-10
|
||||
= ns_fields.text_field :ipv4, class: 'form-control'
|
||||
.col-md-6
|
||||
.form-group
|
||||
= ns_fields.label :ipv6
|
||||
= ns_fields.label :ipv6, class: 'col-md-2 control-label'
|
||||
.col-md-10
|
||||
= ns_fields.text_field :ipv6, class: 'form-control'
|
||||
:javascript
|
||||
$("#nameservers").nestedAttributes({
|
||||
|
|
|
@ -347,6 +347,7 @@ en:
|
|||
failed_to_update_setting: 'Failed to update setting'
|
||||
status: 'Status'
|
||||
eedirekt: 'EEDirekt'
|
||||
contact: 'Contact'
|
||||
|
||||
domain_transfer_requested: 'Domain transfer requested!'
|
||||
domain_transfer_approved: 'Domain transfer approved!'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue