mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
Registrar style fixes after style refactor
This commit is contained in:
parent
eeefe294b1
commit
a395a73fa0
4 changed files with 43 additions and 82 deletions
|
@ -1,7 +1,8 @@
|
|||
.form-signin.text-center
|
||||
%h2.form-signin-heading.text-center= t('log_in')
|
||||
%hr
|
||||
= link_to '/registrar/login/mid' do
|
||||
= image_tag 'mid.gif'
|
||||
= link_to '/registrar/login/id' do
|
||||
= image_tag 'id_card.gif'
|
||||
.row
|
||||
.form-signin.col-md-6.center-block.text-center
|
||||
%h2.form-signin-heading.text-center= t(:log_in)
|
||||
%hr
|
||||
= link_to '/registrar/login/mid' do
|
||||
= image_tag 'mid.gif'
|
||||
= link_to '/registrar/login/id' do
|
||||
= image_tag 'id_card.gif'
|
||||
|
|
|
@ -1,41 +1,38 @@
|
|||
.form-signin.text-center
|
||||
%h2.form-signin-heading.text-center= t('log_in_with_mid')
|
||||
%hr
|
||||
= link_to '/registrar/login/mid' do
|
||||
= image_tag 'mid.gif'
|
||||
= link_to '/registrar/login/id' do
|
||||
= image_tag 'id_card.gif'
|
||||
= form_for @user, url: registrar_mid_path, html: {class: 'form-signin'} do |f|
|
||||
= f.text_field :phone, class: 'form-control', placeholder: t('phone_no'), autocomplete: 'off'
|
||||
%button.btn.btn-lg.btn-primary.btn-block.js-login{:type => 'submit'}= t('log_in')
|
||||
.row
|
||||
.form-signin.col-md-4.center-block.text-center
|
||||
%h2.form-signin-heading.text-center= t(:log_in_with_mid)
|
||||
%hr
|
||||
= form_for @user, url: registrar_mid_path, html: {class: 'form-signin'} do |f|
|
||||
= f.text_field :phone, class: 'form-control', placeholder: t(:phone_no), autocomplete: 'off'
|
||||
%button.btn.btn-lg.btn-primary.btn-block.js-login{:type => 'submit'}= t(:log_in)
|
||||
|
||||
- if ['development', 'alpha'].include?(Rails.env)
|
||||
%div.text-center
|
||||
00007, 60000007, 00000766
|
||||
- if ['development', 'alpha'].include?(Rails.env)
|
||||
%div.text-center
|
||||
00007, 60000007, 00000766
|
||||
|
||||
:coffee
|
||||
$('.js-login').attr('disabled', false)
|
||||
:coffee
|
||||
$('.js-login').attr('disabled', false)
|
||||
|
||||
status_interval = null
|
||||
mid_status = () ->
|
||||
status_interval = setInterval((->
|
||||
$.post('/registrar/login/mid_status').fail((data) ->
|
||||
clearInterval(status_interval)
|
||||
status_interval = null
|
||||
mid_status = () ->
|
||||
status_interval = setInterval((->
|
||||
$.post('/registrar/login/mid_status').fail((data) ->
|
||||
clearInterval(status_interval)
|
||||
flash_alert(data.responseJSON.message)
|
||||
$('.js-login').attr('disabled', false)
|
||||
)
|
||||
), 1000)
|
||||
|
||||
$('.js-login').on 'click', (e) ->
|
||||
e.preventDefault();
|
||||
$(this).attr('disabled', true)
|
||||
|
||||
$.post($('form').attr('action'), $('form').serialize()).done((data) ->
|
||||
if data.message
|
||||
flash_notice(data.message)
|
||||
mid_status()
|
||||
).fail((data) ->
|
||||
flash_alert(data.responseJSON.message)
|
||||
$('.js-login').attr('disabled', false)
|
||||
)
|
||||
), 1000)
|
||||
|
||||
$('.js-login').on 'click', (e) ->
|
||||
e.preventDefault();
|
||||
$(this).attr('disabled', true)
|
||||
|
||||
$.post($('form').attr('action'), $('form').serialize()).done((data) ->
|
||||
if data.message
|
||||
flash_notice(data.message)
|
||||
mid_status()
|
||||
).fail((data) ->
|
||||
flash_alert(data.responseJSON.message)
|
||||
$('.js-login').attr('disabled', false)
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue