diff --git a/views/bootstrap/class.ApproveDocument.php b/views/bootstrap/class.ApproveDocument.php
index c55f06024..d9c739257 100644
--- a/views/bootstrap/class.ApproveDocument.php
+++ b/views/bootstrap/class.ApproveDocument.php
@@ -37,8 +37,8 @@ class SeedDMS_View_ApproveDocument extends SeedDMS_Bootstrap_Style {
function checkIndForm()
{
msg = new Array();
- if (document.form1.approvalStatus.value == "") msg.push("");
- if (document.form1.comment.value == "") msg.push("");
+ if (document.formind.approvalStatus.value == "") msg.push("");
+ if (document.formind.comment.value == "") msg.push("");
if (msg != "") {
noty({
text: msg.join('
'),
@@ -56,9 +56,9 @@ function checkIndForm()
function checkGrpForm()
{
msg = new Array();
-// if (document.form2.approvalGroup.value == "") msg.push("");
- if (document.form2.approvalStatus.value == "") msg.push("");
- if (document.form2.comment.value == "") msg.push("");
+// if (document.formgrp.approvalGroup.value == "") msg.push("");
+ if (document.formgrp.approvalStatus.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;
ev.preventDefault();
});
- $('body').on('submit', '#form2', function(ev){
+ $('body').on('submit', '#formgrp', function(ev){
if(checkGrpForm()) return;
ev.preventDefault();
});
@@ -112,24 +112,24 @@ $(document).ready(function() {
$this->contentContainerStart();
// Display the Approval form.
- if ($approvalStatus['type'] == 0) {
- if($approvalStatus["status"]!=0) {
+ $approvaltype = ($approvalStatus['type'] == 0) ? 'ind' : 'grp';
+ if($approvalStatus["status"]!=0) {
- print "
";
- print "".getMLText("status")." | ";
- print "".getMLText("comment")." | ";
- print "".getMLText("last_update")." | ";
- print "
";
- print "";
- printApprovalStatusText($approvalStatus["status"]);
- print " | ";
- print "".htmlspecialchars($approvalStatus["comment"])." | ";
- $indUser = $dms->getUser($approvalStatus["userID"]);
- print "".$approvalStatus["date"]." - ". $indUser->getFullname() ." | ";
- print "
\n";
- }
+ print "";
+ print "".getMLText("status")." | ";
+ print "".getMLText("comment")." | ";
+ print "".getMLText("last_update")." | ";
+ print "
";
+ print "";
+ printApprovalStatusText($approvalStatus["status"]);
+ print " | ";
+ print "".htmlspecialchars($approvalStatus["comment"])." | ";
+ $indUser = $dms->getUser($approvalStatus["userID"]);
+ print "".$approvalStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ." | ";
+ print "
\n";
+ }
?>
-
-";
- print "".getMLText("status")." | ";
- print "".getMLText("comment")." | ";
- print "".getMLText("last_update")." | ";
- print "
";
- print "";
- printApprovalStatusText($approvalStatus["status"]);
- print " | ";
- print "".htmlspecialchars($approvalStatus["comment"])." | ";
- $indUser = $dms->getUser($approvalStatus["userID"]);
- print "".$approvalStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ." | ";
- print "
\n";
- }
-
-?>
-
contentContainerEnd();
$this->contentEnd();
diff --git a/views/bootstrap/class.ReviewDocument.php b/views/bootstrap/class.ReviewDocument.php
index 11c6ea31a..51dee6311 100644
--- a/views/bootstrap/class.ReviewDocument.php
+++ b/views/bootstrap/class.ReviewDocument.php
@@ -37,8 +37,8 @@ class SeedDMS_View_ReviewDocument extends SeedDMS_Bootstrap_Style {
function checkIndForm()
{
msg = new Array();
- if (document.form1.reviewStatus.value == "") msg.push("");
- if (document.form1.comment.value == "") msg.push("");
+ if (document.formind.reviewStatus.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.reviewGroup.value == "") msg += "\n";
- if (document.form2.reviewStatus.value == "") msg += "\n";
- if (document.form2.comment.value == "") msg += "\n";
+ msg = new Array();
+// if (document.formgrp.reviewGroup.value == "") msg.push("");
+ if (document.formgrp.reviewStatus.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;
ev.preventDefault();
});
- $('body').on('submit', '#form2', function(ev){
+ $('body').on('submit', '#formgrp', function(ev){
if(checkGrpForm()) return;
ev.preventDefault();
});
@@ -110,118 +110,65 @@ $(document).ready(function() {
$this->contentContainerStart();
// Display the Review form.
- if ($reviewStatus['type'] == 0) {
- if($reviewStatus["status"]!=0) {
+ $reviewtype = ($reviewStatus['type'] == 0) ? 'ind' : 'grp';
+ if($reviewStatus["status"]!=0) {
- print "";
- print "".getMLText("status")." | ";
- print "".getMLText("comment")." | ";
- print "".getMLText("last_update")." | ";
- print "
";
- print "";
- printReviewStatusText($reviewStatus["status"]);
- print " | ";
- print "".htmlspecialchars($reviewStatus["comment"])." | ";
- $indUser = $dms->getUser($reviewStatus["userID"]);
- print "".$reviewStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ." | ";
- print "
\n";
- }
-?>
-
-";
- print "".getMLText("status")." | ";
- print "".getMLText("comment")." | ";
- print "".getMLText("last_update")." | ";
- print "
";
- print "";
- printReviewStatusText($reviewStatus["status"]);
- print " | ";
- print "".htmlspecialchars($reviewStatus["comment"])." | ";
- $indUser = $dms->getUser($reviewStatus["userID"]);
- print "".$reviewStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ." | ";
- print "
\n";
- }
-?>
-
-";
+ print "".getMLText("status")." | ";
+ print "".getMLText("comment")." | ";
+ print "".getMLText("last_update")." | ";
+ print "
";
+ print "";
+ printReviewStatusText($reviewStatus["status"]);
+ print " | ";
+ print "".htmlspecialchars($reviewStatus["comment"])." | ";
+ $indUser = $dms->getUser($reviewStatus["userID"]);
+ print "".$reviewStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ." | ";
+ print "
\n";
}
+?>
+
+contentContainerEnd();
$this->contentEnd();
$this->htmlEndPage();