Bug 37311: (follow-up) Use Bootstrap badge classes for some statuses
Rather than add a style to a whole table row I think we should use BS5's
badge classes to style debug mode and default configuration information.
To test you should have at least one SMTP server set as default and at
least one with debug mode turned on.
Go to Administration -> SMTP servers and view the table of SMTP servers.
Any server with debug mode turned on should show "On" styled as a yellow
badge with black text. A server set as default should show "Default"
styled as a green badge with white text.
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8145d526e9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
f3d2dd1d0c
commit
fb7ed498e9
|
|
@ -403,7 +403,8 @@
|
|||
{
|
||||
"data": function( row, type, val, meta ) {
|
||||
if ( row.debug ) {
|
||||
return "[% tp("Active", "On") | html %]";
|
||||
let result = '<span class="badge text-bg-warning">' + "[% tp("Active", "On") | html %]" + '</span>';
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
return _("");
|
||||
|
|
@ -415,7 +416,8 @@
|
|||
{
|
||||
"data": function( row, type, val, meta ) {
|
||||
if ( row.is_default ) {
|
||||
return _("Default");
|
||||
let result = '<span class="badge text-bg-success">' + _("Default") + '</span>';
|
||||
return result;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
|
@ -433,14 +435,6 @@
|
|||
"orderable": false
|
||||
}
|
||||
],
|
||||
createdRow: function (row, data, dataIndex) {
|
||||
if ( data.is_default ) {
|
||||
$(row).addClass('default');
|
||||
}
|
||||
if ( data.debug ) {
|
||||
$(row).addClass('debug');
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
$('#smtp_servers').on( "click", '.delete_server', function () {
|
||||
|
|
|
|||
Loading…
Reference in New Issue