mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +02:00
Merge pull request #2101 from internetee/1797-contact-form-validation-bug
Fix for contact edit form bug (fields accesibility)
This commit is contained in:
commit
4d374f6916
1 changed files with 3 additions and 8 deletions
|
@ -15,9 +15,7 @@
|
||||||
= f.label :ident_country_code, t(:country) + '*'
|
= f.label :ident_country_code, t(:country) + '*'
|
||||||
.col-md-7
|
.col-md-7
|
||||||
- if ident_complete && @contact.persisted? && f.object.ident_country_code.present?
|
- if ident_complete && @contact.persisted? && f.object.ident_country_code.present?
|
||||||
.disabled-value
|
= f.text_field :ident_country_code, value: f.object.ident_country_code, :readonly => true
|
||||||
= Country.new(f.object.ident_country_code).try(:to_s)
|
|
||||||
= " [#{f.object.ident_country_code}]"
|
|
||||||
- else
|
- else
|
||||||
= f.select(:ident_country_code, ApplicationController.helpers.all_country_options(country_selected), {},
|
= f.select(:ident_country_code, ApplicationController.helpers.all_country_options(country_selected), {},
|
||||||
class: 'js-ident-country-code', required: true)
|
class: 'js-ident-country-code', required: true)
|
||||||
|
@ -27,9 +25,7 @@
|
||||||
= f.label :ident_type, t(:type) + '*'
|
= f.label :ident_type, t(:type) + '*'
|
||||||
.col-md-7
|
.col-md-7
|
||||||
- if ident_complete && @contact.persisted? && f.object.ident_type.present?
|
- if ident_complete && @contact.persisted? && f.object.ident_type.present?
|
||||||
.disabled-value
|
= f.text_field :ident_type, value: f.object.ident_type, :readonly => true
|
||||||
= Depp::Contact.type_string(f.object.ident_type)
|
|
||||||
= " [#{f.object.ident_type}]"
|
|
||||||
- else
|
- else
|
||||||
= f.select(:ident_type, Depp::Contact::SELECTION_TYPES, { selected: type_selected },
|
= f.select(:ident_type, Depp::Contact::SELECTION_TYPES, { selected: type_selected },
|
||||||
class: 'js-ident-type', required: true)
|
class: 'js-ident-type', required: true)
|
||||||
|
@ -39,8 +35,7 @@
|
||||||
= f.label :ident, t(:ident) + '*'
|
= f.label :ident, t(:ident) + '*'
|
||||||
.col-md-7
|
.col-md-7
|
||||||
- if ident_complete && @contact.persisted? && f.object.ident.present?
|
- if ident_complete && @contact.persisted? && f.object.ident.present?
|
||||||
.disabled-value
|
= f.text_field :ident, value: f.object.ident, :readonly => true
|
||||||
= f.object.ident
|
|
||||||
- else
|
- else
|
||||||
= f.text_field :ident, class: 'form-control', required: true
|
= f.text_field :ident, class: 'form-control', required: true
|
||||||
- tip_visibility = f.object.ident_type == 'birthday' ? '' : 'display: none'
|
- tip_visibility = f.object.ident_type == 'birthday' ? '' : 'display: none'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue