remove plain html for error and warning msgs

This commit is contained in:
Uwe Steinmann 2021-07-15 17:43:50 +02:00
parent 9b6f376be8
commit c1a2411882
8 changed files with 28 additions and 39 deletions

View File

@ -2003,10 +2003,10 @@ $(document).ready(function() {
$this->contentStart(); $this->contentStart();
} }
print "<div class=\"alert alert-error\">"; $html = '';
print "<h4>".getMLText('error')."!</h4>"; $html .= "<h4>".getMLText('error')."!</h4>";
print htmlspecialchars($error); $html .= htmlspecialchars($error);
print "</div>"; $this->errorMsg($html);
if(!$plain) { if(!$plain) {
print "<div><button class=\"btn history-back\">".getMLText('back')."</button></div>"; print "<div><button class=\"btn history-back\">".getMLText('back')."</button></div>";
@ -3151,10 +3151,10 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$this->contentStart(); $this->contentStart();
} }
print "<div class=\"alert alert-error\">"; $html = '';
print "<h4>".getMLText('error')."!</h4>"; $html .= "<h4>".getMLText('error')."!</h4>";
print htmlspecialchars($errormsg); $html .= htmlspecialchars($errormsg);
print "</div>"; $this->errorMsg($html);
print "<div><button class=\"btn history-back\">".getMLText('back')."</button></div>"; print "<div><button class=\"btn history-back\">".getMLText('back')."</button></div>";
$this->contentEnd(); $this->contentEnd();

View File

@ -94,9 +94,7 @@ class SeedDMS_View_ImportFS extends SeedDMS_Theme_Style {
print "</form>\n"; print "</form>\n";
$this->contentContainerEnd(); $this->contentContainerEnd();
} else { } else {
echo "<div class=\"alert alert-warning\">"; $this->warningMsg(getMLText("dropfolderdir_missing"));
printMLText("dropfolderdir_missing");
echo "</div>\n";
} }
$this->contentEnd(); $this->contentEnd();

View File

@ -204,7 +204,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
$this->contentHeading(getMLText("objectcheck")); $this->contentHeading(getMLText("objectcheck"));
if($repair) { if($repair) {
echo "<div class=\"alert\">".getMLText('repairing_objects')."</div>"; $this->infoMsg(getMLText('repairing_objects'));
} }
$this->contentContainerStart(); $this->contentContainerStart();
print "<table class=\"table table-condensed\">"; print "<table class=\"table table-condensed\">";

View File

@ -76,7 +76,7 @@ $(document).ready( function() {
$this->contentStart(); $this->contentStart();
$this->pageNavigation(getMLText("my_account"), "my_account"); $this->pageNavigation(getMLText("my_account"), "my_account");
$this->contentHeading(getMLText('2_factor_auth')); $this->contentHeading(getMLText('2_factor_auth'));
echo "<div class=\"alert\">".getMLText('2_factor_auth_info')."</div>"; $this->infoMsg(getMLText('2_factor_auth_info'));
$this->rowStart(); $this->rowStart();
$this->contentContainerStart('span6'); $this->contentContainerStart('span6');

View File

@ -39,11 +39,7 @@ class SeedDMS_View_TransferObjects extends SeedDMS_Theme_Style {
$this->pageNavigation(getMLText("admin_tools"), "admin_tools"); $this->pageNavigation(getMLText("admin_tools"), "admin_tools");
$this->contentHeading(getMLText("transfer_objects")); $this->contentHeading(getMLText("transfer_objects"));
?> $this->warningMsg(getMLText("confirm_transfer_objects", array ("username" => htmlspecialchars($rmuser->getFullName()))));
<div class="alert">
<?php printMLText("confirm_transfer_objects", array ("username" => htmlspecialchars($rmuser->getFullName())));?>
</div>
<?php
$this->contentContainerStart(); $this->contentContainerStart();
?> ?>
<form class="form-horizontal" action="../op/op.UsrMgr.php" name="form1" method="post"> <form class="form-horizontal" action="../op/op.UsrMgr.php" name="form1" method="post">

View File

@ -164,24 +164,23 @@ console.log(element);
$lockingUser = $document->getLockingUser(); $lockingUser = $document->getLockingUser();
print "<div class=\"alert alert-warning\">"; $html = '';
$html .= getMLText("update_locked_msg", array("username" => htmlspecialchars($lockingUser->getFullName()), "email" => $lockingUser->getEmail())).' ';
printMLText("update_locked_msg", array("username" => htmlspecialchars($lockingUser->getFullName()), "email" => $lockingUser->getEmail()));
if ($lockingUser->getID() == $user->getID()) if ($lockingUser->getID() == $user->getID())
printMLText("unlock_cause_locking_user"); $html .= getMLText("unlock_cause_locking_user");
else if ($document->getAccessMode($user) == M_ALL) else if ($document->getAccessMode($user) == M_ALL)
printMLText("unlock_cause_access_mode_all"); $html .= getMLText("unlock_cause_access_mode_all");
else else
{ {
printMLText("no_update_cause_locked"); $html .= getMLText("no_update_cause_locked");
print "</div>"; $this->warningMsg($html);
$this->contentEnd(); $this->contentEnd();
$this->htmlEndPage(); $this->htmlEndPage();
exit; exit;
} }
print "</div>"; $this->warningMsg($html);
} }
$latestContent = $document->getLatestContent(); $latestContent = $document->getLatestContent();

View File

@ -686,11 +686,7 @@ $(document).ready( function() {
if(is_string($txt)) if(is_string($txt))
echo $txt; echo $txt;
else { else {
?> $this->warningMsg(getMLText("lock_message", array("email" => $lockingUser->getEmail(), "username" => htmlspecialchars($lockingUser->getFullName()))));
<div class="alert alert-warning">
<?php printMLText("lock_message", array("email" => $lockingUser->getEmail(), "username" => htmlspecialchars($lockingUser->getFullName())));?>
</div>
<?php
} }
} }

View File

@ -2050,10 +2050,10 @@ $(document).ready(function() {
$this->contentStart(); $this->contentStart();
} }
print "<div class=\"alert alert-error\">"; $html = '';
print "<h4>".getMLText('error')."!</h4>"; $html .= "<h4>".getMLText('error')."!</h4>";
print htmlspecialchars($error); $html .= htmlspecialchars($error);
print "</div>"; $this->errorMsg($html);
if(!$plain) { if(!$plain) {
print "<div><button class=\"btn history-back\">".getMLText('back')."</button></div>"; print "<div><button class=\"btn history-back\">".getMLText('back')."</button></div>";
@ -3222,10 +3222,10 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$this->contentStart(); $this->contentStart();
} }
print "<div class=\"alert alert-error\">"; $html = '';
print "<h4>".getMLText('error')."!</h4>"; $html .= "<h4>".getMLText('error')."!</h4>";
print htmlspecialchars($errormsg); $html .= htmlspecialchars($errormsg);
print "</div>"; $this->errorMsg($html);
print "<div><button class=\"btn history-back\">".getMLText('back')."</button></div>"; print "<div><button class=\"btn history-back\">".getMLText('back')."</button></div>";
$this->contentEnd(); $this->contentEnd();