Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
* Duration field in commands will no be hidden when a fixed-downtime …
Browse files Browse the repository at this point in the history
…is selected (fixes #1280)
  • Loading branch information
jmosshammer committed May 2, 2011
1 parent ade8e89 commit 76c2375
Showing 1 changed file with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
// ---

var IcingaCommandHandler = function(meta) {

this.toolbaritem = undefined;
this.meta = undefined;

this.meta = undefined;

this.command_options = {};

Expand Down Expand Up @@ -180,7 +179,21 @@ IcingaCommandHandler.prototype = {
{boxLabel: _('No'), inputValue: 0, name: o.fieldName, checked: true}
]
});

if(o.fieldName == "fixed") {
var affectedForms = ['duration','duration-minute','duration-hour'];
oDef.listeners = {
change: function(rg, checkedBox) {
for(var i=0;i<affectedForms.length;i++) {
var m = form.getForm().findField(affectedForms[i])

if(m) {
checkedBox.initialConfig.boxLabel == _('Yes') ? m.setReadOnly(true) : m.setReadOnly(false);
checkedBox.initialConfig.boxLabel == _('Yes') ? m.container.hide() : m.container.show();
}
}
}
}
}
return new Ext.form.RadioGroup(oDef);
break;

Expand Down

0 comments on commit 76c2375

Please sign in to comment.