mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
issue warning if document has expired, validate form to add link
This commit is contained in:
parent
2ec025451b
commit
ea45ed5b7b
|
@ -179,17 +179,31 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
$document = $this->params['document'];
|
||||
|
||||
header('Content-Type: application/javascript; charset=UTF-8');
|
||||
parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'confirm_transfer_link_document', 'transfer_content', 'link_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder'));
|
||||
parent::jsTranslations(array('js_form_error', 'js_form_errors', 'cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'confirm_transfer_link_document', 'transfer_content', 'link_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder'));
|
||||
if($user->isAdmin()) {
|
||||
$latestContent = $this->callHook('documentLatestContent', $document);
|
||||
if($latestContent === null)
|
||||
$latestContent = $document->getLatestContent();
|
||||
$this->printTimelineJs('out.ViewDocument.php?action=timelinedata&documentid='.$latestContent->getDocument()->getID(), 300, '', date('Y-m-d'));
|
||||
}
|
||||
// $this->printDocumentChooserJs("form1");
|
||||
$this->printDeleteDocumentButtonJs();
|
||||
/* Add js for catching click on document in one page mode */
|
||||
$this->printClickDocumentJs();
|
||||
?>
|
||||
$(document).ready( function() {
|
||||
$("#form1").validate({
|
||||
ignore: [],
|
||||
rules: {
|
||||
docid: {
|
||||
required: true
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
docid: "<?php printMLText("js_no_document");?>",
|
||||
},
|
||||
});
|
||||
});
|
||||
<?php
|
||||
} /* }}} */
|
||||
|
||||
function documentInfos() { /* {{{ */
|
||||
|
@ -646,6 +660,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
$this->htmlAddHeader('<link href="../styles/bootstrap/timeline/timeline.css" rel="stylesheet">'."\n", 'css');
|
||||
$this->htmlAddHeader('<script type="text/javascript" src="../styles/bootstrap/timeline/timeline-min.js"></script>'."\n", 'js');
|
||||
$this->htmlAddHeader('<script type="text/javascript" src="../styles/bootstrap/timeline/timeline-locales.js"></script>'."\n", 'js');
|
||||
$this->htmlAddHeader('<script type="text/javascript" src="../views/'.$this->theme.'/vendors/jquery-validation/jquery.validate.js"></script>'."\n", 'js');
|
||||
$this->htmlAddHeader('<script type="text/javascript" src="../views/'.$this->theme.'/styles/validation-default.js"></script>'."\n", 'js');
|
||||
|
||||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||
$this->globalNavigation($folder);
|
||||
|
@ -820,6 +836,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
?>
|
||||
<div class="tab-pane <?php if($currenttab == 'revapp') echo 'active'; ?>" id="revapp" role="tabpanel">
|
||||
<?php
|
||||
if($document->hasExpired())
|
||||
$this->warningMsg(getMLText('cannot_revapp_expired_docs'));
|
||||
$this->rowStart();
|
||||
/* Just check fo an exting reviewStatus, even workflow mode is set
|
||||
* to traditional_only_approval. There may be old documents which
|
||||
|
@ -1413,7 +1431,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
|
|||
if (!$user->isGuest()){
|
||||
?>
|
||||
<br>
|
||||
<form action="../op/op.AddDocumentLink.php" name="form1" class="form-horizontal">
|
||||
<form action="../op/op.AddDocumentLink.php" id="form1" name="form1" class="form-horizontal">
|
||||
<input type="hidden" name="documentid" value="<?php print $documentid;?>">
|
||||
<?php echo createHiddenFieldWithKey('adddocumentlink'); ?>
|
||||
<?php $this->contentContainerStart(); ?>
|
||||
|
|
Loading…
Reference in New Issue
Block a user