2012-12-14 07:53:13 +00:00
< ? php
/**
* Implementation of Settings view
*
* @ category DMS
2013-02-14 11:10:53 +00:00
* @ package SeedDMS
2012-12-14 07:53:13 +00:00
* @ license GPL 2
* @ version @ version @
* @ author Uwe Steinmann < uwe @ steinmann . cx >
* @ copyright Copyright ( C ) 2002 - 2005 Markus Westphal ,
* 2006 - 2008 Malcolm Cowe , 2010 Matteo Lucarelli ,
* 2010 - 2012 Uwe Steinmann
* @ version Release : @ package_version @
*/
/**
* Include parent class
*/
require_once ( " class.Bootstrap.php " );
/**
* Class which outputs the html page for Settings view
*
* @ category DMS
2013-02-14 11:10:53 +00:00
* @ package SeedDMS
2012-12-14 07:53:13 +00:00
* @ author Markus Westphal , Malcolm Cowe , Uwe Steinmann < uwe @ steinmann . cx >
* @ copyright Copyright ( C ) 2002 - 2005 Markus Westphal ,
* 2006 - 2008 Malcolm Cowe , 2010 Matteo Lucarelli ,
* 2010 - 2012 Uwe Steinmann
* @ version Release : @ package_version @
*/
2013-02-14 11:10:53 +00:00
class SeedDMS_View_Settings extends SeedDMS_Bootstrap_Style {
2012-12-14 07:53:13 +00:00
2018-04-19 11:42:20 +00:00
protected function showPaneHeader ( $name , $title , $isactive ) { /* {{{ */
echo '<li class="' . ( $isactive ? 'active' : '' ) . '"><a data-target="#' . $name . '" data-toggle="tab">' . $title . '</a></li>' . " \n " ;
} /* }}} */
protected function showStartPaneContent ( $name , $isactive ) { /* {{{ */
echo '<div class="tab-pane' . ( $isactive ? ' active' : '' ) . '" id="' . $name . '">' ;
$this -> contentContainerStart ();
echo '<table class="table-condensed">' ;
} /* }}} */
protected function showEndPaneContent ( $name , $currentab ) { /* {{{ */
echo '</table>' ;
$this -> contentContainerEnd ();
echo '</div>' ;
} /* }}} */
protected function getTextField ( $name , $value , $type = '' , $placeholder = '' ) { /* {{{ */
$html = '' ;
2015-08-13 09:50:49 +00:00
if ( $type != 'password' && strlen ( $value ) > 80 )
2018-04-19 11:42:20 +00:00
$html .= '<textarea class="input-xxlarge" name="' . $name . '">' . $value . '</textarea>' ;
2015-08-13 20:21:47 +00:00
else {
if ( strlen ( $value ) > 40 )
$class = 'input-xxlarge' ;
elseif ( strlen ( $value ) > 30 )
$class = 'input-xlarge' ;
elseif ( strlen ( $value ) > 18 )
$class = 'input-large' ;
elseif ( strlen ( $value ) > 12 )
$class = 'input-medium' ;
else
$class = 'input-small' ;
2018-04-19 11:42:20 +00:00
$html .= '<input ' . ( $type == 'password' ? 'type="password"' : 'type="text"' ) . '" class="' . $class . '" name="' . $name . '" value="' . $value . '" placeholder="' . $placeholder . '"/>' ;
2015-08-13 20:21:47 +00:00
}
2018-04-19 11:42:20 +00:00
return $html ;
} /* }}} */
protected function showTextField ( $name , $value , $type = '' , $placeholder = '' ) { /* {{{ */
echo $this -> getTextField ( $name , $value , $type , $placeholder );
2015-08-13 09:50:49 +00:00
} /* }}} */
2018-04-17 16:34:30 +00:00
/**
* Place arbitrary html in a headline
*
* @ param string $text html code to be shown as headline
*/
protected function showRawConfigHeadline ( $text ) { /* {{{ */
?>
< tr >< td >< b >< ? = $text ?> </b></td></tr>
< ? php
} /* }}} */
/**
* Place text in a headline
*
* @ param string $text text to be shown as headline
*/
protected function showConfigHeadline ( $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
2018-04-19 11:42:20 +00:00
* @ param string $type can be 'password' , 'array'
* @ param string $placeholder placeholder for input field
2018-04-17 16:34:30 +00:00
*/
2018-04-19 11:42:20 +00:00
protected function showConfigText ( $title , $name , $type = '' , $placeholder = '' ) { /* {{{ */
2018-04-17 16:34:30 +00:00
$settings = $this -> params [ 'settings' ];
?>
< tr title = " <?= getMLText( $title . " _desc " ) ?> " >
2018-04-19 11:42:20 +00:00
< td >< ? = getMLText ( $title ) ?> :</td>
< ? php
if ( $type == 'array' )
$value = $settings -> arrayToString ( $settings -> { " _ " . $name });
else
$value = $settings -> { " _ " . $name };
?>
< td >< ? php $this -> showTextField ( $name , $value , ( $type == 'password' ? 'password' : '' ), $placeholder ); ?> </td>
</ tr >
< ? php
} /* }}} */
/**
* Show a configuration option with arbitrary html content
*
* @ param string $title title of the option
* @ param string $rawdata html data
*/
protected function showConfigPlain ( $title , $title_desc , $rawdata ) { /* {{{ */
$settings = $this -> params [ 'settings' ];
?>
< tr title = " <?= $title_desc ?> " >
< td >< ? = $title ?> :</td>
< td >< ? = $rawdata ?> </td>
2018-04-17 16:34:30 +00:00
</ tr >
< ? php
} /* }}} */
/**
* Show a checkbox configuration option
*
* @ param string $title title of the option
* @ param string $name name of html input field
*/
protected function showConfigCheckbox ( $title , $name ) { /* {{{ */
$settings = $this -> params [ 'settings' ];
?>
< tr title = " <?= getMLText( $title . " _desc " ) ?> " >
< td >< ? = getMLText ( $title ) ?> :</td>
< td >< input name = " <?= $name ?> " type = " checkbox " < ? php if ( $settings -> { " _ " . $name }) echo " checked " ?> /></td>
</ tr >
< ? php
} /* }}} */
protected function showConfigOption ( $title , $name , $values , $multiple = false , $translate = false ) { /* {{{ */
$settings = $this -> params [ 'settings' ];
$isass = count ( array_filter ( array_keys ( $values ), 'is_string' )) > 0 ;
// var_dump($values);
// echo $isass ? 'asso' : 'indexed';
?>
< tr title = " <?= getMLText( $title . " _desc " ) ?> " >
< td >< ? = getMLText ( $title ) ?> :</td>
< td >
< ? php if ( $multiple ) { ?>
< select name = " <?= $name ?>[] " multiple >
< ? php } else { ?>
< select name = " <?= $name ?> " >
< ? php }
foreach ( $values as $i => $value ) {
$optval = trim ( $isass ? $i : $value );
echo '<option value="' . $optval . '" ' ;
if (( $multiple && in_array ( $optval , $settings -> { " _ " . $name })) || ( ! $multiple && $optval == $settings -> { " _ " . $name }))
echo " selected " ;
echo '>' . ( $translate ? getMLText ( $value ) : $value ) . '</option>' ;
}
?>
</ select >
</ td >
</ tr >
< ? php
} /* }}} */
2016-01-28 12:37:16 +00:00
function js () { /* {{{ */
2016-02-17 10:43:19 +00:00
header ( 'Content-Type: application/javascript' );
2016-01-28 12:37:16 +00:00
?>
$ ( document ) . ready ( function () {
$ ( '#settingstab li a' ) . click ( function ( event ) {
$ ( '#currenttab' ) . val ( $ ( event . currentTarget ) . data ( 'target' ) . substring ( 1 ));
});
2016-02-15 08:27:44 +00:00
$ ( 'a.sendtestmail' ) . click ( function ( ev ){
ev . preventDefault ();
$ . ajax ({ url : '../op/op.Ajax.php' ,
type : 'GET' ,
dataType : " json " ,
data : { command : 'testmail' },
success : function ( data ) {
noty ({
text : data . msg ,
type : ( data . error ) ? 'error' : 'success' ,
dismissQueue : true ,
layout : 'topRight' ,
theme : 'defaultTheme' ,
timeout : 1500 ,
});
2018-11-09 16:22:33 +00:00
if ( data . data ) {
$ ( '#maildebug' ) . text ( data . data );
}
2016-02-15 08:27:44 +00:00
}
});
});
2016-01-28 12:37:16 +00:00
});
< ? php
2018-08-27 06:22:39 +00:00
foreach ( $GLOBALS [ 'EXT_CONF' ] as $extname => $extconf ) {
if ( $extconf [ 'config' ]) {
foreach ( $extconf [ 'config' ] as $confkey => $conf ) {
switch ( $conf [ 'type' ]) {
case 'select' :
if ( ! empty ( $conf [ 'internal' ])) {
switch ( $conf [ 'internal' ]) {
case " folders " :
$this -> printFolderChooserJs ( " form " . $extname . $confkey );
break ;
}
}
break ;
}
}
}
}
2016-01-28 12:37:16 +00:00
} /* }}} */
2012-12-14 07:53:13 +00:00
function show () { /* {{{ */
$dms = $this -> params [ 'dms' ];
$user = $this -> params [ 'user' ];
$settings = $this -> params [ 'settings' ];
2015-03-11 17:24:14 +00:00
$currenttab = $this -> params [ 'currenttab' ];
2012-12-14 07:53:13 +00:00
$this -> htmlStartPage ( getMLText ( " admin_tools " ));
$this -> globalNavigation ();
$this -> contentStart ();
$this -> pageNavigation ( getMLText ( " admin_tools " ), " admin_tools " );
$this -> contentHeading ( getMLText ( " settings " ));
?>
< form action = " ../op/op.Settings.php " method = " post " enctype = " multipart/form-data " name = " form0 " >
< input type = " hidden " name = " action " value = " saveSettings " />
2015-07-15 05:25:45 +00:00
< input type = " hidden " id = " currenttab " name = " currenttab " value = " <?php echo $currenttab ? $currenttab : 'site'; ?> " />
2012-12-14 07:53:13 +00:00
< ? php
if ( ! is_writeable ( $settings -> _configFilePath )) {
print " <div class= \" alert alert-warning \" > " ;
echo " <p> " . getMLText ( " settings_notwritable " ) . " </p> " ;
print " </div> " ;
}
?>
< ul class = " nav nav-tabs " id = " settingstab " >
2018-04-19 11:42:20 +00:00
< ? php $this -> showPaneHeader ( 'site' , getMLText ( 'settings_Site' ), ( ! $currenttab || $currenttab == 'site' )); ?>
< ? php $this -> showPaneHeader ( 'system' , getMLText ( 'settings_System' ), ( $currenttab == 'system' )); ?>
< ? php $this -> showPaneHeader ( 'advanced' , getMLText ( 'settings_Advanced' ), ( $currenttab == 'advanced' )); ?>
< ? php $this -> showPaneHeader ( 'extensions' , getMLText ( 'settings_Extensions' ), ( $currenttab == 'extensions' )); ?>
2012-12-14 07:53:13 +00:00
</ ul >
< div class = " tab-content " >
2018-04-19 11:42:20 +00:00
< ? php
$this -> showStartPaneContent ( 'site' , ( ! $currenttab || $currenttab == 'site' ));
?>
2012-12-14 07:53:13 +00:00
<!--
-- SETTINGS - SITE - DISPLAY
2018-04-17 16:34:30 +00:00
-->
< ? php $this -> showConfigHeadline ( 'settings_Display' ); ?>
< ? php $this -> showConfigText ( 'settings_siteName' , 'siteName' ); ?>
< ? php $this -> showConfigText ( 'settings_footNote' , 'footNote' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_printDisclaimer' , 'printDisclaimer' ); ?>
< ? php $this -> showConfigOption ( 'settings_available_languages' , 'availablelanguages' , getAvailableLanguages (), true , true ); ?>
< ? php $this -> showConfigOption ( 'settings_language' , 'language' , getAvailableLanguages (), false , true ); ?>
< ? php $this -> showConfigOption ( 'settings_theme' , 'theme' , UI :: getStyles (), false , false ); ?>
< ? php $this -> showConfigText ( 'settings_previewWidthList' , 'previewWidthList' ); ?>
< ? php $this -> showConfigText ( 'settings_previewWidthMenuList' , 'previewWidthMenuList' ); ?>
< ? php $this -> showConfigText ( 'settings_previewWidthDropFolderList' , 'previewWidthDropFolderList' ); ?>
< ? php $this -> showConfigText ( 'settings_previewWidthDetail' , 'previewWidthDetail' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_showFullPreview' , 'showFullPreview' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_convertToPdf' , 'convertToPdf' ); ?>
< ? php $this -> showConfigText ( 'settings_maxItemsPerPage' , 'maxItemsPerPage' ); ?>
< ? php $this -> showConfigText ( 'settings_incItemsPerPage' , 'incItemsPerPage' ); ?>
2012-12-14 07:53:13 +00:00
<!--
-- SETTINGS - SITE - EDITION
-->
2018-04-17 16:34:30 +00:00
< ? php $this -> showConfigHeadline ( 'settings_Edition' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_strictFormCheck' , 'strictFormCheck' ); ?>
2018-04-19 11:42:20 +00:00
< ? php $this -> showConfigText ( 'settings_viewOnlineFileTypes' , 'viewOnlineFileTypes' , 'array' ); ?>
< ? php $this -> showConfigText ( 'settings_editOnlineFileTypes' , 'editOnlineFileTypes' , 'array' ); ?>
2018-04-17 16:34:30 +00:00
< ? php $this -> showConfigCheckbox ( 'settings_enableConverting' , 'enableConverting' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableEmail' , 'enableEmail' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableUsersView' , 'enableUsersView' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableFullSearch' , 'enableFullSearch' ); ?>
< ? php $this -> showConfigText ( 'settings_maxSizeForFullText' , 'maxSizeForFullText' ); ?>
< ? php $this -> showConfigOption ( 'settings_fullSearchEngine' , 'fullSearchEngine' , array ( 'lucene' => 'settings_fullSearchEngine_vallucene' , 'sqlitefts' => 'settings_fullSearchEngine_valsqlitefts' ), false , true ); ?>
< ? php $this -> showConfigOption ( 'settings_defaultSearchMethod' , 'defaultSearchMethod' , array ( 'database' => 'settings_defaultSearchMethod_valdatabase' , 'fulltext' => 'settings_defaultSearchMethod_valfulltext' ), false , true ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_showSingleSearchHit' , 'showSingleSearchHit' ); ?>
< ? php $this -> showConfigText ( 'settings_stopWordsFile' , 'stopWordsFile' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableClipboard' , 'enableClipboard' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableMenuTasks' , 'enableMenuTasks' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableDropFolderList' , 'enableDropFolderList' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableSessionList' , 'enableSessionList' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableDropUpload' , 'enableDropUpload' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableMultiUpload' , 'enableMultiUpload' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableFolderTree' , 'enableFolderTree' ); ?>
< ? php $this -> showConfigOption ( 'settings_expandFolderTree' , 'expandFolderTree' , array ( ' 0' => 'settings_expandFolderTree_val0' , ' 1' => 'settings_expandFolderTree_val1' , ' 2' => 'settings_expandFolderTree_val2' ), false , true ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableRecursiveCount' , 'enableRecursiveCount' ); ?>
< ? php $this -> showConfigText ( 'settings_maxRecursiveCount' , 'maxRecursiveCount' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableLanguageSelector' , 'enableLanguageSelector' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableHelp' , 'enableHelp' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableThemeSelector' , 'enableThemeSelector' ); ?>
< ? php $this -> showConfigOption ( 'settings_sortUsersInList' , 'sortUsersInList' , array ( ' ' => 'settings_sortUsersInList_val_login' , 'fullname' => 'settings_sortUsersInList_val_fullname' ), false , true ); ?>
< ? php $this -> showConfigOption ( 'settings_sortFoldersDefault' , 'sortFoldersDefault' , array ( 'u' => 'settings_sortFoldersDefault_val_unsorted' , 's' => 'settings_sortFoldersDefault_val_sequence' , 'n' => 'settings_sortFoldersDefault_val_name' ), false , true ); ?>
< ? php $this -> showConfigOption ( 'settings_defaultDocPosition' , 'defaultDocPosition' , array ( 'end' => 'settings_defaultDocPosition_val_end' , 'start' => 'settings_defaultDocPosition_val_start' ), false , true ); ?>
2012-12-14 07:53:13 +00:00
2018-04-12 04:41:51 +00:00
<!--
-- SETTINGS - SITE - WEBDAV
-->
2018-04-17 16:34:30 +00:00
< ? php $this -> showConfigHeadline ( 'settings_webdav' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableWebdavReplaceDoc' , 'enableWebdavReplaceDoc' ); ?>
2018-04-12 04:41:51 +00:00
2012-12-14 07:53:13 +00:00
<!--
-- SETTINGS - SITE - CALENDAR
-->
2018-04-17 16:34:30 +00:00
< ? php $this -> showConfigHeadline ( 'settings_Calendar' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableCalendar' , 'enableCalendar' ); ?>
< ? php $this -> showConfigOption ( 'settings_calendarDefaultView' , 'calendarDefaultView' , array ( 'w' => 'week_view' , 'm' => 'month_view' , 'y' => 'year_view' ), false , true ); ?>
< ? php $this -> showConfigOption ( 'settings_firstDayOfWeek' , 'firstDayOfWeek' , array ( ' 0' => 'sunday' , ' 1' => 'monday' , ' 2' => 'tuesday' , ' 3' => 'wednesday' , ' 4' => 'thursday' , ' 5' => 'friday' , ' 6' => 'saturday' ), false , true ); ?>
2018-04-19 11:42:20 +00:00
< ? php
$this -> showEndPaneContent ( 'site' , $currenttab );
2012-12-14 07:53:13 +00:00
2018-04-19 11:42:20 +00:00
$this -> showStartPaneContent ( 'system' , $currenttab == 'system' );
?>
2012-12-14 07:53:13 +00:00
<!--
-- SETTINGS - SYSTEM - SERVER
-->
2018-04-17 16:34:30 +00:00
< ? php $this -> showConfigHeadline ( 'settings_Server' ); ?>
< ? php $this -> showConfigText ( 'settings_rootDir' , 'rootDir' ); ?>
< ? php $this -> showConfigText ( 'settings_httpRoot' , 'httpRoot' ); ?>
< ? php $this -> showConfigText ( 'settings_contentDir' , 'contentDir' ); ?>
< ? php $this -> showConfigText ( 'settings_backupDir' , 'backupDir' ); ?>
< ? php $this -> showConfigText ( 'settings_cacheDir' , 'cacheDir' ); ?>
< ? php $this -> showConfigText ( 'settings_stagingDir' , 'stagingDir' ); ?>
< ? php $this -> showConfigText ( 'settings_luceneDir' , 'luceneDir' ); ?>
< ? php $this -> showConfigText ( 'settings_dropFolderDir' , 'dropFolderDir' ); ?>
< ? php $this -> showConfigText ( 'settings_repositoryUrl' , 'repositoryUrl' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_logFileEnable' , 'logFileEnable' ); ?>
< ? php $this -> showConfigOption ( 'settings_logFileRotation' , 'logFileRotation' , array ( 'h' => 'hourly' , 'd' => 'daily' , 'm' => 'monthly' ), false , true ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableLargeFileUpload' , 'enableLargeFileUpload' ); ?>
< ? php $this -> showConfigText ( 'settings_partitionSize' , 'partitionSize' ); ?>
< ? php $this -> showConfigText ( 'settings_maxUploadSize' , 'maxUploadSize' ); ?>
2019-01-18 12:07:39 +00:00
< ? php $this -> showConfigCheckbox ( 'settings_enableXsendfile' , 'enableXsendfile' ); ?>
2012-12-14 07:53:13 +00:00
<!--
-- SETTINGS - SYSTEM - AUTHENTICATION
-->
2018-04-17 16:34:30 +00:00
< ? php $this -> showConfigHeadline ( 'settings_Authentication' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableGuestLogin' , 'enableGuestLogin' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableGuestAutoLogin' , 'enableGuestAutoLogin' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_restricted' , 'restricted' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableUserImage' , 'enableUserImage' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_disableSelfEdit' , 'disableSelfEdit' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enablePasswordForgotten' , 'enablePasswordForgotten' ); ?>
< ? php $this -> showConfigText ( 'settings_passwordStrength' , 'passwordStrength' ); ?>
< ? php $this -> showConfigOption ( 'settings_passwordStrengthAlgorithm' , 'passwordStrengthAlgorithm' , array ( 'simple' => 'settings_passwordStrengthAlgorithm_valsimple' , 'advanced' => 'settings_passwordStrengthAlgorithm_valadvanced' ), false , true ); ?>
< ? 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 -> showConfigText ( 'settings_quota' , 'quota' ); ?>
< ? php $this -> showConfigText ( 'settings_undelUserIds' , 'undelUserIds' ); ?>
< ? 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 ); ?>
2012-12-14 07:53:13 +00:00
<!-- TODO Connectors -->
<!--
-- SETTINGS - SYSTEM - DATABASE
-->
2018-04-17 16:34:30 +00:00
< ? php $this -> showConfigHeadline ( 'settings_Database' ); ?>
< ? php $this -> showConfigText ( 'settings_dbDriver' , 'dbDriver' ); ?>
< ? php $this -> showConfigText ( 'settings_dbHostname' , 'dbHostname' ); ?>
< ? php $this -> showConfigText ( 'settings_dbDatabase' , 'dbDatabase' ); ?>
< ? php $this -> showConfigText ( 'settings_dbUser' , 'dbUser' ); ?>
2018-04-19 11:42:20 +00:00
< ? php $this -> showConfigText ( 'settings_dbPass' , 'dbPass' , 'password' ); ?>
2012-12-14 07:53:13 +00:00
<!--
-- SETTINGS - SYSTEM - SMTP
2018-04-17 19:03:39 +00:00
-->
2018-04-19 11:42:20 +00:00
< ? php $this -> showConfigHeadline ( 'settings_SMTP' ); ?>
2018-04-17 16:34:30 +00:00
< ? php $this -> showConfigText ( 'settings_smtpServer' , 'smtpServer' ); ?>
< ? php $this -> showConfigText ( 'settings_smtpPort' , 'smtpPort' ); ?>
< ? php $this -> showConfigText ( 'settings_smtpSendFrom' , 'smtpSendFrom' ); ?>
< ? php $this -> showConfigText ( 'settings_smtpUser' , 'smtpUser' ); ?>
2018-04-19 11:42:20 +00:00
< ? php $this -> showConfigText ( 'settings_smtpPassword' , 'smtpPassword' , 'password' ); ?>
2018-11-09 16:22:33 +00:00
< ? php $this -> showConfigPlain ( htmlspecialchars ( getMLText ( 'settings_smtpSendTestMail' )), htmlspecialchars ( getMLText ( 'settings_smtpSendTestMail_desc' )), '<a class="btn sendtestmail">' . getMLText ( 'send_test_mail' ) . '</a><div><pre id="maildebug">You will see debug messages here</pre></div>' ); ?>
2018-04-19 11:42:20 +00:00
< ? php
$this -> showEndPaneContent ( 'system' , $currenttab );
2012-12-14 07:53:13 +00:00
2018-04-19 11:42:20 +00:00
$this -> showStartPaneContent ( 'advanced' , $currenttab == 'advanced' );
?>
2012-12-14 07:53:13 +00:00
<!--
-- SETTINGS - ADVANCED - DISPLAY
-->
2018-04-17 16:34:30 +00:00
< ? php $this -> showConfigHeadline ( 'settings_Display' ); ?>
< ? php $this -> showConfigText ( 'settings_siteDefaultPage' , 'siteDefaultPage' ); ?>
< ? php $this -> showConfigText ( 'settings_rootFolderID' , 'rootFolderID' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_titleDisplayHack' , 'titleDisplayHack' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_showMissingTranslations' , 'showMissingTranslations' ); ?>
2012-12-14 07:53:13 +00:00
<!--
-- SETTINGS - ADVANCED - AUTHENTICATION
-->
2018-04-17 16:34:30 +00:00
< ? php $this -> showConfigHeadline ( 'settings_Authentication' ); ?>
< ? php $this -> showConfigText ( 'settings_guestID' , 'guestID' ); ?>
< ? php $this -> showConfigText ( 'settings_adminIP' , 'adminIP' ); ?>
2012-12-14 07:53:13 +00:00
<!--
-- SETTINGS - ADVANCED - EDITION
-->
2018-04-17 16:34:30 +00:00
< ? php $this -> showConfigHeadline ( 'settings_Edition' ); ?>
< ? php $this -> showConfigOption ( 'settings_workflowMode' , 'workflowMode' , array ( 'traditional' => 'settings_workflowMode_valtraditional' , 'traditional_only_approval' => 'settings_workflowMode_valtraditional_only_approval' , 'advanced' => 'settings_workflowMode_valadvanced' ), false , true ); ?>
< ? php $this -> showConfigText ( 'settings_versioningFileName' , 'versioningFileName' ); ?>
< ? php $this -> showConfigText ( 'settings_presetExpirationDate' , 'presetExpirationDate' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_allowReviewerOnly' , 'allowReviewerOnly' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableAdminRevApp' , 'enableAdminRevApp' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableOwnerRevApp' , 'enableOwnerRevApp' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableSelfRevApp' , 'enableSelfRevApp' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableUpdateRevApp' , 'enableUpdateRevApp' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableVersionDeletion' , 'enableVersionDeletion' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableVersionModification' , 'enableVersionModification' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableDuplicateDocNames' , 'enableDuplicateDocNames' ); ?>
2019-07-01 08:50:40 +00:00
< ? php $this -> showConfigCheckbox ( 'settings_enableDuplicateSubFolderNames' , 'enableDuplicateSubFolderNames' ); ?>
2018-04-17 16:34:30 +00:00
< ? php $this -> showConfigCheckbox ( 'settings_overrideMimeType' , 'overrideMimeType' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_removeFromDropFolder' , 'removeFromDropFolder' ); ?>
2012-12-14 07:53:13 +00:00
<!--
-- SETTINGS - ADVANCED - NOTIFICATION
-->
2018-04-17 16:34:30 +00:00
< ? php $this -> showConfigHeadline ( 'settings_Notification' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableOwnerNotification' , 'enableOwnerNotification' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableNotificationAppRev' , 'enableNotificationAppRev' ); ?>
< ? php $this -> showConfigCheckbox ( 'settings_enableNotificationWorkflow' , 'enableNotificationWorkflow' ); ?>
2012-12-14 07:53:13 +00:00
<!--
-- SETTINGS - ADVANCED - SERVER
-->
2018-04-17 16:34:30 +00:00
< ? php $this -> showConfigHeadline ( 'settings_Server' ); ?>
< ? php $this -> showConfigText ( 'settings_coreDir' , 'coreDir' ); ?>
< ? php $this -> showConfigText ( 'settings_luceneClassDir' , 'luceneClassDir' ); ?>
< ? php $this -> showConfigText ( 'settings_extraPath' , 'extraPath' ); ?>
< ? php $this -> showConfigText ( 'settings_contentOffsetDir' , 'contentOffsetDir' ); ?>
< ? php $this -> showConfigText ( 'settings_maxDirID' , 'maxDirID' ); ?>
< ? php $this -> showConfigText ( 'settings_updateNotifyTime' , 'updateNotifyTime' ); ?>
< ? php $this -> showConfigText ( 'settings_maxExecutionTime' , 'maxExecutionTime' ); ?>
< ? php $this -> showConfigText ( 'settings_cmdTimeout' , 'cmdTimeout' ); ?>
2012-12-14 07:53:13 +00:00
< ? php
2017-11-21 17:12:58 +00:00
foreach ( array ( 'fulltext' , 'preview' , 'pdf' ) as $target ) {
2018-04-17 16:34:30 +00:00
$this -> showConfigHeadline ( $target . " _converters " );
2018-01-09 14:32:08 +00:00
if ( ! empty ( $settings -> _converters [ $target ])) {
foreach ( $settings -> _converters [ $target ] as $mimetype => $cmd ) {
2018-04-19 11:42:20 +00:00
$this -> showConfigPlain ( htmlspecialchars ( $mimetype ), htmlspecialchars ( $mimetype ), $this -> getTextField ( " converters[ " . $target . " ][ " . $mimetype . " ] " , htmlspecialchars ( $cmd )));
2018-01-09 14:32:08 +00:00
}
}
2018-04-19 11:42:20 +00:00
$this -> showConfigPlain ( $this -> getTextField ( " converters[ " . $target . " ][newmimetype] " , " " , '' , getMLText ( 'converter_new_mimetype' )), '' , $this -> getTextField ( " converters[ " . $target . " ][newcmd] " , " " , " " , getMLText ( 'converter_new_cmd' )));
2017-11-21 16:34:24 +00:00
}
2018-04-19 11:42:20 +00:00
$this -> showEndPaneContent ( 'advanced' , $currenttab );
2013-05-02 20:32:11 +00:00
2018-04-19 11:42:20 +00:00
$this -> showStartPaneContent ( 'extensions' , $currenttab == 'extensions' );
?>
2013-05-02 20:32:11 +00:00
<!--
-- SETTINGS - ADVANCED - DISPLAY
-->
< ? php
2018-04-17 16:34:30 +00:00
foreach ( $GLOBALS [ 'EXT_CONF' ] as $extname => $extconf ) {
2018-04-19 17:48:20 +00:00
if ( $extconf [ 'config' ]) {
2018-04-17 16:34:30 +00:00
$this -> showRawConfigHeadline ( " <a name= \" " . $extname . " \" ></a> " . $extconf [ 'title' ]);
foreach ( $extconf [ 'config' ] as $confkey => $conf ) {
2018-04-19 11:42:20 +00:00
ob_start ();
2013-05-02 20:32:11 +00:00
switch ( $conf [ 'type' ]) {
case 'checkbox' :
?>
< input type = " checkbox " name = " <?php echo " extensions [ " . $extname . " ][ " . $confkey . " ] " ; ?> " value = " 1 " < ? php if ( isset ( $settings -> _extensions [ $extname ][ $confkey ]) && $settings -> _extensions [ $extname ][ $confkey ]) echo 'checked' ; ?> />
< ? php
break ;
2017-04-20 07:57:16 +00:00
case 'select' :
if ( ! empty ( $conf [ 'options' ])) {
2018-12-18 08:03:57 +00:00
$selections = empty ( $settings -> _extensions [ $extname ][ $confkey ]) ? array () : explode ( " , " , $settings -> _extensions [ $extname ][ $confkey ]);
2017-04-20 07:57:16 +00:00
echo " <select class= \" chzn-select \" name= \" extensions[ " . $extname . " ][ " . $confkey . " ][] \" " . ( ! empty ( $conf [ 'multiple' ]) ? " multiple " : " " ) . ( ! empty ( $conf [ 'size' ]) ? " size= \" " . $conf [ 'size' ] . " \" " : " " ) . " > " ;
foreach ( $conf [ 'options' ] as $key => $opt ) {
echo " <option value= \" " . $key . " \" " ;
2018-09-25 06:54:07 +00:00
if ( in_array ( $key , $selections ))
2017-04-20 07:57:16 +00:00
echo " selected " ;
echo " > " . htmlspecialchars ( $opt ) . " </option> " ;
}
echo " </select> " ;
} elseif ( ! empty ( $conf [ 'internal' ])) {
$selections = empty ( $settings -> _extensions [ $extname ][ $confkey ]) ? array () : explode ( " , " , $settings -> _extensions [ $extname ][ $confkey ]);
2018-02-06 16:03:35 +00:00
$allowempty = empty ( $conf [ 'allow_empty' ]) ? false : $conf [ 'allow_empty' ];
2017-04-20 07:57:16 +00:00
switch ( $conf [ 'internal' ]) {
case " categories " :
$categories = $dms -> getDocumentCategories ();
if ( $categories ) {
2018-06-22 14:38:52 +00:00
echo " <select class= \" chzn-select " . ( $allowempty ? " data-allow-clear= \" true \" " : " " ) . " \" name= \" extensions[ " . $extname . " ][ " . $confkey . " ][] \" " . ( ! empty ( $conf [ 'multiple' ]) ? " multiple " : " " ) . ( ! empty ( $conf [ 'size' ]) ? " size= \" " . $conf [ 'size' ] . " \" " : " " ) . " data-placeholder= \" " . getMLText ( " select_category " ) . " \" > " ;
2018-02-06 16:03:35 +00:00
if ( $allowempty )
echo " <option value= \" \" ></option> " ;
2017-04-20 07:57:16 +00:00
foreach ( $categories as $category ) {
echo " <option value= \" " . $category -> getID () . " \" " ;
if ( in_array ( $category -> getID (), $selections ))
echo " selected " ;
echo " > " . htmlspecialchars ( $category -> getName ()) . " </option> " ;
}
echo " </select> " ;
}
break ;
case " users " :
$users = $dms -> getAllUsers ();
if ( $users ) {
2018-06-22 14:38:52 +00:00
echo " <select class= \" chzn-select " . ( $allowempty ? " data-allow-clear= \" true \" " : " " ) . " \" name= \" extensions[ " . $extname . " ][ " . $confkey . " ][] \" " . ( ! empty ( $conf [ 'multiple' ]) ? " multiple " : " " ) . ( ! empty ( $conf [ 'size' ]) ? " size= \" " . $conf [ 'size' ] . " \" " : " " ) . " data-placeholder= \" " . getMLText ( " select_user " ) . " \" > " ;
2018-02-06 16:03:35 +00:00
if ( $allowempty )
echo " <option value= \" \" ></option> " ;
2017-04-20 07:57:16 +00:00
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> " ;
}
break ;
2017-04-21 15:19:31 +00:00
case " groups " :
$recs = $dms -> getAllGroups ();
if ( $recs ) {
2018-06-22 14:38:52 +00:00
echo " <select class= \" chzn-select " . ( $allowempty ? " data-allow-clear= \" true \" " : " " ) . " \" name= \" extensions[ " . $extname . " ][ " . $confkey . " ][] \" " . ( ! empty ( $conf [ 'multiple' ]) ? " multiple " : " " ) . ( ! empty ( $conf [ 'size' ]) ? " size= \" " . $conf [ 'size' ] . " \" " : " " ) . " data-placeholder= \" " . getMLText ( " select_group " ) . " \" > " ;
2018-02-06 16:03:35 +00:00
if ( $allowempty )
echo " <option value= \" \" ></option> " ;
2017-04-21 15:19:31 +00:00
foreach ( $recs as $rec ) {
echo " <option value= \" " . $rec -> getID () . " \" " ;
if ( in_array ( $rec -> getID (), $selections ))
echo " selected " ;
echo " > " . htmlspecialchars ( $rec -> getName ()) . " </option> " ;
}
echo " </select> " ;
}
break ;
case " attributedefinitions " :
$recs = $dms -> getAllAttributeDefinitions ();
if ( $recs ) {
2018-06-22 14:38:52 +00:00
echo " <select class= \" chzn-select " . ( $allowempty ? " data-allow-clear= \" true \" " : " " ) . " \" name= \" extensions[ " . $extname . " ][ " . $confkey . " ][] \" " . ( ! empty ( $conf [ 'multiple' ]) ? " multiple " : " " ) . ( ! empty ( $conf [ 'size' ]) ? " size= \" " . $conf [ 'size' ] . " \" " : " " ) . " data-placeholder= \" " . getMLText ( " select_attribute_value " ) . " \" > " ;
2018-02-06 16:03:35 +00:00
if ( $allowempty )
echo " <option value= \" \" ></option> " ;
2017-04-21 15:19:31 +00:00
foreach ( $recs as $rec ) {
echo " <option value= \" " . $rec -> getID () . " \" " ;
if ( in_array ( $rec -> getID (), $selections ))
echo " selected " ;
echo " > " . htmlspecialchars ( $rec -> getName ()) . " </option> " ;
}
echo " </select> " ;
}
break ;
2018-08-27 06:22:39 +00:00
case " folders " :
$this -> formField ( null , $this -> getFolderChooserHtml ( " form " . $extname . $confkey , M_READ , - 1 , $selections ? $dms -> getFolder ( $selections [ 0 ]) : 0 , 'extensions[' . $extname . " ][ " . $confkey . " ] " ));
break ;
2017-04-20 07:57:16 +00:00
}
}
break ;
2013-05-02 20:32:11 +00:00
default :
2018-12-13 17:24:34 +00:00
$this -> showTextField ( " extensions[ " . $extname . " ][ " . $confkey . " ] " , isset ( $settings -> _extensions [ $extname ][ $confkey ]) ? $settings -> _extensions [ $extname ][ $confkey ] : '' , isset ( $conf [ 'type' ]) ? $conf [ 'type' ] : '' , isset ( $conf [ 'placeholder' ]) ? $conf [ 'placeholder' ] : '' );
2013-05-02 20:32:11 +00:00
}
2018-04-19 11:42:20 +00:00
$html = ob_get_clean ();
$this -> showConfigPlain ( $conf [ 'title' ], isset ( $conf [ 'help' ]) ? $conf [ 'help' ] : '' , $html );
2013-05-02 20:32:11 +00:00
}
2018-04-19 17:48:20 +00:00
}
}
2018-04-19 11:42:20 +00:00
$this -> showEndPaneContent ( 'extensions' , $currenttab );
2013-05-02 20:32:11 +00:00
?>
2012-12-14 07:53:13 +00:00
</ div >
< ? php
if ( is_writeable ( $settings -> _configFilePath )) {
?>
2013-04-19 13:22:25 +00:00
< button type = " submit " class = " btn " >< i class = " icon-save " ></ i > < ? php printMLText ( " save " ) ?> </button>
2012-12-14 07:53:13 +00:00
< ? php
}
?>
</ form >
< ? php
2016-03-15 07:30:53 +00:00
$this -> contentEnd ();
2012-12-14 07:53:13 +00:00
$this -> htmlEndPage ();
} /* }}} */
}
?>