add checkbox for creating checkout dir if it doesn't exists

This commit is contained in:
Uwe Steinmann 2015-04-22 17:21:57 +02:00
parent d7d4ab6390
commit 4f3c6ed090
3 changed files with 10 additions and 1 deletions

View File

@ -85,6 +85,8 @@ class Settings { /* {{{ */
var $_dropFolderDir = null;
// Where the checked out files are located
var $_checkOutDir = null;
// Create checkout dir if it doesn't exists
var $_createCheckOutDir = false;
// Where the stop word file is located
var $_stopWordsFile = null;
// enable/disable lucene fulltext search
@ -375,6 +377,7 @@ class Settings { /* {{{ */
$this->_luceneDir = strval($tab["luceneDir"]);
$this->_dropFolderDir = strval($tab["dropFolderDir"]);
$this->_checkOutDir = strval($tab["checkOutDir"]);
$this->_createCheckOutDir = Settings::boolVal($tab["createCheckOutDir"]);
$this->_logFileEnable = Settings::boolVal($tab["logFileEnable"]);
$this->_logFileRotation = strval($tab["logFileRotation"]);
$this->_enableLargeFileUpload = Settings::boolVal($tab["enableLargeFileUpload"]);
@ -660,6 +663,7 @@ class Settings { /* {{{ */
$this->setXMLAttributValue($node, "luceneDir", $this->_luceneDir);
$this->setXMLAttributValue($node, "dropFolderDir", $this->_dropFolderDir);
$this->setXMLAttributValue($node, "checkOutDir", $this->_checkOutDir);
$this->setXMLAttributValue($node, "createCheckOutDir", $this->_createCheckOutDir);
$this->setXMLAttributValue($node, "logFileEnable", $this->_logFileEnable);
$this->setXMLAttributValue($node, "logFileRotation", $this->_logFileRotation);
$this->setXMLAttributValue($node, "enableLargeFileUpload", $this->_enableLargeFileUpload);

View File

@ -96,6 +96,7 @@ if ($action == "saveSettings")
$settings->_extraPath = $_POST["extraPath"];
$settings->_dropFolderDir = $_POST["dropFolderDir"];
$settings->_checkOutDir = $_POST["checkOutDir"];
$settings->_createCheckOutDir = getBoolValue("createCheckOutDir");
$settings->_logFileEnable = getBoolValue("logFileEnable");
$settings->_logFileRotation = $_POST["logFileRotation"];
$settings->_enableLargeFileUpload = getBoolValue("enableLargeFileUpload");

View File

@ -55,7 +55,7 @@ class SeedDMS_View_Settings extends SeedDMS_Bootstrap_Style {
<form action="../op/op.Settings.php" method="post" enctype="multipart/form-data" name="form0" >
<input type="hidden" name="action" value="saveSettings" />
<input type="hidden" id="currenttab" name="currenttab" value="<?php echo (isset($_POST['currenttab']) ? $_POST['currenttab'] : 'site' ); ?>" />
<input type="hidden" id="currenttab" name="currenttab" value="<?php echo $currenttab ? $currenttab : 'site'; ?>" />
<?php
if(!is_writeable($settings->_configFilePath)) {
print "<div class=\"alert alert-warning\">";
@ -294,6 +294,10 @@ if(!is_writeable($settings->_configFilePath)) {
<td><?php printMLText("settings_checkOutDir");?>:</td>
<td><input type="text" name="checkOutDir" value="<?php echo $settings->_checkOutDir ?>" size="100" /></td>
</tr>
<tr title="<?php printMLText("settings_createCheckOutDir_desc");?>">
<td><?php printMLText("settings_createCheckOutDir");?>:</td>
<td><input type="checkbox" name="createCheckOutDir" <?php if($settings->_createCheckOutDir) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_logFileEnable_desc");?>">
<td><?php printMLText("settings_logFileEnable");?>:</td>
<td><input name="logFileEnable" type="checkbox" <?php if ($settings->_logFileEnable) echo "checked" ?> /></td>