Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ext.setup({
- icon: 'icon.png',
- tabletStartupScreen: 'tablet_startup.png',
- phoneStartupScreen: 'phone_startup.png',
- glossOnIcon: false,
- onReady: function() {
- var form;
- var formBase = {
- scroll : 'vertical',
- url : 'postUser.php',
- standardSubmit : false,
- items: [
- {
- xtype: 'fieldset',
- title: 'Login',
- instructions: 'Please enter your credentials',
- defaults: {
- required: true,
- labelAlign: 'left',
- labelWidth: '40%'
- },
- items: [
- {
- xtype: 'emailfield',
- name : 'email',
- label: 'Email',
- useClearIcon: true
- }, {
- xtype: 'passwordfield',
- name : 'password',
- label: 'Password',
- useClearIcon: false
- }]
- }],
- listeners : {
- submit : function(form, result){
- console.log('success', Ext.toArray(arguments));
- },
- exception : function(form, result){
- this.form.close();
- alert('Here');
- }
- },
- dockedItems: [
- {
- xtype: 'toolbar',
- dock: 'bottom',
- items: [
- {
- text: 'Login',
- ui: 'confirm',
- handler: function() {
- if(formBase.user){
- form.updateRecord(formBase.user, true);
- }
- form.submit({
- waitMsg : {message:'Logging in ...', cls : 'demos-loading'}
- });
- }
- }
- ]
- }
- ]
- };
- if (Ext.is.Phone) {
- formBase.fullscreen = true;
- } else {
- Ext.apply(formBase, {
- autoRender: true,
- floating: true,
- modal: true,
- centered: true,
- hideOnMaskTap: false,
- height: 385,
- width: 480
- });
- }
- form = new Ext.form.FormPanel(formBase);
- form.show();
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment