mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 13:06:14 +00:00
add field in configuration for hidden other fields in settings form
This commit is contained in:
parent
f8d81bd734
commit
932835ef03
|
@ -24,6 +24,8 @@ class Settings { /* {{{ */
|
||||||
// Config File Path
|
// Config File Path
|
||||||
var $_configFilePath = null;
|
var $_configFilePath = null;
|
||||||
|
|
||||||
|
// Fields not shown in gui
|
||||||
|
var $_hiddenConfFields = '';
|
||||||
// Name of site
|
// Name of site
|
||||||
var $_siteName = "SeedDMS";
|
var $_siteName = "SeedDMS";
|
||||||
// Message to display at the bottom of every page.
|
// Message to display at the bottom of every page.
|
||||||
|
@ -669,6 +671,7 @@ class Settings { /* {{{ */
|
||||||
$this->_useHomeAsRootFolder = Settings::boolval($tab["useHomeAsRootFolder"]);
|
$this->_useHomeAsRootFolder = Settings::boolval($tab["useHomeAsRootFolder"]);
|
||||||
$this->_titleDisplayHack = Settings::boolval($tab["titleDisplayHack"]);
|
$this->_titleDisplayHack = Settings::boolval($tab["titleDisplayHack"]);
|
||||||
$this->_showMissingTranslations = Settings::boolval($tab["showMissingTranslations"]);
|
$this->_showMissingTranslations = Settings::boolval($tab["showMissingTranslations"]);
|
||||||
|
$this->_hiddenConfFields = strval($tab["hiddenConfFields"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// XML Path: /configuration/advanced/authentication
|
// XML Path: /configuration/advanced/authentication
|
||||||
|
@ -1009,6 +1012,7 @@ class Settings { /* {{{ */
|
||||||
$this->setXMLAttributValue($node, "useHomeAsRootFolder", $this->_useHomeAsRootFolder);
|
$this->setXMLAttributValue($node, "useHomeAsRootFolder", $this->_useHomeAsRootFolder);
|
||||||
$this->setXMLAttributValue($node, "titleDisplayHack", $this->_titleDisplayHack);
|
$this->setXMLAttributValue($node, "titleDisplayHack", $this->_titleDisplayHack);
|
||||||
$this->setXMLAttributValue($node, "showMissingTranslations", $this->_showMissingTranslations);
|
$this->setXMLAttributValue($node, "showMissingTranslations", $this->_showMissingTranslations);
|
||||||
|
$this->setXMLAttributValue($node, "hiddenConfFields", $this->_hiddenConfFields);
|
||||||
|
|
||||||
// XML Path: /configuration/advanced/authentication
|
// XML Path: /configuration/advanced/authentication
|
||||||
$node = $this->getXMLNode($xml, '/configuration/advanced', 'authentication');
|
$node = $this->getXMLNode($xml, '/configuration/advanced', 'authentication');
|
||||||
|
|
|
@ -88,6 +88,24 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
|
||||||
$this->showRawConfigHeadline(htmlspecialchars(getMLText($title)));
|
$this->showRawConfigHeadline(htmlspecialchars(getMLText($title)));
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show a text input configuration option
|
||||||
|
*
|
||||||
|
* @param string $title title of the option
|
||||||
|
* @param string $name name of html input field
|
||||||
|
* @param string $type can be 'password', 'array'
|
||||||
|
* @param string $placeholder placeholder for input field
|
||||||
|
*/
|
||||||
|
protected function isVisible($name) { /* {{{ */
|
||||||
|
$settings = $this->params['settings'];
|
||||||
|
if(!($hcf = $settings->_hiddenConfFields))
|
||||||
|
return true;
|
||||||
|
$hcfa = explode(';', $hcf);
|
||||||
|
if(in_array($name, $hcfa))
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show a text input configuration option
|
* Show a text input configuration option
|
||||||
*
|
*
|
||||||
|
@ -98,6 +116,8 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
|
||||||
*/
|
*/
|
||||||
protected function showConfigText($title, $name, $type='', $placeholder='') { /* {{{ */
|
protected function showConfigText($title, $name, $type='', $placeholder='') { /* {{{ */
|
||||||
$settings = $this->params['settings'];
|
$settings = $this->params['settings'];
|
||||||
|
if(!$this->isVisible($name))
|
||||||
|
return;
|
||||||
?>
|
?>
|
||||||
<tr title="<?= getMLText($title."_desc") ?>">
|
<tr title="<?= getMLText($title."_desc") ?>">
|
||||||
<td><?= getMLText($title) ?>:</td>
|
<td><?= getMLText($title) ?>:</td>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user