Sha256: 432affe4d0f91e072ca737fa0f943c63658691593d9ba858d2d8df14171183cf

Contents?: true

Size: 832 Bytes

Versions: 5

Compression:

Stored size: 832 Bytes

Contents

App.views.MoipForm.addChild('PaymentSlip', _.extend({
  el: '#payment_type_boleto_section',

  events: {
    'click input#build_boleto' : 'onBuildBoletoClick',
    'click .link_content a' : 'onContentClick',
    'blur #user_document_payment_slip' : 'onUserDocumentKeyup'
  },

  activate: function(options){
    this.moipForm = this.parent;
  },

  onBuildBoletoClick: function(e){
    var that = this;
    e.preventDefault();

    if(!that.moipForm.validate()){
      return false;
    }

    $(e.currentTarget).hide();
    this.$('#payment-slip-instructions').slideUp('slow');
    that.moipForm.loader.show();

    // Get token and send payment
    that.moipForm.getMoipToken(function(){
      var settings = {
        "Forma":"BoletoBancario"
      }
      MoipWidget(settings);
    });
  }
}, App.views.MoipForm.UserDocument));

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
catarse_moip-3.2.0 app/assets/javascripts/catarse_moip/payment_slip.js
catarse_moip-3.1.1 app/assets/javascripts/catarse_moip/payment_slip.js
catarse_moip-3.1.0 app/assets/javascripts/catarse_moip/payment_slip.js
catarse_moip-3.0.5 app/assets/javascripts/catarse_moip/payment_slip.js
catarse_moip-3.0.4 app/assets/javascripts/catarse_moip/payment_slip.js