Skip to content

Instantly share code, notes, and snippets.

@mroch
Created July 17, 2009 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mroch/149081 to your computer and use it in GitHub Desktop.
Save mroch/149081 to your computer and use it in GitHub Desktop.
Fluency.form.AccountMiniForm = Ext.extend(Fluency.form.AbstractMiniForm, {
title: 'New Contact',
defaultItems: [{
xtype : 'textfield',
name : 'Name',
hiddenName : 'Name',
fieldLabel : 'Name',
width : '95%'
}, {
xtype : 'textfield',
name : 'Phone',
hiddenName : 'Phone',
fieldLabel : 'Phone',
width : '95%'
}, {
xtype : 'textfield',
name : 'Fax',
hiddenName : 'Fax',
fieldLabel : 'Fax',
width : '95%'
}, {
xtype : 'textfield',
name : 'Website',
hiddenName : 'Website',
fieldLabel : 'Website',
width : '95%'
}, {
xtype : 'button',
style : 'padding-top: 10px',
text : 'Add a new form',
handler : function(e, target, panel) {
var selectfields = new Ext.Window({
title : 'Show Additional Fields',
width : '250px',
modal : false,
draggable: false,
items: [{xtype: 'checkbox', id: 'genCheckboxA', name: 'genCheckboxA', boxLabel: 'A', hideLabel: true, checked: true},
{xtype: 'checkbox', id: 'genCheckboxB', name: 'genCheckboxB', boxLabel: 'B', hideLabel: true},
{xtype: 'checkbox', id: 'genCheckboxC', name: 'genCheckboxC', boxLabel: 'C', hideLabel: true},
{xtype: 'checkbox', id: 'genCheckboxD', name: 'genCheckboxD', boxLabel: 'D', hideLabel: true},
{xtype: 'checkbox', id: 'selectall', name: 'selectall', boxLabel: 'Select All', hideLabel: true}],
buttons: [{
text : 'OK',
handler : function(e, winTarget, winPanel){
Ext.Msg.alert("Form: " + panel.getForm());
}
}]
});
selectfields.show();
}
}],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment