From 9d7b735ff49d2a4862e1bd374d52a43b3a796ce1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 30 Jan 2018 19:20:51 +0100 Subject: [PATCH] use same form ind and grp revision --- views/bootstrap/class.ReviseDocument.php | 164 ++++++++--------------- 1 file changed, 56 insertions(+), 108 deletions(-) diff --git a/views/bootstrap/class.ReviseDocument.php b/views/bootstrap/class.ReviseDocument.php index 75061a4ba..3a3dbb6db 100644 --- a/views/bootstrap/class.ReviseDocument.php +++ b/views/bootstrap/class.ReviseDocument.php @@ -37,8 +37,8 @@ class SeedDMS_View_ReviseDocument extends SeedDMS_Bootstrap_Style { function checkIndForm() { msg = new Array(); - if (document.form1.revisionStatus.value == "") msg.push(""); - if (document.form1.comment.value == "") msg.push(""); + if (document.formind.revisionStatus.value == "") msg.push(""); + if (document.formind.comment.value == "") msg.push(""); if (msg != "") { noty({ text: msg.join('
'), @@ -55,10 +55,10 @@ function checkIndForm() } function checkGrpForm() { - msg = ""; - if (document.form2.revisionGroup.value == "") msg += "\n"; - if (document.form2.revisionSatus.value == "") msg += "\n"; - if (document.form2.comment.value == "") msg += "\n"; + msg = new Array(); + if (document.formgrp.revisionGroup.value == "") msg.push(""); + if (document.formgrp.revisionSatus.value == "") msg.push(""); + if (document.formgrp.comment.value == "") msg.push(""); if (msg != "") { noty({ @@ -75,11 +75,11 @@ function checkGrpForm() return true; } $(document).ready(function() { - $('body').on('submit', '#form1', function(ev){ + $('body').on('submit', '#formind', function(ev){ if(checkIndForm()) return; event.preventDefault(); }); - $('body').on('submit', '#form2', function(ev){ + $('body').on('submit', '#formgrp', function(ev){ if(checkGrpForm()) return; event.preventDefault(); }); @@ -111,108 +111,56 @@ $(document).ready(function() { $this->contentContainerStart(); // Display the Revision form. - if ($revisionStatus['type'] == 0) { - if($revisionStatus["status"]!=0) { + $revisiontype = ($revisionStatus['type'] == 0) ? 'ind' : 'grp'; + if($revisionStatus["status"]!=0) { - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - $indUser = $dms->getUser($revisionStatus["userID"]); - print ""; - print "
".getMLText("status")."".getMLText("comment")."".getMLText("last_update")."
"; - printRevisionStatusText($revisionStatus["status"]); - print "".htmlspecialchars($revisionStatus["comment"])."".$revisionStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ."

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