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();
}
print "<div class=\"alert alert-error\">";
print "<h4>".getMLText('error')."!</h4>";
print htmlspecialchars($error);
print "</div>";
$html = '';
$html .= "<h4>".getMLText('error')."!</h4>";
$html .= htmlspecialchars($error);
$this->errorMsg($html);
if(!$plain) {
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();
}
print "<div class=\"alert alert-error\">";
print "<h4>".getMLText('error')."!</h4>";
print htmlspecialchars($errormsg);
print "</div>";
$html = '';
$html .= "<h4>".getMLText('error')."!</h4>";
$html .= htmlspecialchars($errormsg);
$this->errorMsg($html);
print "<div><button class=\"btn history-back\">".getMLText('back')."</button></div>";
$this->contentEnd();

View File

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

View File

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

View File

@ -76,7 +76,7 @@ $(document).ready( function() {
$this->contentStart();
$this->pageNavigation(getMLText("my_account"), "my_account");
$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->contentContainerStart('span6');

View File

@ -39,11 +39,7 @@ class SeedDMS_View_TransferObjects extends SeedDMS_Theme_Style {
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
$this->contentHeading(getMLText("transfer_objects"));
?>
<div class="alert">
<?php printMLText("confirm_transfer_objects", array ("username" => htmlspecialchars($rmuser->getFullName())));?>
</div>
<?php
$this->warningMsg(getMLText("confirm_transfer_objects", array ("username" => htmlspecialchars($rmuser->getFullName()))));
$this->contentContainerStart();
?>
<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();
print "<div class=\"alert alert-warning\">";
printMLText("update_locked_msg", array("username" => htmlspecialchars($lockingUser->getFullName()), "email" => $lockingUser->getEmail()));
$html = '';
$html .= getMLText("update_locked_msg", array("username" => htmlspecialchars($lockingUser->getFullName()), "email" => $lockingUser->getEmail())).' ';
if ($lockingUser->getID() == $user->getID())
printMLText("unlock_cause_locking_user");
$html .= getMLText("unlock_cause_locking_user");
else if ($document->getAccessMode($user) == M_ALL)
printMLText("unlock_cause_access_mode_all");
$html .= getMLText("unlock_cause_access_mode_all");
else
{
printMLText("no_update_cause_locked");
print "</div>";
$html .= getMLText("no_update_cause_locked");
$this->warningMsg($html);
$this->contentEnd();
$this->htmlEndPage();
exit;
}
print "</div>";
$this->warningMsg($html);
}
$latestContent = $document->getLatestContent();

View File

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

View File

@ -2050,10 +2050,10 @@ $(document).ready(function() {
$this->contentStart();
}
print "<div class=\"alert alert-error\">";
print "<h4>".getMLText('error')."!</h4>";
print htmlspecialchars($error);
print "</div>";
$html = '';
$html .= "<h4>".getMLText('error')."!</h4>";
$html .= htmlspecialchars($error);
$this->errorMsg($html);
if(!$plain) {
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();
}
print "<div class=\"alert alert-error\">";
print "<h4>".getMLText('error')."!</h4>";
print htmlspecialchars($errormsg);
print "</div>";
$html = '';
$html .= "<h4>".getMLText('error')."!</h4>";
$html .= htmlspecialchars($errormsg);
$this->errorMsg($html);
print "<div><button class=\"btn history-back\">".getMLText('back')."</button></div>";
$this->contentEnd();