日期:2014-05-16 浏览次数:20567 次
// 初始化表单
function initUpdateForm(form) {
form.getForm().load({
url: FORM_INIT_URL,
method: 'GET',
success: function (form, action) {
setFormFieldValue(updateForm, 'action', 'add');
// updateForm.setTitle("新增机构信息");
},
failure: function (form, action) {
Ext.Msg.alert('提示', action.errors);
}
});
}
// 构造表单
var updateFormTitle = "新增机构信息";
var updateForm = Ext.create('Ext.form.Panel', {
buttonAlign: 'center',
id: 'form_update',
margin: '0 0 10px 0',
layout: "form",
bodyStyle: {
padding: '10px',
borderWidth: '1px 0 0 0'
},
frame: false,
border: 0,
bodyPadding: '10 10 0',
defaults: {
allowBlank: false,
msgTarget: 'side',
labelWidth: 120
},
items: [
{
layout: 'column',
items: [
{columnWidth: .5,