// Create: <subject>
subject: undefined,
- // set create to true if you want a Create button (instead
+ // set isCreate to true if you want a Create button (instead
// OK and RESET)
- create: false,
+ isCreate: false,
// set to true if you want an Add button (instead of Create)
isAdd: false,
showProgress: false,
+ // assign a reference from docs, to add a help button docked to the
+ // bottom of the window. If undefined we magically fall back to the
+ // onlineHelp of our first item, if set.
+ onlineHelp: undefined,
+
isValid: function() {
var me = this;
throw "no url specified";
}
+ if (me.create) {throw "deprecated parameter, use isCreate";}
+
var items = Ext.isArray(me.items) ? me.items : [ me.items ];
me.items = undefined;
trackResetOnLoad: true,
bodyPadding: 10,
border: false,
- defaults: {
+ defaults: Ext.apply({}, me.defaults, {
border: false
- },
+ }),
fieldDefaults: Ext.apply({}, me.fieldDefaults, {
labelWidth: 100,
anchor: '100%'
var form = me.formPanel.getForm();
var submitText;
- if (me.create) {
+ if (me.isCreate) {
if (me.submitText) {
submitText = me.submitText;
} else if (me.isAdd) {
var submitBtn = Ext.create('Ext.Button', {
reference: 'submitbutton',
text: submitText,
- disabled: !me.create,
+ disabled: !me.isCreate,
handler: function() {
me.submit();
}
var set_button_status = function() {
var valid = form.isValid();
var dirty = form.isDirty();
- submitBtn.setDisabled(!valid || !(dirty || me.create));
+ submitBtn.setDisabled(!valid || !(dirty || me.isCreate));
resetBtn.setDisabled(!dirty);
};
(inputPanel.column1 || inputPanel.column2);
if (me.subject && !me.title) {
- me.title = Proxmox.Utils.dialog_title(me.subject, me.create, me.isAdd);
+ me.title = Proxmox.Utils.dialog_title(me.subject, me.isCreate, me.isAdd);
}
- if (me.create) {
+ if (me.isCreate) {
me.buttons = [ submitBtn ] ;
} else {
me.buttons = [ submitBtn, resetBtn ];