From: Marcin Haba Date: Tue, 13 Jul 2021 02:51:33 +0000 (+0200) Subject: baculum: Add to directive controls option to hide reset button and remove button X-Git-Tag: Release-11.3.2~183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98d6c50708895155732611108e1ee9d42e5f8025;p=thirdparty%2Fbacula.git baculum: Add to directive controls option to hide reset button and remove button --- diff --git a/gui/baculum/protected/Web/Portlets/DirectiveCheckBox.tpl b/gui/baculum/protected/Web/Portlets/DirectiveCheckBox.tpl index dd124839b..a599283d9 100644 --- a/gui/baculum/protected/Web/Portlets/DirectiveCheckBox.tpl +++ b/gui/baculum/protected/Web/Portlets/DirectiveCheckBox.tpl @@ -9,6 +9,6 @@ OnCheckedChanged="saveValue" ActiveControl.EnableUpdate="false" /> - + diff --git a/gui/baculum/protected/Web/Portlets/DirectiveComboBox.tpl b/gui/baculum/protected/Web/Portlets/DirectiveComboBox.tpl index c6258743a..f6192d185 100644 --- a/gui/baculum/protected/Web/Portlets/DirectiveComboBox.tpl +++ b/gui/baculum/protected/Web/Portlets/DirectiveComboBox.tpl @@ -8,8 +8,8 @@ AutoPostBack="false" ActiveControl.EnableUpdate="false" /> <%=$this->getRequired() ? ' ' : ''%> - - + + <%=$this->getRequired() ? ' ' : ''%> - - + + <%=$this->getRequired() ? ' ' : ''%> - - + + <%=$this->getRequired() ? ' ' : ''%> - - + + <%=$this->getRequired() ? ' ' : ''%> - - + + setViewState(self::ALLOW_REMOVE, $allow_remove); - } - - /** - * Get allow remove state. - * If not set, by default option value is true. - * - * @return boolean allow remove state - */ - public function getAllowRemove() { - return $this->getViewState(self::ALLOW_REMOVE, true); - } - /** * Set unit type to show in control. * Allowed values are: decemial or binary. diff --git a/gui/baculum/protected/Web/Portlets/DirectiveSpeed.tpl b/gui/baculum/protected/Web/Portlets/DirectiveSpeed.tpl index 2e3adf758..e1fedddcc 100644 --- a/gui/baculum/protected/Web/Portlets/DirectiveSpeed.tpl +++ b/gui/baculum/protected/Web/Portlets/DirectiveSpeed.tpl @@ -17,8 +17,8 @@ AutoPostBack="false" OnSelectedIndexChanged="saveValue" /> <%=$this->getRequired() ? ' ' : ''%> - - + + setViewState(self::DISABLED, $disabled); } + + public function getShowResetButton() { + return $this->getViewState(self::SHOW_RESET_BUTTON, true); + } + + public function setShowResetButton($show) { + $show = TPropertyValue::ensureBoolean($show); + $this->setViewState(self::SHOW_RESET_BUTTON, $show); + } + + public function getShowRemoveButton() { + return $this->getViewState(self::SHOW_REMOVE_BUTTON, true); + } + + public function setShowRemoveButton($show) { + $show = TPropertyValue::ensureBoolean($show); + $this->setViewState(self::SHOW_REMOVE_BUTTON, $show); + } } ?> diff --git a/gui/baculum/protected/Web/Portlets/DirectiveTextBox.tpl b/gui/baculum/protected/Web/Portlets/DirectiveTextBox.tpl index a7b87cdb6..802d77554 100644 --- a/gui/baculum/protected/Web/Portlets/DirectiveTextBox.tpl +++ b/gui/baculum/protected/Web/Portlets/DirectiveTextBox.tpl @@ -8,8 +8,8 @@ ActiveControl.EnableUpdate="false" AutoTrim="true" /> <%=$this->getRequired() ? ' ' : ''%> - - + + <%=$this->getRequired() ? ' ' : ''%> - - + +