Sha256: fad8a7038cc72db8c66336ff0a47213ef0b555cd1e90b1e236f0b44f5413d327

Contents?: true

Size: 1.46 KB

Versions: 4

Compression:

Stored size: 1.46 KB

Contents

%h2= I18n.t('authy_register_title', {:scope => 'devise'})

= verify_authy_form do
  %legend= I18n.t('submit_token_title', {:scope => 'devise'})
  = hidden_field_tag :"#{resource_name}_id", @resource.id
  = label_tag 'authy-token'
  = text_field_tag :token, "", :autocomplete => "one-time-code", :inputmode => "numeric", :pattern => "[0-9]*", :id => 'authy-token'
  %label
    = check_box_tag :remember_device
    %span= I18n.t('remember_device', {:scope => 'devise'})

  / Help Tooltip
  / You need to configure a help message.
  / See documentation: https://github.com/authy/authy-form-helpers#help-tooltip
  / = link_to '?', '#', :id => 'authy-help', :'data-message' => 'a message'

  = authy_request_sms_link
  = submit_tag I18n.t('submit_token', {:scope => 'devise'}), :class => 'btn'

- if @onetouch_uuid
  :javascript
    (function(){
      var onetouchInterval = setInterval(function(){
        var onetouchRequest = new XMLHttpRequest();
        var rememberDevice = document.getElementById("remember_device").checked ? '1' : '0';
        onetouchRequest.addEventListener("load", function(){
          if(this.status != 202) clearInterval(onetouchInterval);
          if(this.status == 200) window.location = JSON.parse(this.responseText).redirect;
        });
        onetouchRequest.open("GET", "#{polymorphic_path [resource_name, :authy_onetouch_status]}?remember_device="+rememberDevice+"&onetouch_uuid=#{@onetouch_uuid}");
        onetouchRequest.send();
      }, 3000);
    })();

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
devise-authy-2.2.1 app/views/devise/verify_authy.html.haml
devise-authy-2.2.0 app/views/devise/verify_authy.html.haml
devise-authy-2.1.0 app/views/devise/verify_authy.html.haml
devise-authy-2.0.0 app/views/devise/verify_authy.html.haml