Sha256: 5dcd51027d8b76b7bf7ddae47f84753ba7a789e73f147bdc446c2dd0c7416625

Contents?: true

Size: 1.92 KB

Versions: 3

Compression:

Stored size: 1.92 KB

Contents

Ext.application({
    name: 'compass_ae_mobile_login',
    useLoadMask: true,

    launch: function () {
        Ext.create("Ext.form.Panel", {
            fullscreen: true,
            defaults: {
                xtype: 'textfield'
            },
            items: [
                {
                    xtype:'container',
                    height:200,
                    cls: 'login-logo'
                },
                {
                    label: 'Username or Email Address',
                    labelAlign: 'top',
                    name: 'login',
                    required: true
                },
                {
                    xtype: 'passwordfield',
                    labelAlign: 'top',
                    label: 'Password',
                    name: 'password',
                    required: true
                },
                {
                    xtype: 'button',
                    text: 'Login',
                    flex: 1,
                    scope: this,
                    style: 'margin:0.1em',
                    handler: function (btn) {
                        var form = btn.up('formpanel');
                        form.setMasked({
                            xtype: 'loadmask',
                            message: 'Authenticating User...'
                        });
                        form.submit({
                            url: '/session/sign_in',
                            method: 'POST',
                            success: function (form, result) {
                                form.setMasked(false);
                                window.location = Compass.ErpApp.Mobile.LoginTo;
                            },
                            failure: function (form, result) {
                                Ext.Msg.alert("Error", "Could not authenticate .");
                            }
                        });
                    }
                }
            ]
        });
    }
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
erp_app-4.0.0 public/javascripts/erp_app/login/mobile.js
erp_app-3.1.16 public/javascripts/erp_app/login/mobile.js
erp_app-3.1.15 public/javascripts/erp_app/login/mobile.js