* @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ /** * Include parent class */ require_once("class.Bootstrap.php"); /** * Class which outputs the html page for ReceiptDocument view * * @category DMS * @package SeedDMS * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann * @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ class SeedDMS_View_ReceiptDocument extends SeedDMS_Bootstrap_Style { function js() { /* {{{ */ header('Content-Type: application/javascript; charset=UTF-8'); ?> function checkIndForm() { msg = new Array(); if (document.form1.reviewStatus.value == "") msg.push(""); if (document.form1.comment.value == "") msg.push(""); if (msg != "") { noty({ text: msg.join('
'), type: 'error', dismissQueue: true, layout: 'topRight', theme: 'defaultTheme', _timeout: 1500, }); return false; } else return true; } function checkGrpForm() { msg = ""; if (document.form2.reviewGroup.value == "") msg += "\n"; if (document.form2.reviewStatus.value == "") msg += "\n"; if (document.form2.comment.value == "") msg += "\n"; if (msg != "") { noty({ text: msg.join('
'), type: 'error', dismissQueue: true, layout: 'topRight', theme: 'defaultTheme', _timeout: 1500, }); return false; } else return true; } $(document).ready(function() { $('body').on('submit', '#form1', function(ev){ if(checkIndForm()) return; event.preventDefault(); }); $('body').on('submit', '#form2', function(ev){ if(checkGrpForm()) return; event.preventDefault(); }); }); params['dms']; $user = $this->params['user']; $folder = $this->params['folder']; $document = $this->params['document']; $content = $this->params['version']; $receipts = $content->getReceiptStatus(); foreach($receipts as $receipt) { if($receipt['receiptID'] == $_GET['receiptid']) { $receiptStatus = $receipt; break; } } $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); $this->contentHeading(getMLText("submit_receipt")); $this->contentContainerStart(); // Display the Receipt form. if ($receiptStatus['type'] == 0) { if($receiptStatus["status"]!=0) { print ""; print ""; print ""; print ""; print ""; print ""; print ""; $indUser = $dms->getUser($receiptStatus["userID"]); print ""; print "
".getMLText("status")."".getMLText("comment")."".getMLText("last_update")."
"; printReceiptStatusText($receiptStatus["status"]); print "".htmlspecialchars($receiptStatus["comment"])."".$receiptStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ."

"; } ?>
"; print "".getMLText("status").""; print "".getMLText("comment").""; print "".getMLText("last_update").""; print ""; print ""; printReceiptStatusText($receiptStatus["status"]); print ""; print "".htmlspecialchars($receiptStatus["comment"]).""; $indUser = $dms->getUser($receiptStatus["userID"]); print "".$receiptStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) .""; print "
\n"; } ?>
'/>
contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ } ?>