var showForm;
function panelShowForm()
{
showForm=null;
showForm = new Ext.FormPanel({
renderTo:"showPanel",
region:'north',
border:false,
bodyBorder: false,
frame:true,
waitMsgTarget: true,
labelAlign:'right',
id:"showForm",
items:[{
layout:'column',
labelWidth:129,
items:[
{
columnWidth:.6,
layout:'form',
items:{
name:"enable",
hiddenName:"enable",
fieldLabel:'Whether to enable password policy',
xtype:'combo',
editable: false,//Do not allow input lazyRender:true,
blankText: 'Password side must be enabled', //Blank default value
allowBlank : false, //Blank is not allowed
mode: 'local',
triggerAction: 'all',
store :new Ext.data.SimpleStore({
fields: ["value", "text"], data: [['1','enabled'],['0','disabled']]
}),
// These two items should correspond to the fields above
valueField: "value",
displayField: "text",
listeners:{ change:function(){changeValue() ;}
},
anchor:'100%'
}
},{
columnWidth:.4,
layout:'form',
items:{
hiddenName:"infoFillOne",
name:"infoFillOne",
xtype:'label',
html:' is set to disabled, the following items are not available< ;/font>',
labelSeparator:'',
anchor:'100%'
}
},{
columnWidth:.6,
layout:'form',
items:{hiddenName:"updateDay",
name:"updateDay",
xtype:'textfield',
fieldLabel:'update period',
emptyText : 'Set to -1 This item is disabled',
maxLength:'100',
readOnly:false,
vtype:'day',
anchor:'100%'
}
},{
columnWidth:.4,
layout:'form',
items:{
hiddenName:"info",
name:"info",
xtype:'label',
//labelAlign:'left',
html:
' is set to -1, the item is disabled',
labelSeparator:' ',
anchor:'100%'
}
}]
}]
})
}
/**
* Whether to enable password trigger events
*/
function changeValue()
{
if(queryForm.form.findField('enable').getValue()=="0")
{
$("updateDay").disabled = true;
}else{
$("updateDay").disabled = false;
}
}
/**
*Window display
*/
function input()
{
panelShowForm();
win=new Ext.Window({
title: "Add description after extJs text box",
width:200, //Window initial width value
hight:200, //Window initial hight value
x:100, //Window initial x position
y:100, //Window initial y position
plain : true,
modal : true, //Modal window
maximizable:true, maximized display
resizable:false, //The size of the window does not allow dragging
items:[showForm]
})
}