From c8947ba28da66618f830fa0152d62790d83cdc38 Mon Sep 17 00:00:00 2001
From: thom <thom@amsterdamtech.nl>
Date: Tue, 22 Sep 2020 11:42:37 +0200
Subject: [PATCH] Better styling for config error messages (#5758)

---
 .../web/mail/templates/mail_user_backup.htm   | 15 ++++++-----
 .../mail/templates/xmpp_domain_edit_ssl.htm   | 23 +++++++++--------
 .../templates/web_vhost_domain_advanced.htm   | 14 ++++++-----
 .../templates/web_vhost_domain_backup.htm     | 14 ++++++-----
 .../sites/templates/web_vhost_domain_edit.htm | 15 ++++++-----
 .../templates/web_vhost_domain_redirect.htm   | 25 +++++++++++--------
 .../sites/templates/web_vhost_domain_ssl.htm  | 15 ++++++-----
 .../templates/web_vhost_domain_stats.htm      | 17 +++++++------
 8 files changed, 80 insertions(+), 58 deletions(-)

diff --git a/interface/web/mail/templates/mail_user_backup.htm b/interface/web/mail/templates/mail_user_backup.htm
index bbf1abaf87..059fda8bff 100644
--- a/interface/web/mail/templates/mail_user_backup.htm
+++ b/interface/web/mail/templates/mail_user_backup.htm
@@ -1,10 +1,13 @@
 <tmpl_if name="config_error_msg">
-<div style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
-                <p style="font-face:bold">{tmpl_var name='configuration_error_txt'}</p>
-				<div>
-				<div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div><div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
-				</div>
-</div>
+<div class="alert alert-danger">
+    <p>
+      <tmpl_var name="configuration_error_txt">
+        <div>
+          <div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div>
+          <div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+        </div>
+    </p>
+  </div>
 </tmpl_if>
 
             <div class="form-group">
diff --git a/interface/web/mail/templates/xmpp_domain_edit_ssl.htm b/interface/web/mail/templates/xmpp_domain_edit_ssl.htm
index 0ef2e2c962..848ed001e3 100644
--- a/interface/web/mail/templates/xmpp_domain_edit_ssl.htm
+++ b/interface/web/mail/templates/xmpp_domain_edit_ssl.htm
@@ -1,10 +1,13 @@
 <tmpl_if name="config_error_msg">
-<div style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
-                <p style="font-face:bold">{tmpl_var name='configuration_error_txt'}</p>
-				<div>
-				<div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div><div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
-				</div>
-</div>
+<div class="alert alert-danger">
+    <p>
+      <tmpl_var name="configuration_error_txt">
+        <div>
+          <div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div>
+          <div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+        </div>
+    </p>
+  </div>
 </tmpl_if>
 
 
@@ -55,7 +58,7 @@
                     {tmpl_var name='ssl_action'}
                 </select></div>
             </div>
-        
+
 
         <input type="hidden" name="id" value="{tmpl_var name='id'}">
         <input type="hidden" name="type" value="ssl">
@@ -77,11 +80,11 @@
 	$('#load_data').click(function(){
 		loadClientData();
 	});
-	
-	
+
+
 	function loadClientData() {
         var web_id = $("input[name=id]").val();
-        
+
         jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {'web_id': web_id, 'type': "getclientssldata"}, function(data) {
 			$('#ssl_organisation').val(data['company_name']);
 			$('#ssl_locality').val(data['city']);
diff --git a/interface/web/sites/templates/web_vhost_domain_advanced.htm b/interface/web/sites/templates/web_vhost_domain_advanced.htm
index 12b01c21b8..1da3a9b68b 100644
--- a/interface/web/sites/templates/web_vhost_domain_advanced.htm
+++ b/interface/web/sites/templates/web_vhost_domain_advanced.htm
@@ -1,11 +1,13 @@
 <tmpl_if name="config_error_msg">
-  <div style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
-    <p style="font-face:bold">{tmpl_var name='configuration_error_txt'}</p>
-    <div>
-      <div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div>
-      <div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+  <div class="alert alert-danger">
+      <p>
+        <tmpl_var name="configuration_error_txt">
+          <div>
+            <div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div>
+            <div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+          </div>
+      </p>
     </div>
-  </div>
 </tmpl_if>
 <input name="document_root" id="document_root" value="{tmpl_var name='document_root'}" size="30" maxlength="255" type="hidden" class="textInput" />
 <div class="form-group">
diff --git a/interface/web/sites/templates/web_vhost_domain_backup.htm b/interface/web/sites/templates/web_vhost_domain_backup.htm
index 222ae1e3c3..c878170089 100644
--- a/interface/web/sites/templates/web_vhost_domain_backup.htm
+++ b/interface/web/sites/templates/web_vhost_domain_backup.htm
@@ -1,11 +1,13 @@
 <tmpl_if name="config_error_msg">
-  <div style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
-    <p style="font-face:bold">{tmpl_var name='configuration_error_txt'}</p>
-    <div>
-      <div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div>
-      <div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+  <div class="alert alert-danger">
+      <p>
+        <tmpl_var name="configuration_error_txt">
+          <div>
+            <div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div>
+            <div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+          </div>
+      </p>
     </div>
-  </div>
 </tmpl_if>
 
 
diff --git a/interface/web/sites/templates/web_vhost_domain_edit.htm b/interface/web/sites/templates/web_vhost_domain_edit.htm
index 5e6b86f8d3..843c0e564c 100644
--- a/interface/web/sites/templates/web_vhost_domain_edit.htm
+++ b/interface/web/sites/templates/web_vhost_domain_edit.htm
@@ -1,10 +1,13 @@
 <tmpl_if name="config_error_msg">
-<div style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
-                <p style="font-face:bold">{tmpl_var name='configuration_error_txt'}</p>
-				<div>
-				<div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div><div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
-				</div>
-</div>
+<div class="alert alert-danger">
+    <p>
+      <tmpl_var name="configuration_error_txt">
+        <div>
+          <div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div>
+          <div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+        </div>
+    </p>
+  </div>
 </tmpl_if>
 
 
diff --git a/interface/web/sites/templates/web_vhost_domain_redirect.htm b/interface/web/sites/templates/web_vhost_domain_redirect.htm
index 3326d5ec96..597b427a4a 100644
--- a/interface/web/sites/templates/web_vhost_domain_redirect.htm
+++ b/interface/web/sites/templates/web_vhost_domain_redirect.htm
@@ -1,14 +1,17 @@
 <tmpl_if name="config_error_msg">
-<div style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
-                <p style="font-face:bold">{tmpl_var name='configuration_error_txt'}</p>
-				<div>
-				<div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div><div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
-				</div>
-</div>
+<div class="alert alert-danger">
+    <p>
+      <tmpl_var name="configuration_error_txt">
+        <div>
+          <div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div>
+          <div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+        </div>
+    </p>
+  </div>
 </tmpl_if>
 
 
-        
+
             <div class="form-group">
                 <label for="redirect_type" class="col-sm-3 control-label">{tmpl_var name='redirect_type_txt'}</label>
                 <div class="col-sm-9"><select name="redirect_type" id="redirect_type" class="form-control">
@@ -48,14 +51,14 @@
     var webId = jQuery('input[name="id"]').val();
     var serverId;
     getServerId(webId);
-		
+
     function getServerId(webId){
         jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id : webId, type : "getserverid"}, function(data) {
             serverId = data.serverid;
             adjustForm(serverId);
         });
     }
-		
+
     function adjustForm(serverId){
         jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, type : "getservertype"}, function(data) {
             var selected = jQuery('#redirect_type').val();
@@ -77,7 +80,7 @@
                 jQuery('#redirect_type option[value="redirect"]').attr('disabled','disabled');
                 jQuery('#redirect_type option[value="permanent"]').attr('disabled','disabled');
 				//jQuery('#redirect_type option[value="proxy"]').attr('disabled','disabled');
-					
+
                 jQuery('#redirect_type option[value="last"]').hide();
                 jQuery('#redirect_type option[value="break"]').hide();
                 jQuery('#redirect_type option[value="redirect"]').hide();
@@ -88,5 +91,5 @@
             }
         });
     }
-			
+
 </script>
diff --git a/interface/web/sites/templates/web_vhost_domain_ssl.htm b/interface/web/sites/templates/web_vhost_domain_ssl.htm
index d4ec6749e2..686b5e67fd 100644
--- a/interface/web/sites/templates/web_vhost_domain_ssl.htm
+++ b/interface/web/sites/templates/web_vhost_domain_ssl.htm
@@ -1,10 +1,13 @@
 <tmpl_if name="config_error_msg">
-<div style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
-                <p style="font-face:bold">{tmpl_var name='configuration_error_txt'}</p>
-				<div>
-				<div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div><div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
-				</div>
-</div>
+<div class="alert alert-danger">
+    <p>
+      <tmpl_var name="configuration_error_txt">
+        <div>
+          <div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div>
+          <div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+        </div>
+    </p>
+  </div>
 </tmpl_if>
 
 
diff --git a/interface/web/sites/templates/web_vhost_domain_stats.htm b/interface/web/sites/templates/web_vhost_domain_stats.htm
index 6ebf9a6613..153262987c 100644
--- a/interface/web/sites/templates/web_vhost_domain_stats.htm
+++ b/interface/web/sites/templates/web_vhost_domain_stats.htm
@@ -1,10 +1,13 @@
 <tmpl_if name="config_error_msg">
-<div style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
-                <p style="font-face:bold">{tmpl_var name='configuration_error_txt'}</p>
-				<div>
-				<div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div><div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
-				</div>
-</div>
+<div class="alert alert-danger">
+    <p>
+      <tmpl_var name="configuration_error_txt">
+        <div>
+          <div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div>
+          <div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+        </div>
+    </p>
+  </div>
 </tmpl_if>
             <div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='stats_user_txt'}</label>
@@ -43,7 +46,7 @@
                     {tmpl_var name='stats_type'}
                 </select></div>
             </div>
-        
+
 
         <input type="hidden" name="id" value="{tmpl_var name='id'}">
 
-- 
GitLab