mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
edit comment and sequence of folders can be turned off
This commit is contained in:
parent
3e1dcc3c75
commit
e95b5a971e
|
@ -5,6 +5,8 @@
|
|||
- major overhaul of notifications
|
||||
- check view access for FolderAccess and DocumentAccess
|
||||
- more settings to disable import and download of extensions
|
||||
- add new configuration for excluding sequence and comment when creating
|
||||
a folder
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.23
|
||||
|
|
|
@ -54,6 +54,7 @@ if($view) {
|
|||
$view->setParam('folder', $folder);
|
||||
$view->setParam('attrdefs', $attrdefs);
|
||||
$view->setParam('strictformcheck', $settings->_strictFormCheck);
|
||||
$view->setParam('nofolderformfields', $settings->_noFolderFormFields);
|
||||
$view->setParam('rootfolderid', $settings->_rootFolderID);
|
||||
$view->setParam('orderby', $settings->_sortFoldersDefault);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
|
|
|
@ -54,6 +54,7 @@ $(document).ready(function() {
|
|||
$attrdefs = $this->params['attrdefs'];
|
||||
$rootfolderid = $this->params['rootfolderid'];
|
||||
$strictformcheck = $this->params['strictformcheck'];
|
||||
$nofolderformfields = $this->params['nofolderformfields'];
|
||||
$orderby = $this->params['orderby'];
|
||||
|
||||
$this->htmlAddHeader('<script type="text/javascript" src="../views/'.$this->theme.'/vendors/jquery-validation/jquery.validate.js"></script>'."\n", 'js');
|
||||
|
@ -81,22 +82,35 @@ $(document).ready(function() {
|
|||
'required'=>true
|
||||
)
|
||||
);
|
||||
$this->formField(
|
||||
getMLText("comment"),
|
||||
array(
|
||||
'element'=>'textarea',
|
||||
'name'=>'comment',
|
||||
'rows'=>4,
|
||||
'cols'=>80,
|
||||
'value'=>htmlspecialchars($folder->getComment()),
|
||||
'required'=>$strictformcheck
|
||||
)
|
||||
);
|
||||
$parent = ($folder->getID() == $rootfolderid) ? false : $folder->getParent();
|
||||
if ($parent && $parent->getAccessMode($user) > M_READ) {
|
||||
$this->formField(getMLText("sequence"), $this->getSequenceChooser($parent->getSubFolders('s'), $folder->getID()).($orderby != 's' ? "<br />".getMLText('order_by_sequence_off') : ''));
|
||||
if(!$nofolderformfields || !in_array('comment', $nofolderformfields)) {
|
||||
$this->formField(
|
||||
getMLText("comment"),
|
||||
array(
|
||||
'element'=>'textarea',
|
||||
'name'=>'comment',
|
||||
'rows'=>4,
|
||||
'cols'=>80,
|
||||
'value'=>htmlspecialchars($folder->getComment()),
|
||||
'required'=>$strictformcheck
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->formField(
|
||||
null,
|
||||
array(
|
||||
'element'=>'input',
|
||||
'type'=>'hidden',
|
||||
'name'=>'comment',
|
||||
'value'=>htmlspecialchars($folder->getComment()),
|
||||
)
|
||||
);
|
||||
}
|
||||
$parent = ($folder->getID() == $rootfolderid) ? false : $folder->getParent();
|
||||
if(!$nofolderformfields || !in_array('sequence', $nofolderformfields)) {
|
||||
if ($parent && $parent->getAccessMode($user) > M_READ) {
|
||||
$this->formField(getMLText("sequence"), $this->getSequenceChooser($parent->getSubFolders('s'), $folder->getID()).($orderby != 's' ? "<br />".getMLText('order_by_sequence_off') : ''));
|
||||
}
|
||||
}
|
||||
|
||||
if($attrdefs) {
|
||||
foreach($attrdefs as $attrdef) {
|
||||
$arr = $this->callHook('editFolderAttribute', $folder, $attrdef);
|
||||
|
|
Loading…
Reference in New Issue
Block a user