mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
7b78a1ac69
|
@ -171,6 +171,8 @@
|
|||
- fix various methods in restapi (Closes: #481)
|
||||
- add hooks showDocumentKeywords and showDocumentCategories
|
||||
- sort versions of extension in extension manager propperly
|
||||
- fix output of help text for config vars in extension
|
||||
- configuring a user id in the settings uses a list of existing users
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.18
|
||||
|
|
|
@ -156,7 +156,7 @@ if ($action == "saveSettings")
|
|||
$settings->_loginFailure = intval($_POST["loginFailure"]);
|
||||
$settings->_autoLoginUser = intval($_POST["autoLoginUser"]);
|
||||
$settings->_quota = intval($_POST["quota"]);
|
||||
$settings->_undelUserIds = strval($_POST["undelUserIds"]);
|
||||
$settings->_undelUserIds = is_array($_POST["undelUserIds"]) ? implode(',', $_POST["undelUserIds"]) : strval($_POST["undelUserIds"]);
|
||||
$settings->_encryptionKey = strval($_POST["encryptionKey"]);
|
||||
$settings->_cookieLifetime = intval($_POST["cookieLifetime"]);
|
||||
$settings->_defaultAccessDocs = intval($_POST["defaultAccessDocs"]);
|
||||
|
|
|
@ -1072,7 +1072,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
function formField($title, $value, $params=array()) { /* {{{ */
|
||||
if($title !== null) {
|
||||
echo "<div class=\"control-group\">";
|
||||
echo " <label class=\"control-label\">".$title.":</label>";
|
||||
echo " <label class=\"control-label\"".(!empty($params['help']) ? " title=\"".$params['help']."\"" : "").">".$title.":</label>";
|
||||
echo " <div class=\"controls\">";
|
||||
}
|
||||
if(isset($params['field_wrap'][0]))
|
||||
|
@ -1139,7 +1139,14 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
|
||||
function formSubmit($value, $name='') { /* {{{ */
|
||||
echo "<div class=\"controls\">\n";
|
||||
echo "<button type=\"submit\" class=\"btn btn-primary\"".($name ? ' name="'.$name.'" id="'.$name.'"' : '').">".$value."</button>\n";
|
||||
if(is_string($value)) {
|
||||
echo "<button type=\"submit\" class=\"btn btn-primary\"".($name ? ' name="'.$name.'" id="'.$name.'"' : '').">".$value."</button>\n";
|
||||
} else {
|
||||
if(is_array($value)) {
|
||||
foreach($value as $i=>$v)
|
||||
echo "<button type=\"submit\" class=\"btn btn-primary\"".(!empty($name[$i]) ? ' name="'.$name[$i].'" id="'.$name[$i].'"' : '').">".$v."</button>\n";
|
||||
}
|
||||
}
|
||||
echo "</div>\n";
|
||||
} /* }}} */
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ class SeedDMS_View_Settings extends SeedDMS_Bootstrap_Style {
|
|||
protected function showConfigPlain($title, $title_desc, $rawdata) { /* {{{ */
|
||||
$settings = $this->params['settings'];
|
||||
?>
|
||||
<tr title="<?= $title_desc ?>">
|
||||
<tr title="<?= htmlspecialchars($title_desc) ?>">
|
||||
<td><?= $title ?>:</td>
|
||||
<td><?= $rawdata ?></td>
|
||||
</tr>
|
||||
|
@ -175,6 +175,34 @@ class SeedDMS_View_Settings extends SeedDMS_Bootstrap_Style {
|
|||
<?php
|
||||
} /* }}} */
|
||||
|
||||
protected function showConfigUser($title, $name, $allowempty=false, $multiple=false, $size=0) { /* {{{ */
|
||||
$settings = $this->params['settings'];
|
||||
$dms = $this->params['dms'];
|
||||
?>
|
||||
<tr title="<?= getMLText($title."_desc") ?>">
|
||||
<td><?= getMLText($title) ?>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$users = $dms->getAllUsers();
|
||||
if($users) {
|
||||
$selections = explode(',', $settings->{"_".$name});
|
||||
echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"".$name.($multiple ? "[]" : "")."\"".($multiple ? " multiple" : "").($size ? " size=\"".$size."\"" : "")." data-placeholder=\"".getMLText("select_user")."\">";
|
||||
if($allowempty)
|
||||
echo "<option value=\"\"></option>";
|
||||
foreach($users as $curuser) {
|
||||
echo "<option value=\"".$curuser->getID()."\"";
|
||||
if(in_array($curuser->getID(), $selections))
|
||||
echo " selected";
|
||||
echo ">".htmlspecialchars($curuser->getLogin()." - ".$curuser->getFullName())."</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
} /* }}} */
|
||||
|
||||
function js() { /* {{{ */
|
||||
$extmgr = $this->params['extmgr'];
|
||||
|
||||
|
@ -382,9 +410,9 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site'));
|
|||
<?php $this->showConfigText('settings_passwordExpiration', 'passwordExpiration'); ?>
|
||||
<?php $this->showConfigText('settings_passwordHistory', 'passwordHistory'); ?>
|
||||
<?php $this->showConfigText('settings_loginFailure', 'loginFailure'); ?>
|
||||
<?php $this->showConfigText('settings_autoLoginUser', 'autoLoginUser'); ?>
|
||||
<?php $this->showConfigUser('settings_autoLoginUser', 'autoLoginUser', true); ?>
|
||||
<?php $this->showConfigText('settings_quota', 'quota'); ?>
|
||||
<?php $this->showConfigText('settings_undelUserIds', 'undelUserIds'); ?>
|
||||
<?php $this->showConfigUser('settings_undelUserIds', 'undelUserIds', true, true); ?>
|
||||
<?php $this->showConfigText('settings_encryptionKey', 'encryptionKey'); ?>
|
||||
<?php $this->showConfigText('settings_cookieLifetime', 'cookieLifetime'); ?>
|
||||
<?php $this->showConfigOption('settings_defaultAccessDocs', 'defaultAccessDocs', array(' 0'=>'inherited', ' '.M_NONE=>'access_mode_none', ' '.M_READ=>'access_mode_read', ' '.M_READWRITE=>'access_mode_readwrite'), false, true); ?>
|
||||
|
@ -429,10 +457,11 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site'));
|
|||
-- SETTINGS - ADVANCED - AUTHENTICATION
|
||||
-->
|
||||
<?php $this->showConfigHeadline('settings_Authentication'); ?>
|
||||
<?php $this->showConfigText('settings_guestID', 'guestID'); ?>
|
||||
<?php $this->showConfigUser('settings_guestID', 'guestID', true); ?>
|
||||
<?php $this->showConfigText('settings_adminIP', 'adminIP'); ?>
|
||||
<?php $this->showConfigText('settings_apiKey', 'apiKey'); ?>
|
||||
<?php $this->showConfigText('settings_apiUserId', 'apiUserId'); ?>
|
||||
<?php //$this->showConfigText('settings_apiUserId', 'apiUserId'); ?>
|
||||
<?php $this->showConfigUser('settings_apiUserId', 'apiUserId', true); ?>
|
||||
<?php $this->showConfigText('settings_apiOrigin', 'apiOrigin'); ?>
|
||||
|
||||
<!--
|
||||
|
|
Loading…
Reference in New Issue
Block a user