Replace .caution and .success CSS classes

Replaces with .text-danger and .text-success.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2020-12-23 19:37:52 -03:00
parent aa3dc8acef
commit 2625e0e1f6
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
9 changed files with 14 additions and 135 deletions

View File

@ -239,7 +239,7 @@ class Generator
public static function getServerSSL(): string
{
$server = $GLOBALS['cfg']['Server'];
$class = 'caution';
$class = 'text-danger';
if (! $server['ssl']) {
$message = __('SSL is not being used');
if (! empty($server['socket']) || in_array($server['host'], $GLOBALS['cfg']['MysqlSslWarningSafeHosts'])) {

View File

@ -185,7 +185,7 @@ class Utilities
if ($result === false && $errorMessage !== null) {
$dbgInfo['error']
= '<span class="color_red">'
= '<span class="text-danger">'
. htmlspecialchars($errorMessage) . '</span>';
}
$dbgInfo['query'] = htmlspecialchars($query);

View File

@ -138,16 +138,16 @@ class Relation
$retval = '<br>';
$messages = [];
$messages['error'] = '<span class="caution"><strong>'
$messages['error'] = '<span class="text-danger"><strong>'
. __('not OK')
. '</strong></span>';
$messages['ok'] = '<span class="success"><strong>'
$messages['ok'] = '<span class="text-success"><strong>'
. _pgettext('Correctly working', 'OK')
. '</strong></span>';
$messages['enabled'] = '<span class="success">' . __('Enabled') . '</span>';
$messages['disabled'] = '<span class="caution">' . __('Disabled') . '</span>';
$messages['enabled'] = '<span class="text-success">' . __('Enabled') . '</span>';
$messages['disabled'] = '<span class="text-danger">' . __('Disabled') . '</span>';
if (strlen((string) $cfgRelation['db']) == 0) {
$retval .= __('Configuration of pmadb…') . ' '

View File

@ -295,7 +295,7 @@ class GeneratorTest extends AbstractTestCase
. ' target="documentation"><img src="themes/dot.gif" title="Documentation" alt="Documentation"'
. ' class="icon ic_b_help"></a>';
$sslNotUsedCaution = '<span class="caution">SSL is not being used</span>'
$sslNotUsedCaution = '<span class="text-danger">SSL is not being used</span>'
. ' <a href="./url.php?url=https%3A%2F%2Fdocs.phpmyadmin.net%2Fen%2Flatest%2Fsetup.html%23ssl"'
. ' target="documentation"><img src="themes/dot.gif" title="Documentation" alt="Documentation"'
. ' class="icon ic_b_help"></a>';
@ -349,7 +349,7 @@ class GeneratorTest extends AbstractTestCase
];
$this->assertEquals(
'<span class="caution">SSL is used with disabled verification</span>'
'<span class="text-danger">SSL is used with disabled verification</span>'
. ' <a href="./url.php?url=https%3A%2F%2Fdocs.phpmyadmin.net%2Fen%2Flatest%2Fsetup.html%23ssl"'
. ' target="documentation"><img src="themes/dot.gif" title="Documentation" alt="Documentation"'
. ' class="icon ic_b_help"></a>',
@ -363,7 +363,7 @@ class GeneratorTest extends AbstractTestCase
];
$this->assertEquals(
'<span class="caution">SSL is used without certification authority</span>'
'<span class="text-danger">SSL is used without certification authority</span>'
. ' <a href="./url.php?url=https%3A%2F%2Fdocs.phpmyadmin.net%2Fen%2Flatest%2Fsetup.html%23ssl"'
. ' target="documentation"><img src="themes/dot.gif" title="Documentation" alt="Documentation"'
. ' class="icon ic_b_help"></a>',

View File

@ -105,20 +105,20 @@ class RelationTest extends AbstractTestCase
//$cfg['Servers'][$i]['relation']
$result = "\$cfg['Servers'][\$i]['pmadb'] ... </th><td class=\"text-end\">"
. '<span class="success"><strong>OK</strong></span>';
. '<span class="text-success"><strong>OK</strong></span>';
$this->assertStringContainsString(
$result,
$retval
);
// $cfg['Servers'][$i]['relation']
$result = "\$cfg['Servers'][\$i]['relation'] ... </th><td class=\"text-end\">"
. '<span class="caution"><strong>not OK</strong></span>';
. '<span class="text-danger"><strong>not OK</strong></span>';
$this->assertStringContainsString(
$result,
$retval
);
// General relation features
$result = 'General relation features: <span class="caution">Disabled</span>';
$result = 'General relation features: <span class="text-danger">Disabled</span>';
$this->assertStringContainsString(
$result,
$retval
@ -126,13 +126,13 @@ class RelationTest extends AbstractTestCase
// $cfg['Servers'][$i]['table_info']
$result = "\$cfg['Servers'][\$i]['table_info'] ... </th>"
. '<td class="text-end">'
. '<span class="caution"><strong>not OK</strong></span>';
. '<span class="text-danger"><strong>not OK</strong></span>';
$this->assertStringContainsString(
$result,
$retval
);
// Display Features:
$result = 'Display Features: <span class="caution">Disabled</span>';
$result = 'Display Features: <span class="text-danger">Disabled</span>';
$this->assertStringContainsString(
$result,
$retval

View File

@ -814,10 +814,6 @@ label.col-3.d-flex.align-items-center {
max-height: 400px;
}
.color_red {
color: red;
}
.pma_sliding_message {
display: inline-block;
}
@ -833,25 +829,6 @@ ul.tabs {
padding: 0;
}
span {
&.caution {
color: #f00;
}
&.success {
color: green;
}
}
fieldset.caution a {
color: #f00;
&:hover {
color: #fff;
background-color: #f00;
}
}
// zoom search
div#dataDisplay {
input,

View File

@ -862,10 +862,6 @@ td.disabled {
font-weight: bold;
}
.color_red {
color: red;
}
/* specific elements */
ul.tabs {
@ -873,54 +869,6 @@ ul.tabs {
margin: 0;
}
span {
&.caution {
color: #f00;
}
&.success {
color: green;
}
}
fieldset.caution {
background: $browse-warning-color;
border: 1px solid $browse-warning-color;
legend {
background-color: #fff;
}
a {
font-family: $font-family-bold;
text-transform: uppercase;
color: $button-color;
font-weight: normal;
}
ul {
padding: 0;
}
}
fieldset.caution li {
display: block;
}
fieldset.caution li {
&::before {
/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
font-family: "IcoMoon";
content: "";
color: $button-color;
margin-right: 10px;
}
a:nth-child(2) img {
background: url('../img/s_info.png') !important;
}
}
/* zoom search */
div#dataDisplay {
input,

View File

@ -655,10 +655,6 @@ form.login label {
max-height: 400px;
}
.color_red {
color: red;
}
.pma_sliding_message {
display: inline-block;
}
@ -676,25 +672,6 @@ ul.tabs {
padding: 0;
}
span {
&.caution {
color: #f00;
}
&.success {
color: green;
}
}
fieldset.caution a {
color: #f00;
&:hover {
color: #fff;
background-color: #f00;
}
}
/* zoom search */
div#dataDisplay {
input,

View File

@ -883,10 +883,6 @@ label.col-3.d-flex.align-items-center {
max-height: 400px;
}
.color_red {
color: red;
}
.pma_sliding_message {
display: inline-block;
}
@ -909,25 +905,6 @@ ul.tabs {
background: #fff !important;
}
span {
&.caution {
color: #f00;
}
&.success {
color: green;
}
}
fieldset.caution a {
color: #f00;
&:hover {
color: #fff;
background-color: #f00;
}
}
// zoom search
div#dataDisplay {
input,