Sencha Touch 2.4.2 Login Page

Ext.define('My.view.Login', {
extend: 'Ext.form.Panel',
xtype: "login",
id: "login",

requires: [

config: {
controller: 'login',
bodyPadding: 10,
title: 'Login Window',
closable: false,
autoShow: true,
fullscreen: true,
layout: "card",
activeItem: 0,
ui: 'light',
cls: "loginView",
items: [{
xtype: 'fieldset',
title: 'Login Info',
instructions: 'Please enter your user name and password',
defaults: {
required: true
items: [{
xtype: 'textfield',
name: 'name',
itemId: 'username',
placeHolder: 'User Name',
autoCapitalize: false
}, {
xtype: 'passwordfield',
name: 'password',
itemId: 'password',
placeHolder: 'Password'
}, {
xtype: 'button',
text: 'Login',
itemId: 'loginbutton',
style: 'margin-left: 2%;margin-right: 2%;margin-top: 5%;',
handler: function() {
var frmLogin = Ext.getCmp('login');
url: 'https://server:port/login.php',
waitMsg: 'Submitting your credentials',
success: function(form, action) {
if (action && action.result)
failure: function(form, action) {
Ext.Msg.alert('Error', "Login is failed");

}, ]



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s