mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Init depp refactor
This commit is contained in:
parent
f3c9e0aecc
commit
3fe47973e6
156 changed files with 191 additions and 1662 deletions
31
app/assets/javascripts/depp/application.coffee
Normal file
31
app/assets/javascripts/depp/application.coffee
Normal file
|
@ -0,0 +1,31 @@
|
|||
#= require jquery
|
||||
#= require jquery_ujs
|
||||
#= require turbolinks
|
||||
#= require bootstrap-sprockets
|
||||
#= require jquery.nested_attributes
|
||||
|
||||
$(document).on 'ready page:load', ->
|
||||
$('.js-contact-form').on 'restoreDefault', (e) ->
|
||||
form = $(e.target)
|
||||
form.find('.js-ident-tip').hide()
|
||||
switch $('.js-ident-country-code option:selected').val()
|
||||
when 'EE'
|
||||
$('.js-ident-type').find('option[value=birthday]').prop('disabled', true)
|
||||
else
|
||||
$('.js-ident-type').find('option[value=birthday]').prop('disabled', false)
|
||||
|
||||
$('.js-ident-country-code').change (e) ->
|
||||
form = $('.js-contact-form')
|
||||
form.trigger 'restoreDefault'
|
||||
|
||||
$('.js-ident-type').change (e) ->
|
||||
form = $('.js-contact-form')
|
||||
form.trigger 'restoreDefault'
|
||||
|
||||
switch e.target.value
|
||||
# when 'bic'
|
||||
# when 'priv'
|
||||
when 'birthday'
|
||||
form.find('.js-ident-tip').show()
|
||||
|
||||
$('.js-contact-form').trigger('restoreDefault')
|
Loading…
Add table
Add a link
Reference in a new issue