Merge branch 'seeddms-5.0.x' into seeddms-5.1.x

This commit is contained in:
Uwe Steinmann 2017-01-04 17:11:39 +01:00
commit 7d8f4f54c0
33 changed files with 809 additions and 722 deletions

View File

@ -1,7 +1,7 @@
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 5.1.2 Changes in version 5.1.2
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
- merge changes up to 5.0.7 - merge changes up to 5.0.9
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 5.1.1 Changes in version 5.1.1
@ -23,6 +23,12 @@
- add document list which can be exported as an archive - add document list which can be exported as an archive
- search results can be exported - search results can be exported
--------------------------------------------------------------------------------
Changes in version 5.0.9
--------------------------------------------------------------------------------
- merged changes from 4.3.32
- add hooks for previewing documents
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 5.0.8 Changes in version 5.0.8
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -82,6 +88,11 @@
- add .xml to online file types by default - add .xml to online file types by default
- add home folder for users - add home folder for users
--------------------------------------------------------------------------------
Changes in version 4.3.32
--------------------------------------------------------------------------------
- fix saving new mimetype for fulltext search, available languages
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 4.3.31 Changes in version 4.3.31
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@ -38,7 +38,7 @@ class Controller {
$classname = "SeedDMS_Controller_".$class; $classname = "SeedDMS_Controller_".$class;
$filename = ''; $filename = '';
foreach($EXT_CONF as $extname=>$extconf) { foreach($EXT_CONF as $extname=>$extconf) {
$filename = '../ext/'.$extname.'/controllers/class.'.$class.".php"; $filename = $settings->_rootDir.'ext/'.$extname.'/controllers/class.'.$class.".php";
if(file_exists($filename)) { if(file_exists($filename)) {
break; break;
} }

View File

@ -88,7 +88,7 @@ $controller->setParam('document', $document);
$controller->setParam('index', $index); $controller->setParam('index', $index);
$controller->setParam('indexconf', $indexconf); $controller->setParam('indexconf', $indexconf);
if(!$controller->run()) { if(!$controller->run()) {
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($docname)))),getMLText("error_remove_document")); UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($docname))),getMLText("error_remove_document"));
} }
if ($notifier){ if ($notifier){

View File

@ -59,6 +59,9 @@ if ($action == "saveSettings")
$settings->_footNote = $_POST["footNote"]; $settings->_footNote = $_POST["footNote"];
$settings->_printDisclaimer = getBoolValue("printDisclaimer"); $settings->_printDisclaimer = getBoolValue("printDisclaimer");
$settings->_language = $_POST["language"]; $settings->_language = $_POST["language"];
if(empty($_POST["availablelanguages"]))
$settings->_availablelanguages = array();
else
$settings->_availablelanguages = $_POST["availablelanguages"]; $settings->_availablelanguages = $_POST["availablelanguages"];
$settings->_theme = $_POST["theme"]; $settings->_theme = $_POST["theme"];
$settings->_previewWidthList = $_POST["previewWidthList"]; $settings->_previewWidthList = $_POST["previewWidthList"];

View File

@ -58,6 +58,7 @@ if (!is_object($version)) {
$latestContent = $document->getLatestContent(); $latestContent = $document->getLatestContent();
if ($latestContent->getVersion()==$version->getVersion()) { if ($latestContent->getVersion()==$version->getVersion()) {
header("Location:../out/out.ViewDocument.php?documentid=".$document->getID()); header("Location:../out/out.ViewDocument.php?documentid=".$document->getID());
exit;
} }
$folder = $document->getFolder(); $folder = $document->getFolder();

View File

@ -59,6 +59,7 @@ if (!$document->getLatestContent()) {
*/ */
if ($document->verifyLastestContentExpriry()){ if ($document->verifyLastestContentExpriry()){
header("Location:../out/out.ViewDocument.php?documentid=".$document->getID()); header("Location:../out/out.ViewDocument.php?documentid=".$document->getID());
exit;
} }
/* Recalculate the status of a document and reload the page if the status /* Recalculate the status of a document and reload the page if the status

View File

@ -425,8 +425,9 @@ function uploadDocument($id) { /* {{{ */
fclose($handle); fclose($handle);
$finfo = finfo_open(FILEINFO_MIME_TYPE); $finfo = finfo_open(FILEINFO_MIME_TYPE);
$userfiletype = finfo_file($finfo, $temp); $userfiletype = finfo_file($finfo, $temp);
$fileType = ".".pathinfo($origfilename, PATHINFO_EXTENSION);
finfo_close($finfo); finfo_close($finfo);
$res = $mfolder->addDocument($docname, '', 0, $userobj, '', array(), $temp, $origfilename ? $origfilename : basename($temp), '.', $userfiletype, 0); $res = $mfolder->addDocument($docname, '', 0, $userobj, '', array(), $temp, $origfilename ? $origfilename : basename($temp), $fileType, $userfiletype, 0);
unlink($temp); unlink($temp);
if($res) { if($res) {
$doc = $res[0]; $doc = $res[0];

View File

@ -82,38 +82,44 @@ $(document).ready(function() {
$expdate = date('Y-m-d'); $expdate = date('Y-m-d');
?> ?>
<form action="../op/op.AddEvent.php" id="form1" name="form1" method="post"> <form class="form-horizontal" action="../op/op.AddEvent.php" id="form1" name="form1" method="post">
<table class="table-condensed">
<tr> <div class="control-group">
<td><?php printMLText("from");?>:</td> <label class="control-label"><?php printMLText("from");?>:</label>
<td><?php //$this->printDateChooser(-1, "from");?> <div class="controls"><?php //$this->printDateChooser(-1, "from");?>
<span class="input-append date span12" id="fromdate" data-date="<?php echo $expdate; ?>" data-date-format="yyyy-mm-dd"> <span class="input-append date span12" id="fromdate" data-date="<?php echo $expdate; ?>" data-date-format="yyyy-mm-dd">
<input class="span6" size="16" name="from" type="text" value="<?php echo $expdate; ?>"> <input class="span6" size="16" name="from" type="text" value="<?php echo $expdate; ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span> </span>
</td> </div>
</tr> </div>
<tr>
<td><?php printMLText("to");?>:</td> <div class="control-group">
<td><?php //$this->printDateChooser(-1, "to");?> <label class="control-label"><?php printMLText("to");?>:</label>
<div class="controls"><?php //$this->printDateChooser(-1, "to");?>
<span class="input-append date span12" id="todate" data-date="<?php echo $expdate; ?>" data-date-format="yyyy-mm-dd"> <span class="input-append date span12" id="todate" data-date="<?php echo $expdate; ?>" data-date-format="yyyy-mm-dd">
<input class="span6" size="16" name="to" type="text" value="<?php echo $expdate; ?>"> <input class="span6" size="16" name="to" type="text" value="<?php echo $expdate; ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span> </span>
</td> </div>
</tr> </div>
<tr>
<td class="inputDescription"><?php printMLText("name");?>:</td>
<td><input type="text" name="name" size="60"></td> <div class="control-group">
</tr> <label class="control-label"><?php printMLText("name");?>:</label>
<tr> <div class="controls"><input type="text" name="name" size="60"></div>
<td valign="top" class="inputDescription"><?php printMLText("comment");?>:</td> </div>
<td><textarea name="comment" rows="4" cols="80"></textarea></td>
</tr>
<tr> <div class="control-group">
<td></td><td><input class="btn" type="submit" value="<?php printMLText("add_event");?>"></td> <label class="control-label"><?php printMLText("comment");?>:</label>
</tr> <div class="controls"><textarea name="comment" rows="4" cols="80"></textarea></div>
</table> </div>
<div class="controls">
<input class="btn" type="submit" value="<?php printMLText("add_event");?>">
</div>
</form> </form>
<?php <?php
$this->contentContainerEnd(); $this->contentContainerEnd();

View File

@ -98,30 +98,37 @@ $(document).ready( function() {
$this->contentContainerStart(); $this->contentContainerStart();
?> ?>
<form action="../op/op.AddFile.php" enctype="multipart/form-data" method="post" name="form1" id="fileupload"> <form class="form-horizontal" action="../op/op.AddFile.php" enctype="multipart/form-data" method="post" name="form1" id="fileupload">
<input type="hidden" name="documentid" value="<?php print $document->getId(); ?>"> <input type="hidden" name="documentid" value="<?php print $document->getId(); ?>">
<table class="table-condensed">
<tr> <div class="control-group">
<td><?php printMLText("local_file");?>:</td> <label class="control-label"><?php printMLText("local_file");?>:</label>
<td><!-- <input type="File" name="userfile" size="60"> --> <div class="controls">
<?php <?php $this->printFileChooser('userfile', false); ?>
$this->printFileChooser('userfile', false); </div>
?> </div>
</td>
</tr>
<tr> <div class="control-group">
<td><?php printMLText("name");?>:</td> <label class="control-label"><?php printMLText("name");?>:</label>
<td><input type="text" name="name" id="name" size="60"></td> <div class="controls">
</tr> <input type="text" name="name" id="name" size="60">
<tr> </div>
<td><?php printMLText("comment");?>:</td> </div>
<td><textarea name="comment" id="comment" rows="4" cols="80"></textarea></td>
</tr>
<tr> <div class="control-group">
<td></td> <label class="control-label"><?php printMLText("comment");?>:</label>
<td><input class="btn" type="submit" value="<?php printMLText("add");?>"></td> <div class="controls">
</tr> <textarea name="comment" id="comment" rows="4" cols="80"></textarea>
</table> </div>
</div>
<div class="controls">
<input class="btn" type="submit" value="<?php printMLText("add");?>">
</div>
</form> </form>
<?php <?php
$this->contentContainerEnd(); $this->contentContainerEnd();

View File

@ -103,40 +103,43 @@ $(document).ready( function() {
$this->contentContainerStart(); $this->contentContainerStart();
?> ?>
<form action="../op/op.AddSubFolder.php" id="form1" name="form1" method="post"> <form class="form-horizontal" action="../op/op.AddSubFolder.php" id="form1" name="form1" method="post">
<?php echo createHiddenFieldWithKey('addsubfolder'); ?> <?php echo createHiddenFieldWithKey('addsubfolder'); ?>
<input type="Hidden" name="folderid" value="<?php print $folder->getId();?>"> <input type="hidden" name="folderid" value="<?php print $folder->getId();?>">
<input type="Hidden" name="showtree" value="<?php echo showtree();?>"> <input type="hidden" name="showtree" value="<?php echo showtree();?>">
<table class="table-condensed">
<tr> <div class="control-group">
<td class="inputDescription"><?php printMLText("name");?>:</td> <label class="control-label"><?php printMLText("name");?>:</label>
<td><input type="text" name="name" size="60" required></td> <div class="controls"><input type="text" name="name" size="60" required></div>
</tr> </div>
<tr>
<td class="inputDescription"><?php printMLText("comment");?>:</td> <div class="control-group">
<td><textarea name="comment" rows="4" cols="80"<?php echo $strictformcheck ? ' required' : ''; ?>></textarea></td> <label class="control-label"><?php printMLText("comment");?>:</label>
</tr> <div class="controls"><textarea name="comment" rows="4" cols="80"<?php echo $strictformcheck ? ' required' : ''; ?>></textarea></div>
<tr> </div>
<td class="inputDescription"><?php printMLText("sequence");?>:</td>
<td><?php $this->printSequenceChooser($folder->getSubFolders('s')); if($orderby != 's') echo "<br />".getMLText('order_by_sequence_off');?></td> <div class="control-group">
</tr> <label class="control-label"><?php printMLText("sequence");?>:</label>
<div class="controls"><?php $this->printSequenceChooser($folder->getSubFolders('s')); if($orderby != 's') echo "<br />".getMLText('order_by_sequence_off');?></div>
</div>
<?php <?php
$attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_folder, SeedDMS_Core_AttributeDefinition::objtype_all)); $attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_folder, SeedDMS_Core_AttributeDefinition::objtype_all));
if($attrdefs) { if($attrdefs) {
foreach($attrdefs as $attrdef) { foreach($attrdefs as $attrdef) {
?> ?>
<tr> <div class="control-group">
<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td> <label class="control-label"><?php echo htmlspecialchars($attrdef->getName()); ?>:</label>
<td><?php $this->printAttributeEditField($attrdef, '') ?></td> <div class="controls"><?php $this->printAttributeEditField($attrdef, '') ?></div>
</tr> </div>
<?php <?php
} }
} }
?> ?>
<tr>
<td></td><td><input type="submit" class="btn" value="<?php printMLText("add_subfolder");?>"></td> <div class="controls">
</tr> <input type="submit" class="btn" value="<?php printMLText("add_subfolder");?>">
</table> </div>
</form> </form>
<?php <?php
$this->contentContainerEnd(); $this->contentContainerEnd();

View File

@ -163,7 +163,7 @@ $(document).ready( function() {
<?php <?php
} }
?> ?>
<form action="../op/op.AttributeMgr.php" method="post"> <form class="form-horizontal" action="../op/op.AttributeMgr.php" method="post">
<?php <?php
if($attrdef) { if($attrdef) {
echo createHiddenFieldWithKey('editattrdef'); echo createHiddenFieldWithKey('editattrdef');
@ -178,82 +178,89 @@ $(document).ready( function() {
<?php <?php
} }
?> ?>
<table class="table-condensed"> <div class="control-group">
<tr> <label class="control-label">
<td>
<?php printMLText("attrdef_name");?>: <?php printMLText("attrdef_name");?>:
</td> </label>
<td> <div class="controls">
<input type="text" name="name" value="<?php echo $attrdef ? htmlspecialchars($attrdef->getName()) : '' ?>"> <input type="text" name="name" value="<?php echo $attrdef ? htmlspecialchars($attrdef->getName()) : '' ?>">
</td> </div>
</tr> </div>
<tr>
<td>
<div class="control-group">
<label class="control-label">
<?php printMLText("attrdef_objtype");?>: <?php printMLText("attrdef_objtype");?>:
</td> </label>
<td> <div class="controls">
<select name="objtype"><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_all ?>">All</option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_folder ?>" <?php if($attrdef && $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_folder) echo "selected"; ?>>Folder</option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_document ?>" <?php if($attrdef && $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_document) echo "selected"; ?>>Document</option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_documentcontent ?>" <?php if($attrdef && $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_documentcontent) echo "selected"; ?>>Document content</option></select> <select name="objtype"><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_all ?>"><?php printMLText('all'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_folder ?>" <?php if($attrdef && $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_folder) echo "selected"; ?>><?php printMLText('folder'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_document ?>" <?php if($attrdef && $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_document) echo "selected"; ?>><?php printMLText('document'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_documentcontent ?>" <?php if($attrdef && $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_documentcontent) echo "selected"; ?>><?php printMLText('version'); ?></option></select>
</td> </div>
</tr> </div>
<tr>
<td>
<?php printMLText("attrdef_type");?>: <div class="control-group">
</td> <label class="control-label"><?php printMLText("attrdef_type");?>:</label>
<td> <div class="controls">
<select name="type"><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_int ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_int) echo "selected"; ?>><?php printMLText('attrdef_type_int'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_float ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_float) echo "selected"; ?>><?php printMLText('attrdef_type_float'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_string ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_string) echo "selected"; ?>><?php printMLText('attrdef_type_string'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_boolean ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_boolean) echo "selected"; ?>><?php printMLText('attrdef_type_boolean'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_date ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date) echo "selected"; ?>><?php printMLText('attrdef_type_date'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_email ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_email) echo "selected"; ?>><?php printMLText('attrdef_type_email'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_url ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_url) echo "selected"; ?>><?php printMLText('attrdef_type_url'); ?></option></select> <select name="type"><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_int ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_int) echo "selected"; ?>><?php printMLText('attrdef_type_int'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_float ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_float) echo "selected"; ?>><?php printMLText('attrdef_type_float'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_string ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_string) echo "selected"; ?>><?php printMLText('attrdef_type_string'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_boolean ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_boolean) echo "selected"; ?>><?php printMLText('attrdef_type_boolean'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_date ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date) echo "selected"; ?>><?php printMLText('attrdef_type_date'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_email ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_email) echo "selected"; ?>><?php printMLText('attrdef_type_email'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_url ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_url) echo "selected"; ?>><?php printMLText('attrdef_type_url'); ?></option></select>
</td> </div>
</tr> </div>
<tr>
<td> <div class="control-group">
<label class="control-label">
<?php printMLText("attrdef_multiple");?>: <?php printMLText("attrdef_multiple");?>:
</td> </label>
<td> <div class="controls">
<input type="checkbox" value="1" name="multiple" <?php echo ($attrdef && $attrdef->getMultipleValues()) ? "checked" : "" ?>/> <input type="checkbox" value="1" name="multiple" <?php echo ($attrdef && $attrdef->getMultipleValues()) ? "checked" : "" ?>/>
</td> </div>
</tr> </div>
<tr>
<td>
<?php printMLText("attrdef_minvalues");?>: <div class="control-group">
</td> <label class="control-label"><?php printMLText("attrdef_minvalues");?>:</label>
<td> <div class="controls">
<input type="text" value="<?php echo $attrdef ? $attrdef->getMinValues() : '' ?>" name="minvalues" /> <input type="text" value="<?php echo $attrdef ? $attrdef->getMinValues() : '' ?>" name="minvalues" />
</td> </div>
</tr> </div>
<tr>
<td>
<div class="control-group">
<label class="control-label">
<?php printMLText("attrdef_maxvalues");?>: <?php printMLText("attrdef_maxvalues");?>:
</td> </label>
<td> <div class="controls">
<input type="text" value="<?php echo $attrdef ? $attrdef->getMaxValues() : '' ?>" name="maxvalues" /> <input type="text" value="<?php echo $attrdef ? $attrdef->getMaxValues() : '' ?>" name="maxvalues" />
</td> </div>
</tr> </div>
<tr>
<td>
<div class="control-group">
<label class="control-label">
<?php printMLText("attrdef_valueset");?>: <?php printMLText("attrdef_valueset");?>:
</td> </label>
<td>
<div class="controls">
<?php if($attrdef && strlen($attrdef->getValueSet()) > 30) { ?> <?php if($attrdef && strlen($attrdef->getValueSet()) > 30) { ?>
<textarea name="valueset" rows="5"><?php echo ($attrdef && $attrdef->getValueSet()) ? $attrdef->getValueSetSeparator().implode("\n".$attrdef->getValueSetSeparator(), $attrdef->getValueSetAsArray()) : '' ?></textarea> <textarea name="valueset" rows="5"><?php echo ($attrdef && $attrdef->getValueSet()) ? $attrdef->getValueSetSeparator().implode("\n".$attrdef->getValueSetSeparator(), $attrdef->getValueSetAsArray()) : '' ?></textarea>
<?php } else { ?> <?php } else { ?>
<input type="text" value="<?php echo $attrdef ? $attrdef->getValueSet() : '' ?>" name="valueset" /> <input type="text" value="<?php echo $attrdef ? $attrdef->getValueSet() : '' ?>" name="valueset" />
<?php } ?> <?php } ?>
</td> </div>
</tr> </div>
<tr>
<td>
<div class="control-group">
<label class="control-label">
<?php printMLText("attrdef_regex");?>: <?php printMLText("attrdef_regex");?>:
</td> </label>
<td> <div class="controls">
<input type="text" value="<?php echo $attrdef ? $attrdef->getRegex() : '' ?>" name="regex" /> <input type="text" value="<?php echo $attrdef ? $attrdef->getRegex() : '' ?>" name="regex" />
</td> </div>
</tr> </div>
<tr>
<td></td> <div class="controls">
<td>
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save");?></button> <button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save");?></button>
</td> </div>
</tr>
</table>
</form> </form>
<?php <?php
} /* }}} */ } /* }}} */

View File

@ -1306,8 +1306,8 @@ $('#acceptkeywords').click(function(ev) {
case SeedDMS_Core_AttributeDefinition::type_date: case SeedDMS_Core_AttributeDefinition::type_date:
$objvalue = $attribute ? (is_object($attribute) ? $attribute->getValue() : $attribute) : ''; $objvalue = $attribute ? (is_object($attribute) ? $attribute->getValue() : $attribute) : '';
?> ?>
<span class="input-append date datepicker" style="_display: inline;" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>"> <span class="input-append date datepicker" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input id="<?php echo $fieldname."_".$attrdef->getId();?>" class="span4" size="16" name="<?php echo $fieldname ?>[<?php echo $attrdef->getId() ?>]" type="text" value="<?php if($objvalue) echo $objvalue; else echo "" /*date('Y-m-d')*/; ?>"> <input id="<?php echo $fieldname."_".$attrdef->getId();?>" class="span9" size="16" name="<?php echo $fieldname ?>[<?php echo $attrdef->getId() ?>]" type="text" value="<?php if($objvalue) echo $objvalue; else echo "" /*date('Y-m-d')*/; ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span> </span>
<?php <?php

View File

@ -58,12 +58,13 @@ $(document).ready( function() {
function showCategoryForm($category) { /* {{{ */ function showCategoryForm($category) { /* {{{ */
?> ?>
<table class="table-condensed"> <div class="control-group">
<tr> <label class="control-label"></label>
<td></td><td>
<div class="controls">
<?php <?php
if($category) { if($category) {
if($category && $category->isUsed()) { if($category->isUsed()) {
?> ?>
<p><?php echo getMLText('category_in_use') ?></p> <p><?php echo getMLText('category_in_use') ?></p>
<?php <?php
@ -71,35 +72,40 @@ $(document).ready( function() {
?> ?>
<form style="display: inline-block;" method="post" action="../op/op.Categories.php" > <form style="display: inline-block;" method="post" action="../op/op.Categories.php" >
<?php echo createHiddenFieldWithKey('removecategory'); ?> <?php echo createHiddenFieldWithKey('removecategory'); ?>
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>"> <input type="hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input type="Hidden" name="action" value="removecategory"> <input type="hidden" name="action" value="removecategory">
<button class="btn" type="submit"><i class="icon-remove"></i> <?php echo getMLText("rm_document_category")?></button> <button class="btn" type="submit"><i class="icon-remove"></i> <?php echo getMLText("rm_document_category")?></button>
</form> </form>
<?php <?php
} }
} }
?> ?>
</td> </div>
</tr> </div>
<tr>
<td><?php echo getMLText("name")?>:</td>
<td> <form class="form-horizontal" style="margin-bottom: 0px;" action="../op/op.Categories.php" method="post">
<form class="form-inline" style="margin-bottom: 0px;" action="../op/op.Categories.php" method="post">
<?php if(!$category) { ?> <?php if(!$category) { ?>
<?php echo createHiddenFieldWithKey('addcategory'); ?> <?php echo createHiddenFieldWithKey('addcategory'); ?>
<input type="Hidden" name="action" value="addcategory"> <input type="hidden" name="action" value="addcategory">
<?php } else { ?> <?php } else { ?>
<?php echo createHiddenFieldWithKey('editcategory'); ?> <?php echo createHiddenFieldWithKey('editcategory'); ?>
<input type="Hidden" name="action" value="editcategory"> <input type="hidden" name="action" value="editcategory">
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>"> <input type="hidden" name="categoryid" value="<?php echo $category->getID()?>">
<?php } ?> <?php } ?>
<div class="control-group">
<label class="control-label"><?php echo getMLText("name")?>:</label>
<div class="controls">
<input name="name" type="text" value="<?php echo $category ? htmlspecialchars($category->getName()) : '' ?>">&nbsp; <input name="name" type="text" value="<?php echo $category ? htmlspecialchars($category->getName()) : '' ?>">&nbsp;
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save");?></button> <button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save");?></button>
</div>
</div>
</form> </form>
</td>
</tr>
</table>
<?php <?php
} /* }}} */ } /* }}} */

View File

@ -50,7 +50,7 @@ document.form1.newpassword.focus();
$this->pageNavigation(getMLText("change_password")); $this->pageNavigation(getMLText("change_password"));
$this->contentContainerStart(); $this->contentContainerStart();
?> ?>
<form action="../op/op.ChangePassword.php" method="post" name="form1"> <form class="form-horizontal" action="../op/op.ChangePassword.php" method="post" name="form1">
<?php <?php
if ($referuri) { if ($referuri) {
echo "<input type='hidden' name='referuri' value='".$referuri."'/>"; echo "<input type='hidden' name='referuri' value='".$referuri."'/>";
@ -59,32 +59,32 @@ document.form1.newpassword.focus();
echo "<input type='hidden' name='hash' value='".$hash."'/>"; echo "<input type='hidden' name='hash' value='".$hash."'/>";
} }
?> ?>
<table class="table-condensed">
<tr> <div class="control-group">
<td><?php printMLText("password");?>:</td> <label class="control-label"><?php printMLText("password");?>:</label>
<td><input class="pwd" type="password" rel="strengthbar" name="newpassword" id="password"></td> <div class="controls"><input class="pwd" type="password" rel="strengthbar" name="newpassword" id="password"></div>
</tr> </div>
<?php <?php
if($passwordstrength > 0) { if($passwordstrength > 0) {
?> ?>
<tr> <div class="control-group">
<td><?php printMLText("password_strength");?>:</td> <label class="control-label"><?php printMLText("password_strength");?>:</label>
<td> <div class="controls">
<div id="strengthbar" class="progress" style="width: 220px; height: 30px; margin-bottom: 8px;"><div class="bar bar-danger" style="width: 0%;"></div></div> <div id="strengthbar" class="progress" style="width: 220px; height: 30px; margin-bottom: 8px;"><div class="bar bar-danger" style="width: 0%;"></div></div>
</td> </div>
</tr> </div>
<?php <?php
} }
?> ?>
<tr> <div class="control-group">
<td><?php printMLText("confirm_pwd");?>:</td> <label class="control-label"><?php printMLText("confirm_pwd");?>:</label>
<td><input type="password" name="newpasswordrepeat" id="passwordrepeat"></td> <div class="controls"><input type="password" name="newpasswordrepeat" id="passwordrepeat"></div>
</tr> </div>
<tr> <div class="control-group">
<td></td> <label class="control-label"></label>
<td><input class="btn" type="submit" value="<?php printMLText("submit_password") ?>"></td> <div class="controls"><input class="btn" type="submit" value="<?php printMLText("submit_password") ?>"></div>
</tr> </div>
</table>
</form> </form>
<?php $this->contentContainerEnd(); ?> <?php $this->contentContainerEnd(); ?>
<p><a href="../out/out.Login.php"><?php echo getMLText("login"); ?></a></p> <p><a href="../out/out.Login.php"><?php echo getMLText("login"); ?></a></p>

View File

@ -140,21 +140,22 @@ $(document).ready( function() {
$owner = $category->getOwner(); $owner = $category->getOwner();
if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) return; if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) return;
?> ?>
<table class="table-condensed">
<tr> <div class="control-group">
<td></td> <label class="control-label"></label>
<td> <div class="controls">
<form action="../op/op.DefaultKeywords.php" method="post"> <form action="../op/op.DefaultKeywords.php" method="post">
<?php echo createHiddenFieldWithKey('removecategory'); ?> <?php echo createHiddenFieldWithKey('removecategory'); ?>
<input type="Hidden" name="action" value="removecategory"> <input type="Hidden" name="action" value="removecategory">
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>"> <input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<button type="submit" class="btn" title="<?php echo getMLText("delete")?>"><i class="icon-remove"></i> <?php printMLText("rm_default_keyword_category");?></button> <button type="submit" class="btn" title="<?php echo getMLText("delete")?>"><i class="icon-remove"></i> <?php printMLText("rm_default_keyword_category");?></button>
</form> </form>
</td> </div>
</tr> </div>
<tr>
<td><?php echo getMLText("name")?>:</td> <div class="control-group">
<td> <label class="control-label"><?php echo getMLText("name")?>:</label>
<div class="controls">
<form class="form-inline formn" action="../op/op.DefaultKeywords.php" method="post"> <form class="form-inline formn" action="../op/op.DefaultKeywords.php" method="post">
<?php echo createHiddenFieldWithKey('editcategory'); ?> <?php echo createHiddenFieldWithKey('editcategory'); ?>
<input type="hidden" name="action" value="editcategory"> <input type="hidden" name="action" value="editcategory">
@ -162,11 +163,12 @@ $(document).ready( function() {
<input name="name" class="name" type="text" value="<?php echo htmlspecialchars($category->getName()) ?>"> <input name="name" class="name" type="text" value="<?php echo htmlspecialchars($category->getName()) ?>">
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save");?></button> <button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save");?></button>
</form> </form>
</td> </div>
</tr> </div>
<tr>
<td><?php echo getMLText("default_keywords")?>:</td> <div class="control-group">
<td> <label class="control-label"><?php echo getMLText("default_keywords")?>:</label>
<div class="controls">
<?php <?php
$lists = $category->getKeywordLists(); $lists = $category->getKeywordLists();
if (count($lists) == 0) if (count($lists) == 0)
@ -192,23 +194,22 @@ $(document).ready( function() {
</form> </form>
<br> <br>
<?php } ?> <?php } ?>
</td> </div>
</tr> </div>
<tr>
<td></td> <div class="control-group">
<td> <label class="control-label"></label>
<div class="controls">
<form class="form-inline formk" action="../op/op.DefaultKeywords.php" method="post"> <form class="form-inline formk" action="../op/op.DefaultKeywords.php" method="post">
<?php echo createHiddenFieldWithKey('newkeywords'); ?> <?php echo createHiddenFieldWithKey('newkeywords'); ?>
<input type="Hidden" name="action" value="newkeywords"> <input type="Hidden" name="action" value="newkeywords">
<input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>"> <input type="Hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input type="text" class="keywords" name="keywords"> <input type="text" class="keywords" name="keywords">
<input type="submit" class="btn" value="<?php printMLText("new_default_keywords");?>"> <input type="submit" class="btn" value="<?php printMLText("new_default_keywords");?>">
</form> </form>
</td> </div>
</tr> </div>
</table>
<?php <?php
} }
} /* }}} */ } /* }}} */

View File

@ -115,13 +115,13 @@ $(document).ready( function() {
?> ?>
<br> <br>
<form action="../op/op.DocumentNotify.php" name="form1" id="form1"> <form class=form-horizontal" action="../op/op.DocumentNotify.php" name="form1" id="form1">
<input type="hidden" name="documentid" value="<?php print $document->getID()?>"> <input type="hidden" name="documentid" value="<?php print $document->getID()?>">
<input type="hidden" name="action" value="addnotify"> <input type="hidden" name="action" value="addnotify">
<table class="table-condensed">
<tr> <div class="control-group">
<td><?php printMLText("user");?>:</td> <label class="control-label"><?php printMLText("user");?>:</label>
<td> <div class="controls">
<select name="userid"> <select name="userid">
<option value="-1"><?php printMLText("select_one");?> <option value="-1"><?php printMLText("select_one");?>
<?php <?php
@ -137,11 +137,14 @@ $(document).ready( function() {
} }
?> ?>
</select> </select>
</td> </div>
</tr> </div>
<tr>
<td><?php printMLText("group");?>:</td>
<td> <div class="control-group">
<label class="control-label"><?php printMLText("group");?>:</label>
<div class="controls">
<select name="groupid"> <select name="groupid">
<option value="-1"><?php printMLText("select_one");?> <option value="-1"><?php printMLText("select_one");?>
<?php <?php
@ -153,13 +156,13 @@ $(document).ready( function() {
} }
?> ?>
</select> </select>
</td> </div>
</tr> </div>
<tr>
<td></td> <div class="controls">
<td><input type="submit" class="btn" value="<?php printMLText("add") ?>"></td> <input type="submit" class="btn" value="<?php printMLText("add") ?>">
</tr> </div>
</table>
</form> </form>
<?php <?php

View File

@ -47,27 +47,28 @@ class SeedDMS_View_EditAttributes extends SeedDMS_Bootstrap_Style {
$this->contentHeading(getMLText("edit_attributes")); $this->contentHeading(getMLText("edit_attributes"));
$this->contentContainerStart(); $this->contentContainerStart();
?> ?>
<form action="../op/op.EditAttributes.php" name="form1" method="POST"> <form class="form-horizontal" action="../op/op.EditAttributes.php" name="form1" method="POST">
<?php echo createHiddenFieldWithKey('editattributes'); ?> <?php echo createHiddenFieldWithKey('editattributes'); ?>
<input type="Hidden" name="documentid" value="<?php print $document->getID();?>"> <input type="hidden" name="documentid" value="<?php print $document->getID();?>">
<input type="Hidden" name="version" value="<?php print $version->getVersion();?>"> <input type="hidden" name="version" value="<?php print $version->getVersion();?>">
<table class="table-condensed">
<?php <?php
if($attrdefs) { if($attrdefs) {
foreach($attrdefs as $attrdef) { foreach($attrdefs as $attrdef) {
?> ?>
<tr> <div class="control-group">
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td> <label class="control-label"><?php echo htmlspecialchars($attrdef->getName()); ?></label>
<td><?php $this->printAttributeEditField($attrdef, $version->getAttribute($attrdef)) ?></td> <div class="controls">
</tr> <?php $this->printAttributeEditField($attrdef, $version->getAttribute($attrdef)) ?>
</div>
</div>
<?php <?php
} }
} }
?> ?>
<tr> <div class="controls">
<td colspan="2"><button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save") ?></button></td> <button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save") ?></button>
</tr> </div>
</table>
</form> </form>
<?php <?php
$this->contentContainerEnd(); $this->contentContainerEnd();

View File

@ -84,20 +84,19 @@ $(document).ready(function() {
$this->contentHeading(getMLText("edit_comment")); $this->contentHeading(getMLText("edit_comment"));
$this->contentContainerStart(); $this->contentContainerStart();
?> ?>
<form action="../op/op.EditComment.php" id="form1" name="form1" method="post"> <form class="form-horizontal" action="../op/op.EditComment.php" id="form1" name="form1" method="post">
<?php echo createHiddenFieldWithKey('editcomment'); ?> <?php echo createHiddenFieldWithKey('editcomment'); ?>
<input type="Hidden" name="documentid" value="<?php print $document->getID();?>"> <input type="Hidden" name="documentid" value="<?php print $document->getID();?>">
<input type="Hidden" name="version" value="<?php print $version->getVersion();?>"> <input type="Hidden" name="version" value="<?php print $version->getVersion();?>">
<table class="table-condensed"> <div class="control-group">
<tr> <label class="control-label"><?php printMLText("comment");?>:</label>
<td class="inputDescription"><?php printMLText("comment");?>:</td> <div class="controls">
<td><textarea name="comment" rows="4" cols="80"><?php print htmlspecialchars($version->getComment());?></textarea></td> <textarea name="comment" rows="4" cols="80"><?php print htmlspecialchars($version->getComment());?></textarea>
</tr> </div>
<tr> </div>
<td></td> <div class="controls">
<td><button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save") ?></button></td> <button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save") ?></button>
</tr> </div>
</table>
</form> </form>
<?php <?php
$this->contentContainerEnd(); $this->contentContainerEnd();

View File

@ -84,43 +84,46 @@ $(document).ready(function() {
$this->contentContainerStart(); $this->contentContainerStart();
?> ?>
<form action="../op/op.EditEvent.php" id="form1" name="form1" method="POST"> <form class="form-horizontal" action="../op/op.EditEvent.php" id="form1" name="form1" method="POST">
<?php echo createHiddenFieldWithKey('editevent'); ?> <?php echo createHiddenFieldWithKey('editevent'); ?>
<input type="Hidden" name="eventid" value="<?php echo (int) $event["id"]; ?>"> <input type="hidden" name="eventid" value="<?php echo (int) $event["id"]; ?>">
<table class="table-condensed"> <div class="control-group">
<tr> <label class="control-label"><?php printMLText("from");?>:</label>
<td><?php printMLText("from");?>:</td> <div class="controls">
<td><?php //$this->printDateChooser($event["start"], "from");?> <?php //$this->printDateChooser($event["start"], "from");?>
<span class="input-append date span12" id="fromdate" data-date="<?php echo date('Y-m-d', $event["start"]); ?>" data-date-format="yyyy-mm-dd"> <span class="input-append date span12" id="fromdate" data-date="<?php echo date('Y-m-d', $event["start"]); ?>" data-date-format="yyyy-mm-dd">
<input class="span6" size="16" name="from" type="text" value="<?php echo date('Y-m-d', $event["start"]); ?>"> <input class="span6" size="16" name="from" type="text" value="<?php echo date('Y-m-d', $event["start"]); ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i>
</span> </span>
</td> </div>
</tr> </div>
<tr> <div class="control-group">
<td><?php printMLText("to");?>:</td> <label class="control-label"><?php printMLText("to");?>:</label>
<td><?php //$this->printDateChooser($event["stop"], "to");?> <div class="controls">
<?php //$this->printDateChooser($event["stop"], "to");?>
<span class="input-append date span12" id="todate" data-date="<?php echo date('Y-m-d', $event["stop"]); ?>" data-date-format="yyyy-mm-dd"> <span class="input-append date span12" id="todate" data-date="<?php echo date('Y-m-d', $event["stop"]); ?>" data-date-format="yyyy-mm-dd">
<input class="span6" size="16" name="to" type="text" value="<?php echo date('Y-m-d', $event["stop"]); ?>"> <input class="span6" size="16" name="to" type="text" value="<?php echo date('Y-m-d', $event["stop"]); ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span> </span>
</td> </div>
</tr> </div>
<tr> <div class="control-group">
<td class="inputDescription"><?php printMLText("name");?>:</td> <label class="control-label"><?php printMLText("name");?>:</label>
<td><input type="text" name="name" value="<?php echo htmlspecialchars($event["name"]);?>" size="60"></td> <div class="controls">
</tr> <input type="text" name="name" value="<?php echo htmlspecialchars($event["name"]);?>" size="60">
<tr> </div>
<td valign="top" class="inputDescription"><?php printMLText("comment");?>:</td> </div>
<td><textarea name="comment" rows="4" cols="80"><?php echo htmlspecialchars($event["comment"])?></textarea></td> <div class="control-group">
</tr> <label class="control-label"><?php printMLText("comment");?>:</label>
<tr> <div class="controls">
<td></td> <textarea name="comment" rows="4" cols="80"><?php echo htmlspecialchars($event["comment"])?></textarea>
<td><button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button></td> </div>
</tr> </div>
</table> <div class="controls">
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button>
</div>
</form> </form>
<?php <?php
$this->contentContainerEnd(); $this->contentContainerEnd();

View File

@ -104,27 +104,30 @@ $(document).ready(function() {
$this->contentHeading(getMLText("edit_folder_props")); $this->contentHeading(getMLText("edit_folder_props"));
$this->contentContainerStart(); $this->contentContainerStart();
?> ?>
<form action="../op/op.EditFolder.php" id="form1" name="form1" method="post"> <form class="form-horizontal" action="../op/op.EditFolder.php" id="form1" name="form1" method="post">
<input type="Hidden" name="folderid" value="<?php print $folder->getID();?>"> <input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
<input type="Hidden" name="showtree" value="<?php echo showtree();?>"> <input type="hidden" name="showtree" value="<?php echo showtree();?>">
<table class="table-condensed"> <div class="control-group">
<tr> <label class="control-label"><?php printMLText("name");?>:</label>
<td><?php printMLText("name");?>:</td> <div class="controls">
<td><input type="text" name="name" value="<?php print htmlspecialchars($folder->getName());?>" size="60" required></td> <input type="text" name="name" value="<?php print htmlspecialchars($folder->getName());?>" size="60" required>
</tr> </div>
<tr> </div>
<td><?php printMLText("comment");?>:</td> <div class="control-group">
<td><textarea name="comment" rows="4" cols="80"<?php echo $strictformcheck ? ' required' : ''; ?>><?php print htmlspecialchars($folder->getComment());?></textarea></td> <label class="control-label"><?php printMLText("comment");?>:</label>
</tr> <div class="controls">
<textarea name="comment" rows="4" cols="80"<?php echo $strictformcheck ? ' required' : ''; ?>><?php print htmlspecialchars($folder->getComment());?></textarea>
</div>
</div>
<?php <?php
$parent = ($folder->getID() == $rootfolderid) ? false : $folder->getParent(); $parent = ($folder->getID() == $rootfolderid) ? false : $folder->getParent();
if ($parent && $parent->getAccessMode($user) > M_READ) { if ($parent && $parent->getAccessMode($user) > M_READ) {
print "<tr>"; print "<div class=\"control-group\">";
print "<td>" . getMLText("sequence") . ":</td>"; print "<label class=\"control-label\">" . getMLText("sequence") . ":</label>";
print "<td>"; print "<div class=\"controls\">";
$this->printSequenceChooser($parent->getSubFolders('s'), $folder->getID()); $this->printSequenceChooser($parent->getSubFolders('s'), $folder->getID());
if($orderby != 's') echo "<br />".getMLText('order_by_sequence_off'); if($orderby != 's') echo "<br />".getMLText('order_by_sequence_off');
print "</td></tr>\n"; print "</div></div>\n";
} }
if($attrdefs) { if($attrdefs) {
@ -132,26 +135,26 @@ $(document).ready(function() {
$arr = $this->callHook('folderEditAttribute', $folder, $attrdef); $arr = $this->callHook('folderEditAttribute', $folder, $attrdef);
if(is_array($arr)) { if(is_array($arr)) {
echo $txt; echo $txt;
echo "<tr>"; echo "<div class=\"control-group\">";
echo "<td>".$arr[0]."</td>"; echo "<label class=\"control-label\">".$arr[0]."</label>";
echo "<td>".$arr[1]."</td>"; echo "<div class=\"controls\">".$arr[1]."</div>";
echo "</tr>"; echo "</div>";
} else { } else {
?> ?>
<tr> <div class="control-group">
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td> <label class="control-label"><?php echo htmlspecialchars($attrdef->getName()); ?>:</label>
<td><?php $this->printAttributeEditField($attrdef, $folder->getAttribute($attrdef)) ?></td> <div class="controls">
</tr> <?php $this->printAttributeEditField($attrdef, $folder->getAttribute($attrdef)) ?>
</div>
</div>
<?php <?php
} }
} }
} }
?> ?>
<tr> <div class="controls">
<td></td> <button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save"); ?></button>
<td><button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save"); ?></button></td> </div>
</tr>
</table>
</form> </form>
<?php <?php
$this->contentContainerEnd(); $this->contentContainerEnd();

View File

@ -118,73 +118,84 @@ $(document).ready( function() {
$this->contentHeading(getMLText("edit_user_details")); $this->contentHeading(getMLText("edit_user_details"));
$this->contentContainerStart(); $this->contentContainerStart();
?> ?>
<form action="../op/op.EditUserData.php" enctype="multipart/form-data" method="post" id="form"> <form class="form-horizontal" action="../op/op.EditUserData.php" enctype="multipart/form-data" method="post" id="form">
<table class="table-condensed"> <div class="control-group">
<tr> <label class="control-label"><?php printMLText("current_password");?>:</label>
<td><?php printMLText("current_password");?>:</td> <div class="controls">
<td><input id="currentpwd" type="password" name="currentpwd" size="30"></td> <input id="currentpwd" type="password" name="currentpwd" size="30">
</tr> </div>
<tr> </div>
<td><?php printMLText("new_password");?>:</td> <div class="control-group">
<td><input class="pwd" type="password" rel="strengthbar" id="pwd" name="pwd" size="30"></td> <label class="control-label"><?php printMLText("new_password");?>:</label>
</tr> <div class="controls">
<input class="pwd" type="password" rel="strengthbar" id="pwd" name="pwd" size="30">
</div>
</div>
<?php <?php
if($passwordstrength) { if($passwordstrength) {
?> ?>
<tr> <div class="control-group">
<td><?php printMLText("password_strength");?>:</td> <label class="control-label"><?php printMLText("password_strength");?>:</label>
<td> <div class="controls">
<div id="strengthbar" class="progress" style="width: 220px; height: 30px; margin-bottom: 8px;"><div class="bar bar-danger" style="width: 0%;"></div></div> <div id="strengthbar" class="progress" style="width: 220px; height: 30px; margin-bottom: 8px;"><div class="bar bar-danger" style="width: 0%;"></div></div>
</td> </div>
</tr> </div>
<?php <?php
} }
?> ?>
<tr> <div class="control-group">
<td><?php printMLText("confirm_pwd");?>:</td> <label class="control-label"><?php printMLText("confirm_pwd");?>:</label>
<td><input id="pwdconf" type="Password" id="pwdconf" name="pwdconf" size="30"></td> <div class="controls">
</tr> <input id="pwdconf" type="Password" id="pwdconf" name="pwdconf" size="30">
<tr> </div>
<td><?php printMLText("name");?>:</td> </div>
<td><input type="text" id="fullname" name="fullname" value="<?php print htmlspecialchars($user->getFullName());?>" size="30"></td> <div class="control-group">
</tr> <label class="control-label"><?php printMLText("name");?>:</label>
<tr> <div class="controls">
<td><?php printMLText("email");?>:</td> <input type="text" id="fullname" name="fullname" value="<?php print htmlspecialchars($user->getFullName());?>" size="30">
<td><input type="text" id="email" name="email" value="<?php print htmlspecialchars($user->getEmail());?>" size="30"></td> </div>
</tr> </div>
<tr> <div class="control-group">
<td><?php printMLText("comment");?>:</td> <label class="control-label"><?php printMLText("email");?>:</label>
<td><textarea name="comment" rows="4" cols="80"><?php print htmlspecialchars($user->getComment());?></textarea></td> <div class="controls">
</tr> <input type="text" id="email" name="email" value="<?php print htmlspecialchars($user->getEmail());?>" size="30">
</div>
</div>
<div class="control-group">
<label class="control-label"><?php printMLText("comment");?>:</label>
<div class="controls">
<textarea name="comment" rows="4" cols="80"><?php print htmlspecialchars($user->getComment());?></textarea>
</div>
</div>
<?php <?php
if ($enableuserimage){ if ($enableuserimage){
?> ?>
<tr> <div class="control-group">
<td><?php printMLText("user_image");?>:</td> <label class="control-label"><?php printMLText("user_image");?>:</label>
<td> <div class="controls">
<?php <?php
if ($user->hasImage()) if ($user->hasImage())
print "<img src=\"".$httproot . "out/out.UserImage.php?userid=".$user->getId()."\">"; print "<img src=\"".$httproot . "out/out.UserImage.php?userid=".$user->getId()."\">";
else printMLText("no_user_image"); else printMLText("no_user_image");
?> ?>
</td> </div>
</tr> </div>
<tr> <div class="control-group">
<td><?php printMLText("new_user_image");?>:</td> <label class="control-label"><?php printMLText("new_user_image");?>:</label>
<td> <div class="controls">
<?php <?php
$this->printFileChooser('userfile', false, "image/jpeg"); $this->printFileChooser('userfile', false, "image/jpeg");
?> ?>
</td> </div>
</tr> </div>
<?php <?php
} }
if ($enablelanguageselector){ if ($enablelanguageselector){
?> ?>
<tr> <div class="control-group">
<td><?php printMLText("language");?>:</td> <label class="control-label"><?php printMLText("language");?>:</label>
<td> <div class="controls">
<select name="language"> <select name="language">
<?php <?php
$languages = getLanguages(); $languages = getLanguages();
@ -193,15 +204,15 @@ $(document).ready( function() {
} }
?> ?>
</select> </select>
</td> </div>
</tr> </div>
<?php <?php
} }
if ($enablethemeselector){ if ($enablethemeselector){
?> ?>
<tr> <div class="control-group">
<td><?php printMLText("theme");?>:</td> <label class="control-label"><?php printMLText("theme");?>:</label>
<td> <div class="controls">
<select name="theme"> <select name="theme">
<?php <?php
$themes = UI::getStyles(); $themes = UI::getStyles();
@ -210,16 +221,14 @@ $(document).ready( function() {
} }
?> ?>
</select> </select>
</td> </div>
</tr> </div>
<?php <?php
} }
?> ?>
<tr> <div class="controls">
<td></td> <button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save"); ?></button>
<td><button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save"); ?></button></td> </div>
</tr>
</table>
</form> </form>
<?php <?php

View File

@ -158,8 +158,8 @@ $(document).ready(function() {
?> ?>
<form class="form-inline" action="../op/op.FolderAccess.php"> <form class="form-inline" action="../op/op.FolderAccess.php">
<?php echo createHiddenFieldWithKey('folderaccess'); ?> <?php echo createHiddenFieldWithKey('folderaccess'); ?>
<input type="Hidden" name="folderid" value="<?php print $folder->getID();?>"> <input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
<input type="Hidden" name="action" value="setdefault"> <input type="hidden" name="action" value="setdefault">
<?php $this->printAccessModeSelection($folder->getDefaultAccess()); ?> <?php $this->printAccessModeSelection($folder->getDefaultAccess()); ?>
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button> <button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button>
</form> </form>
@ -179,9 +179,9 @@ $(document).ready(function() {
print "<td>". htmlspecialchars($userObj->getFullName()) . "</td>\n"; print "<td>". htmlspecialchars($userObj->getFullName()) . "</td>\n";
print "<form action=\"../op/op.FolderAccess.php\">\n"; print "<form action=\"../op/op.FolderAccess.php\">\n";
echo createHiddenFieldWithKey('folderaccess')."\n"; echo createHiddenFieldWithKey('folderaccess')."\n";
print "<input type=\"Hidden\" name=\"folderid\" value=\"".$folder->getID()."\">\n"; print "<input type=\"hidden\" name=\"folderid\" value=\"".$folder->getID()."\">\n";
print "<input type=\"Hidden\" name=\"action\" value=\"editaccess\">\n"; print "<input type=\"hidden\" name=\"action\" value=\"editaccess\">\n";
print "<input type=\"Hidden\" name=\"userid\" value=\"".$userObj->getID()."\">\n"; print "<input type=\"hidden\" name=\"userid\" value=\"".$userObj->getID()."\">\n";
print "<td>\n"; print "<td>\n";
$this->printAccessModeSelection($userAccess->getMode()); $this->printAccessModeSelection($userAccess->getMode());
print "</td>\n"; print "</td>\n";
@ -191,9 +191,9 @@ $(document).ready(function() {
print "</form>\n"; print "</form>\n";
print "<form action=\"../op/op.FolderAccess.php\">\n"; print "<form action=\"../op/op.FolderAccess.php\">\n";
echo createHiddenFieldWithKey('folderaccess')."\n"; echo createHiddenFieldWithKey('folderaccess')."\n";
print "<input type=\"Hidden\" name=\"folderid\" value=\"".$folder->getID()."\">\n"; print "<input type=\"hidden\" name=\"folderid\" value=\"".$folder->getID()."\">\n";
print "<input type=\"Hidden\" name=\"action\" value=\"delaccess\">\n"; print "<input type=\"hidden\" name=\"action\" value=\"delaccess\">\n";
print "<input type=\"Hidden\" name=\"userid\" value=\"".$userObj->getID()."\">\n"; print "<input type=\"hidden\" name=\"userid\" value=\"".$userObj->getID()."\">\n";
print "<td>\n"; print "<td>\n";
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button>"; print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button>";
print "</td>\n"; print "</td>\n";
@ -209,9 +209,9 @@ $(document).ready(function() {
print "<td>". htmlspecialchars($groupObj->getName()) . "</td>"; print "<td>". htmlspecialchars($groupObj->getName()) . "</td>";
print "<form action=\"../op/op.FolderAccess.php\">"; print "<form action=\"../op/op.FolderAccess.php\">";
echo createHiddenFieldWithKey('folderaccess')."\n"; echo createHiddenFieldWithKey('folderaccess')."\n";
print "<input type=\"Hidden\" name=\"folderid\" value=\"".$folder->getID()."\">"; print "<input type=\"hidden\" name=\"folderid\" value=\"".$folder->getID()."\">";
print "<input type=\"Hidden\" name=\"action\" value=\"editaccess\">"; print "<input type=\"hidden\" name=\"action\" value=\"editaccess\">";
print "<input type=\"Hidden\" name=\"groupid\" value=\"".$groupObj->getID()."\">"; print "<input type=\"hidden\" name=\"groupid\" value=\"".$groupObj->getID()."\">";
print "<td>"; print "<td>";
$this->printAccessModeSelection($groupAccess->getMode()); $this->printAccessModeSelection($groupAccess->getMode());
print "</td>\n"; print "</td>\n";
@ -221,9 +221,9 @@ $(document).ready(function() {
print "</form>"; print "</form>";
print "<form action=\"../op/op.FolderAccess.php\">\n"; print "<form action=\"../op/op.FolderAccess.php\">\n";
echo createHiddenFieldWithKey('folderaccess')."\n"; echo createHiddenFieldWithKey('folderaccess')."\n";
print "<input type=\"Hidden\" name=\"folderid\" value=\"".$folder->getID()."\">\n"; print "<input type=\"hidden\" name=\"folderid\" value=\"".$folder->getID()."\">\n";
print "<input type=\"Hidden\" name=\"action\" value=\"delaccess\">\n"; print "<input type=\"hidden\" name=\"action\" value=\"delaccess\">\n";
print "<input type=\"Hidden\" name=\"groupid\" value=\"".$groupObj->getID()."\">\n"; print "<input type=\"hidden\" name=\"groupid\" value=\"".$groupObj->getID()."\">\n";
print "<td>"; print "<td>";
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button>"; print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button>";
print "</td>\n"; print "</td>\n";
@ -236,8 +236,8 @@ $(document).ready(function() {
?> ?>
<form action="../op/op.FolderAccess.php" id="form1" name="form1"> <form action="../op/op.FolderAccess.php" id="form1" name="form1">
<?php echo createHiddenFieldWithKey('folderaccess'); ?> <?php echo createHiddenFieldWithKey('folderaccess'); ?>
<input type="Hidden" name="folderid" value="<?php print $folder->getID()?>"> <input type="hidden" name="folderid" value="<?php print $folder->getID()?>">
<input type="Hidden" name="action" value="addaccess"> <input type="hidden" name="action" value="addaccess">
<table class="table-condensed"> <table class="table-condensed">
<tr> <tr>
<td><?php printMLText("user");?>:</td> <td><?php printMLText("user");?>:</td>

View File

@ -153,7 +153,7 @@ $(document).ready( function() {
$allUsers = $this->params['allusers']; $allUsers = $this->params['allusers'];
$groups = $this->params['allgroups']; $groups = $this->params['allgroups'];
?> ?>
<form action="../op/op.GroupMgr.php" name="form_1" id="form_1" method="post"> <form class="form-horizontal" action="../op/op.GroupMgr.php" name="form_1" id="form_1" method="post">
<?php <?php
if($group) { if($group) {
echo createHiddenFieldWithKey('editgroup'); echo createHiddenFieldWithKey('editgroup');
@ -168,30 +168,34 @@ $(document).ready( function() {
<?php <?php
} }
?> ?>
<table class="table-condensed">
<?php <?php
if($group && $this->check_access('RemoveGroup')) { if($group && $this->check_access('RemoveGroup')) {
?> ?>
<tr> <div class="control-group">
<td></td> <div class="controls">
<td><?php echo $this->html_link('RemoveGroup', array('groupid'=>$group->getID()), array('class'=>'btn'), '<i class="icon-remove"></i> '.getMLText("rm_group"), false); ?></td> <?php echo $this->html_link('RemoveGroup', array('groupid'=>$group->getID()), array('class'=>'btn'), '<i class="icon-remove"></i> '.getMLText("rm_group"), false); ?>
</tr> </div>
</div>
<?php <?php
} }
?> ?>
<tr> <div class="control-group">
<td><?php printMLText("name");?>:</td> <label class="control-label"><?php printMLText("name");?>:</label>
<td><input type="text" name="name" id="name" value="<?php print $group ? htmlspecialchars($group->getName()) : '';?>"></td> <div class="controls">
</tr> <input type="text" name="name" id="name" value="<?php print $group ? htmlspecialchars($group->getName()) : '';?>">
<tr> </div>
<td><?php printMLText("comment");?>:</td> </div>
<td><textarea name="comment" id="comment" rows="4" cols="50"><?php print $group ? htmlspecialchars($group->getComment()) : '';?></textarea></td> <div class="control-group">
</tr> <label class="control-label"><?php printMLText("comment");?>:</label>
<tr> <div class="controls">
<td></td> <textarea name="comment" id="comment" rows="4" cols="50"><?php print $group ? htmlspecialchars($group->getComment()) : '';?></textarea>
<td><button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button></td> </div>
</tr> </div>
</table> <div class="controls">
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button>
</div>
</form> </form>
<?php <?php
if($group) { if($group) {

View File

@ -126,13 +126,13 @@ $(document).ready( function() {
<div class="control-group"> <div class="control-group">
<label class="control-label" for="login"><?php printMLText("user_login");?>:</label> <label class="control-label" for="login"><?php printMLText("user_login");?>:</label>
<div class="controls"> <div class="controls">
<input type="text" id="login" name="login" placeholder="login" required> <input type="text" id="login" name="login" placeholder="login" autocomplete="off" required>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="pwd"><?php printMLText("password");?>:</label> <label class="control-label" for="pwd"><?php printMLText("password");?>:</label>
<div class="controls"> <div class="controls">
<input type="Password" id="pwd" name="pwd" required> <input type="Password" id="pwd" name="pwd" autocomplete="off" required>
</div> </div>
</div> </div>
<?php if($enable2factauth) { ?> <?php if($enable2factauth) { ?>

View File

@ -51,20 +51,19 @@ class SeedDMS_View_MoveFolder extends SeedDMS_Bootstrap_Style {
$this->contentContainerStart(); $this->contentContainerStart();
?> ?>
<form action="../op/op.MoveFolder.php" name="form1"> <form class="form-horizontal" action="../op/op.MoveFolder.php" name="form1">
<input type="hidden" name="folderid" value="<?php print $folder->getID();?>"> <input type="hidden" name="folderid" value="<?php print $folder->getID();?>">
<input type="hidden" name="showtree" value="<?php echo showtree();?>"> <input type="hidden" name="showtree" value="<?php echo showtree();?>">
<table class="table-condensed"> <div class="control-group">
<tr> <label class="control-label"><?php printMLText("choose_target_folder");?>:</label>
<td><?php printMLText("choose_target_folder");?>:</td> <div class="controls">
<td><?php $this->printFolderChooserHtml("form1", M_READWRITE, $folder->getID(), $target);?></td> <?php $this->printFolderChooserHtml("form1", M_READWRITE, $folder->getID(), $target);?>
</tr> </div>
<tr> </div>
<td></td> <div class="controls">
<td><input class="btn" type="submit" value="<?php printMLText("move_folder"); ?>"></td> <input class="btn" type="submit" value="<?php printMLText("move_folder"); ?>">
</tr> </div>
</table> </form>
</form>
<?php <?php

View File

@ -84,27 +84,32 @@ $(document).ready(function() {
// Display the Review form. // Display the Review form.
?> ?>
<form method="post" action="../op/op.OverrideContentStatus.php" id="form1" name="form1"> <form class="form-horizontal" method="post" action="../op/op.OverrideContentStatus.php" id="form1" name="form1">
<table class="table-condensed"> <div class="control-group">
<tr><td><?php echo(printMLText("comment")); ?>:</td> <label class="control-label"><?php echo(printMLText("comment"));?>:</label>
<td><textarea name="comment" cols="40" rows="4"></textarea> <div class="controls">
</td></tr> <textarea name="comment" cols="40" rows="4"></textarea>
<tr><td><?php echo(printMLText("status")); ?>:</td> </div>
<td><select name="overrideStatus"> </div>
<option value=''></option> <div class="control-group">
<?php <label class="control-label"><?php echo(printMLText("status")); ?>:</label>
<div class="controls">
<select name="overrideStatus">
<option value=''></option>
<?php
if ($overallStatus["status"] != S_RELEASED) echo "<option value='".S_RELEASED."'>".getOverallStatusText(S_RELEASED)."</option>"; if ($overallStatus["status"] != S_RELEASED) echo "<option value='".S_RELEASED."'>".getOverallStatusText(S_RELEASED)."</option>";
if ($overallStatus["status"] != S_OBSOLETE) echo "<option value='".S_OBSOLETE."'>".getOverallStatusText(S_OBSOLETE)."</option>"; if ($overallStatus["status"] != S_OBSOLETE) echo "<option value='".S_OBSOLETE."'>".getOverallStatusText(S_OBSOLETE)."</option>";
if ($overallStatus["status"] != S_DRAFT) echo "<option value='".S_DRAFT."'>".getOverallStatusText(S_DRAFT)."</option>"; if ($overallStatus["status"] != S_DRAFT) echo "<option value='".S_DRAFT."'>".getOverallStatusText(S_DRAFT)."</option>";
?> ?>
</select> </select>
</td></tr><tr><td></td><td> </div></div>
<input type='hidden' name='documentid' value='<?php echo $document->getID() ?>'/> <div class="controls">
<input type='hidden' name='version' value='<?php echo $content->getVersion() ?>'/> <input type='hidden' name='documentid' value='<?php echo $document->getID() ?>'/>
<input type='submit' class="btn" name='overrideContentStatus' value='<?php echo(printMLText("update")); ?>'/> <input type='hidden' name='version' value='<?php echo $content->getVersion() ?>'/>
</td></tr></table> <input type='submit' class="btn" name='overrideContentStatus' value='<?php echo(printMLText("update")); ?>'/>
</div>
</form> </form>
<?php <?php
$this->contentContainerEnd(); $this->contentContainerEnd();

View File

@ -73,27 +73,31 @@ document.form1.email.focus();
?> ?>
<?php $this->contentContainerStart(); ?> <?php $this->contentContainerStart(); ?>
<form action="../op/op.PasswordForgotten.php" method="post" id="form1" name="form1"> <form class="form-horizontal" action="../op/op.PasswordForgotten.php" method="post" id="form1" name="form1">
<?php <?php
if ($referrer) { if ($referrer) {
echo "<input type='hidden' name='referuri' value='".$referrer."'/>"; echo "<input type='hidden' name='referuri' value='".$referrer."'/>";
} }
?> ?>
<p><?php printMLText("password_forgotten_text"); ?></p> <p><?php printMLText("password_forgotten_text"); ?></p>
<table class="table-condensed">
<tr> <div class="control-group">
<td><?php printMLText("login");?>:</td> <label class="control-label"><?php printMLText("login");?>:</label>
<td><input type="text" name="login" id="login"></td> <div class="controls">
</tr> <input type="text" name="login" id="login">
<tr> </div>
<td><?php printMLText("email");?>:</td> </div>
<td><input type="text" name="email" id="email"></td> <div class="control-group">
</tr> <label class="control-label"><?php printMLText("email");?>:</label>
<tr> <div class="controls">
<td></td> <input type="text" name="email" id="email">
<td><input class="btn" type="submit" value="<?php printMLText("submit_password_forgotten") ?>"></td> </div>
</tr> </div>
</table>
<div class="controls">
<input class="btn" type="submit" value="<?php printMLText("submit_password_forgotten") ?>">
</div>
</form> </form>
<?php $this->contentContainerEnd(); ?> <?php $this->contentContainerEnd(); ?>
<p><a href="../out/out.Login.php"><?php echo getMLText("login"); ?></a></p> <p><a href="../out/out.Login.php"><?php echo getMLText("login"); ?></a></p>

View File

@ -76,17 +76,17 @@ $(document).ready( function() {
$workflows = $dms->getAllWorkflows(); $workflows = $dms->getAllWorkflows();
if($workflows) { if($workflows) {
?> ?>
<form action="../op/op.SetWorkflow.php" method="post" name="form1"> <form class="form-horizontal" action="../op/op.SetWorkflow.php" method="post" name="form1">
<?php echo createHiddenFieldWithKey('setworkflow'); ?> <?php echo createHiddenFieldWithKey('setworkflow'); ?>
<input type="hidden" name="documentid" value="<?php print $document->getID(); ?>"> <input type="hidden" name="documentid" value="<?php print $document->getID(); ?>">
<input type="hidden" name="version" value="<?php print $latestContent->getVersion(); ?>"> <input type="hidden" name="version" value="<?php print $latestContent->getVersion(); ?>">
<input type="hidden" name="showtree" value="<?php echo showtree();?>"> <input type="hidden" name="showtree" value="<?php echo showtree();?>">
<table class="table-condensed">
<tr> <div class="control-group">
<td> <label class="control-label">
<div class="cbSelectTitle"><?php printMLText("workflow");?>:</div> <div class="cbSelectTitle"><?php printMLText("workflow");?>:</div>
</td> </label>
<td> <div class="controls">
<?php <?php
echo "<select id=\"selector\" class=\"_chzn-select-deselect\" name=\"workflow\" data-placeholder=\"".getMLText('select_workflow')."\">"; echo "<select id=\"selector\" class=\"_chzn-select-deselect\" name=\"workflow\" data-placeholder=\"".getMLText('select_workflow')."\">";
$mandatoryworkflow = $user->getMandatoryWorkflow(); $mandatoryworkflow = $user->getMandatoryWorkflow();
@ -99,14 +99,13 @@ $(document).ready( function() {
} }
echo "</select>"; echo "</select>";
?> ?>
</td> </div>
</tr> </div>
<tr>
<td> <div class="controls">
</td> <input type="submit" class="btn" value="<?php printMLText("set_workflow");?>">
<td><input type="submit" class="btn" value="<?php printMLText("set_workflow");?>"></td> </div>
</tr>
</table>
</form> </form>
<?php <?php
} else { } else {

View File

@ -76,9 +76,12 @@ $(document).ready(function() {
$this->contentHeading(getMLText("edit_default_keywords")); $this->contentHeading(getMLText("edit_default_keywords"));
?> ?>
<div class="row-fluid"> <div class="row-fluid">
<div class="span4"> <div class="span4">
<div class="well"> <div class="well">
<?php echo getMLText("selection")?>: <form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="login"><?php printMLText("selection");?>:</label>
<div class="controls">
<select id="selector"> <select id="selector">
<option value="-1"><?php echo getMLText("choose_category")?> <option value="-1"><?php echo getMLText("choose_category")?>
<option value="0"><?php echo getMLText("new_default_keyword_category")?> <option value="0"><?php echo getMLText("new_default_keyword_category")?>
@ -97,61 +100,61 @@ $(document).ready(function() {
} }
?> ?>
</select> </select>
</div> </div>
</div> </div>
<div class="span8">
<div class="well">
<table class="table-condensed"><tr>
<td id="keywords0" style="display : none;">
<form action="../op/op.UserDefaultKeywords.php" method="post" name="addcategory">
<input type="hidden" name="action" value="addcategory">
<table class="table-condensed">
<tr>
<td><?php printMLText("name");?>:</td>
<td><input type="text" name="name"></td>
</tr>
<tr>
<td></td><td><input type="submit" class="btn" value="<?php printMLText("new_default_keyword_category"); ?>"></td>
</tr>
</table>
</form> </form>
</td> </div>
</div>
<div class="span8">
<div class="well">
<div id="keywords0" style="display : none;">
<form class="form-horizontal" action="../op/op.UserDefaultKeywords.php" method="post" name="addcategory">
<input type="hidden" name="action" value="addcategory">
<div class="control-group">
<label class="control-label"><?php printMLText("name");?>:</label>
<div class="controls">
<input type="text" name="name">
</div>
</div>
<div class="controls">
<input type="submit" class="btn" value="<?php printMLText("new_default_keyword_category"); ?>">
</div>
</form>
</div>
<?php <?php
foreach ($categories as $category) { foreach ($categories as $category) {
$owner = $category->getOwner(); $owner = $category->getOwner();
if ($owner->getID() != $user->getID()) continue; if ($owner->getID() != $user->getID()) continue;
print "<td id=\"keywords".$category->getID()."\" style=\"display : none;\">"; print "<div id=\"keywords".$category->getID()."\" style=\"display : none;\">";
?> ?>
<table class="table-condensed"> <div class="controls">
<tr> <form class="form-horizontal" action="../op/op.UserDefaultKeywords.php" method="post">
<td></td>
<td>
<form action="../op/op.UserDefaultKeywords.php" method="post">
<?php echo createHiddenFieldWithKey('removecategory'); ?> <?php echo createHiddenFieldWithKey('removecategory'); ?>
<input type="hidden" name="action" value="removecategory"> <input type="hidden" name="action" value="removecategory">
<input type="hidden" name="categoryid" value="<?php echo $category->getID()?>"> <input type="hidden" name="categoryid" value="<?php echo $category->getID()?>">
<button type="submit" class="btn" title="<?php echo getMLText("delete")?>"><i class="icon-remove"></i> <?php printMLText("rm_default_keyword_category");?></button> <button type="submit" class="btn" title="<?php echo getMLText("delete")?>"><i class="icon-remove"></i> <?php printMLText("rm_default_keyword_category");?></button>
</form> </form>
</td> </div>
</tr>
<tr>
<td><?php echo getMLText("name")?>:</td>
<td>
<form class="form-inline" action="../op/op.UserDefaultKeywords.php" method="post" name="<?php echo "category".$category->getID()?>"> <form class="form-inline" action="../op/op.UserDefaultKeywords.php" method="post" name="<?php echo "category".$category->getID()?>">
<div class="control-group">
<label class="control-label"><?php echo getMLText("name")?>:</label>
<div class="controls">
<?php echo createHiddenFieldWithKey('editcategory'); ?> <?php echo createHiddenFieldWithKey('editcategory'); ?>
<input type="hidden" name="action" value="editcategory"> <input type="hidden" name="action" value="editcategory">
<input type="hidden" name="categoryid" value="<?php echo $category->getID()?>"> <input type="hidden" name="categoryid" value="<?php echo $category->getID()?>">
<input name="name" type="text" value="<?php echo htmlspecialchars($category->getName())?>"> <input name="name" type="text" value="<?php echo htmlspecialchars($category->getName())?>">
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button> <button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button>
</div>
</div>
</form> </form>
</td> <div class="control-group">
</tr> <label class="control-label"><?php echo getMLText("default_keywords")?>:</label>
<tr> <div class="controls">
<td><?php echo getMLText("default_keywords")?>:</td>
<td>
<?php <?php
$lists = $category->getKeywordLists(); $lists = $category->getKeywordLists();
if (count($lists) == 0) if (count($lists) == 0)
@ -175,11 +178,9 @@ $(document).ready(function() {
</form> </form>
<br> <br>
<?php } ?> <?php } ?>
</td> </div>
</tr> </div>
<tr> <div class="controls">
<td></td>
<td>
<form class="form-inline" action="../op/op.UserDefaultKeywords.php" method="post" name="<?php echo $category->getID().".add"?>"> <form class="form-inline" action="../op/op.UserDefaultKeywords.php" method="post" name="<?php echo $category->getID().".add"?>">
<?php echo createHiddenFieldWithKey('newkeywords'); ?> <?php echo createHiddenFieldWithKey('newkeywords'); ?>
<input type="hidden" name="action" value="newkeywords"> <input type="hidden" name="action" value="newkeywords">
@ -187,13 +188,10 @@ $(document).ready(function() {
<input type="text" name="keywords"> <input type="text" name="keywords">
<input type="submit" class="btn" value="<?php printMLText("new_default_keywords");?>"> <input type="submit" class="btn" value="<?php printMLText("new_default_keywords");?>">
</form> </form>
</td> </div>
</tr>
</table> </div>
</td>
<?php } ?> <?php } ?>
</tr></table>
</div> </div>
</div> </div>
</div> </div>

View File

@ -165,141 +165,12 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
$this->printDocumentChooserJs("form1"); $this->printDocumentChooserJs("form1");
} /* }}} */ } /* }}} */
function preview() { /* {{{ */ function documentInfos() { /* {{{ */
$document = $this->params['document'];
$timeout = $this->params['timeout'];
$showfullpreview = $this->params['showFullPreview'];
$converttopdf = $this->params['convertToPdf'];
$cachedir = $this->params['cachedir'];
if(!$showfullpreview)
return;
$accessop = $this->params['accessobject'];
if($accessop->check_controller_access('Download', array('action'=>'version'))) {
$latestContent = $document->getLatestContent();
switch($latestContent->getMimeType()) {
case 'audio/mpeg':
case 'audio/mp3':
case 'audio/ogg':
case 'audio/wav':
$this->contentHeading(getMLText("preview"));
?>
<audio controls style="width: 100%;">
<source src="../op/op.Download.php?documentid=<?php echo $document->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" type="audio/mpeg">
</audio>
<?php
break;
case 'application/pdf':
$this->contentHeading(getMLText("preview"));
?>
<iframe src="../pdfviewer/web/viewer.html?file=<?php echo urlencode('../../op/op.Download.php?documentid='.$document->getID().'&version='.$latestContent->getVersion()); ?>" width="100%" height="700px"></iframe>
<?php
break;
case 'image/svg+xml':
$this->contentHeading(getMLText("preview"));
?>
<img src="../op/op.Download.php?documentid=<?php echo $document->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" width="100%">
<?php
break;
default:
break;
}
if($converttopdf) {
$pdfpreviewer = new SeedDMS_Preview_PdfPreviewer($cachedir, $timeout);
if($pdfpreviewer->hasConverter($latestContent->getMimeType())) {
$this->contentHeading(getMLText("preview"));
?>
<iframe src="../pdfviewer/web/viewer.html?file=<?php echo urlencode('../../op/op.PdfPreview.php?documentid='.$document->getID().'&version='.$latestContent->getVersion()); ?>" width="100%" height="700px"></iframe>
<?php
}
}
}
} /* }}} */
function show() { /* {{{ */
parent::show();
$dms = $this->params['dms']; $dms = $this->params['dms'];
$user = $this->params['user']; $user = $this->params['user'];
$folder = $this->params['folder'];
$document = $this->params['document']; $document = $this->params['document'];
$accessop = $this->params['accessobject'];
$viewonlinefiletypes = $this->params['viewonlinefiletypes'];
$enableownerrevapp = $this->params['enableownerrevapp'];
$enableownerreceipt = $this->params['enableownerreceipt'];
$workflowmode = $this->params['workflowmode'];
$cachedir = $this->params['cachedir'];
$previewwidthlist = $this->params['previewWidthList'];
$previewwidthdetail = $this->params['previewWidthDetail'];
$previewconverters = $this->params['previewConverters'];
$checkoutdir = $this->params['checkOutDir']; $checkoutdir = $this->params['checkOutDir'];
$documentid = $document->getId();
$currenttab = $this->params['currenttab'];
$timeout = $this->params['timeout'];
$versions = $document->getContent();
$this->htmlAddHeader('<link href="../styles/'.$this->theme.'/timeline/timeline.css" rel="stylesheet">'."\n", 'css');
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/timeline/timeline-min.js"></script>'."\n", 'js');
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/timeline/timeline-locales.js"></script>'."\n", 'js');
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder);
$this->contentStart();
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
if ($document->isLocked()) {
$lockingUser = $document->getLockingUser();
$txt = $this->callHook('documentIsLocked', $document, $lockingUser);
if(is_string($txt))
echo $txt;
else {
?>
<div class="alert alert-warning">
<?php printMLText("lock_message", array("email" => $lockingUser->getEmail(), "username" => htmlspecialchars($lockingUser->getFullName())));?>
</div>
<?php
}
}
/* Retrieve attacheѕ files */
$files = $document->getDocumentFiles();
/* Retrieve linked documents */
$links = $document->getDocumentLinks();
$links = SeedDMS_Core_DMS::filterDocumentLinks($user, $links);
/* Retrieve reverse linked documents */
$reverselinks = $document->getReverseDocumentLinks();
$reverselinks = SeedDMS_Core_DMS::filterDocumentLinks($user, $reverselinks);
/* Retrieve latest content */
$latestContent = $document->getLatestContent();
$needwkflaction = false;
if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
} else {
$workflow = $latestContent->getWorkflow();
if($workflow) {
$workflowstate = $latestContent->getWorkflowState();
$transitions = $workflow->getNextTransitions($workflowstate);
$needwkflaction = $latestContent->needsWorkflowAction($user);
}
}
if($needwkflaction) {
$this->infoMsg(getMLText('needs_workflow_action'));
}
$status = $latestContent->getStatus();
$reviewStatus = $latestContent->getReviewStatus();
$approvalStatus = $latestContent->getApprovalStatus();
$receiptStatus = $latestContent->getReceiptStatus();
$revisionStatus = $latestContent->getRevisionStatus();
?>
<div class="row-fluid">
<div class="span4">
<?php
$this->contentHeading(getMLText("document_infos")); $this->contentHeading(getMLText("document_infos"));
if($info = $document->getCheckOutInfo()) { if($info = $document->getCheckOutInfo()) {
echo "<div class=\"alert alert-info\">"; echo "<div class=\"alert alert-info\">";
@ -439,6 +310,143 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
if(is_string($txt)) if(is_string($txt))
echo $txt; echo $txt;
$this->contentContainerEnd(); $this->contentContainerEnd();
} /* }}} */
function preview() { /* {{{ */
$document = $this->params['document'];
$timeout = $this->params['timeout'];
$showfullpreview = $this->params['showFullPreview'];
$converttopdf = $this->params['convertToPdf'];
$cachedir = $this->params['cachedir'];
if(!$showfullpreview)
return;
$accessop = $this->params['accessobject'];
if($accessop->check_controller_access('Download', array('action'=>'version'))) {
$latestContent = $document->getLatestContent();
switch($latestContent->getMimeType()) {
case 'audio/mpeg':
case 'audio/mp3':
case 'audio/ogg':
case 'audio/wav':
$this->contentHeading(getMLText("preview"));
?>
<audio controls style="width: 100%;">
<source src="../op/op.Download.php?documentid=<?php echo $document->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" type="audio/mpeg">
</audio>
<?php
break;
case 'application/pdf':
$this->contentHeading(getMLText("preview"));
?>
<iframe src="../pdfviewer/web/viewer.html?file=<?php echo urlencode('../../op/op.Download.php?documentid='.$document->getID().'&version='.$latestContent->getVersion()); ?>" width="100%" height="700px"></iframe>
<?php
break;
case 'image/svg+xml':
$this->contentHeading(getMLText("preview"));
?>
<img src="../op/op.Download.php?documentid=<?php echo $document->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" width="100%">
<?php
break;
default:
break;
}
if($converttopdf) {
$pdfpreviewer = new SeedDMS_Preview_PdfPreviewer($cachedir, $timeout);
if($pdfpreviewer->hasConverter($latestContent->getMimeType())) {
$this->contentHeading(getMLText("preview"));
?>
<iframe src="../pdfviewer/web/viewer.html?file=<?php echo urlencode('../../op/op.PdfPreview.php?documentid='.$document->getID().'&version='.$latestContent->getVersion()); ?>" width="100%" height="700px"></iframe>
<?php
}
}
}
} /* }}} */
function show() { /* {{{ */
parent::show();
$dms = $this->params['dms'];
$user = $this->params['user'];
$folder = $this->params['folder'];
$document = $this->params['document'];
$accessop = $this->params['accessobject'];
$viewonlinefiletypes = $this->params['viewonlinefiletypes'];
$enableownerrevapp = $this->params['enableownerrevapp'];
$enableownerreceipt = $this->params['enableownerreceipt'];
$workflowmode = $this->params['workflowmode'];
$cachedir = $this->params['cachedir'];
$previewwidthlist = $this->params['previewWidthList'];
$previewwidthdetail = $this->params['previewWidthDetail'];
$previewconverters = $this->params['previewConverters'];
$documentid = $document->getId();
$currenttab = $this->params['currenttab'];
$timeout = $this->params['timeout'];
$versions = $document->getContent();
$this->htmlAddHeader('<link href="../styles/'.$this->theme.'/timeline/timeline.css" rel="stylesheet">'."\n", 'css');
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/timeline/timeline-min.js"></script>'."\n", 'js');
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/timeline/timeline-locales.js"></script>'."\n", 'js');
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation($folder);
$this->contentStart();
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
if ($document->isLocked()) {
$lockingUser = $document->getLockingUser();
$txt = $this->callHook('documentIsLocked', $document, $lockingUser);
if(is_string($txt))
echo $txt;
else {
?>
<div class="alert alert-warning">
<?php printMLText("lock_message", array("email" => $lockingUser->getEmail(), "username" => htmlspecialchars($lockingUser->getFullName())));?>
</div>
<?php
}
}
/* Retrieve attacheѕ files */
$files = $document->getDocumentFiles();
/* Retrieve linked documents */
$links = $document->getDocumentLinks();
$links = SeedDMS_Core_DMS::filterDocumentLinks($user, $links);
/* Retrieve reverse linked documents */
$reverselinks = $document->getReverseDocumentLinks();
$reverselinks = SeedDMS_Core_DMS::filterDocumentLinks($user, $reverselinks);
/* Retrieve latest content */
$latestContent = $document->getLatestContent();
$needwkflaction = false;
if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
} else {
$workflow = $latestContent->getWorkflow();
if($workflow) {
$workflowstate = $latestContent->getWorkflowState();
$transitions = $workflow->getNextTransitions($workflowstate);
$needwkflaction = $latestContent->needsWorkflowAction($user);
}
}
if($needwkflaction) {
$this->infoMsg(getMLText('needs_workflow_action'));
}
$status = $latestContent->getStatus();
$reviewStatus = $latestContent->getReviewStatus();
$approvalStatus = $latestContent->getApprovalStatus();
$receiptStatus = $latestContent->getReceiptStatus();
$revisionStatus = $latestContent->getRevisionStatus();
?>
<div class="row-fluid">
<div class="span4">
<?php
$this->documentInfos();
if($accessop->check_controller_access('ViewOnline', array('action'=>'run'))) { if($accessop->check_controller_access('ViewOnline', array('action'=>'run'))) {
$this->preview(); $this->preview();
} }

View File

@ -135,13 +135,13 @@ $(document).ready(function() {
} }
?> ?>
<div class="well"> <div class="well">
<form action="../op/op.WorkflowMgr.php" method="post" enctype="multipart/form-data"> <form class="form-horizontal" action="../op/op.WorkflowMgr.php" method="post" enctype="multipart/form-data">
<?php <?php
if($workflow) { if($workflow) {
echo createHiddenFieldWithKey('editworkflow'); echo createHiddenFieldWithKey('editworkflow');
?> ?>
<input type="Hidden" name="workflowid" value="<?php print $workflow->getID();?>"> <input type="hidden" name="workflowid" value="<?php print $workflow->getID();?>">
<input type="Hidden" name="action" value="editworkflow"> <input type="hidden" name="action" value="editworkflow">
<?php <?php
} else { } else {
echo createHiddenFieldWithKey('addworkflow'); echo createHiddenFieldWithKey('addworkflow');
@ -150,21 +150,26 @@ $(document).ready(function() {
<?php <?php
} }
?> ?>
<table class="table-condensed">
<?php <?php
if($workflow && !$workflow->isUsed()) { if($workflow && !$workflow->isUsed()) {
?> ?>
<tr><td></td><td><a class="standardText btn" href="../out/out.RemoveWorkflow.php?workflowid=<?php print $workflow->getID();?>"><i class="icon-remove"></i> <?php printMLText("rm_workflow");?></a></td></tr> <div class="controls">
<a class="standardText btn" href="../out/out.RemoveWorkflow.php?workflowid=<?php print $workflow->getID();?>"><i class="icon-remove"></i> <?php printMLText("rm_workflow");?></a>
</div>
<?php <?php
} }
?> ?>
<tr> <div class="control-group">
<td><?php printMLText("workflow_name");?>:</td> <label class="control-label"><?php printMLText("workflow_name");?>:</label>
<td><input type="text" name="name" value="<?php print ($workflow ? htmlspecialchars($workflow->getName()) : "");?>"></td> <div class="controls">
</tr> <input type="text" name="name" value="<?php print ($workflow ? htmlspecialchars($workflow->getName()) : "");?>">
<tr> </div>
<td><?php printMLText("workflow_initstate");?>:</td> </div>
<td><select name="initstate"> <div class="control-group">
<label class="control-label"><?php printMLText("workflow_initstate");?>:</label>
<div class="controls">
<select name="initstate">
<?php <?php
foreach($workflowstates as $workflowstate) { foreach($workflowstates as $workflowstate) {
echo "<option value=\"".$workflowstate->getID()."\""; echo "<option value=\"".$workflowstate->getID()."\"";
@ -173,14 +178,14 @@ $(document).ready(function() {
echo ">".htmlspecialchars($workflowstate->getName())."</option>\n"; echo ">".htmlspecialchars($workflowstate->getName())."</option>\n";
} }
?> ?>
</select></td> </select>
</tr> </div>
</div>
<div class="controls">
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button>
</div>
<tr>
<td></td>
<td><button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save")?></button></td>
</tr>
</table>
</form> </form>
</div> </div>
<?php <?php