From a076c24fd2a45f7a46bdf4415eb0c91a745965e5 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Sun, 10 Jan 2016 17:53:45 +0100
Subject: [PATCH] Improved several forms in mail module.

---
 .../web/mail/templates/mail_alias_edit.htm    | 16 +++++----
 .../templates/mail_domain_catchall_edit.htm   | 16 ++++-----
 .../web/mail/templates/mail_forward_edit.htm  | 14 ++++----
 .../mail/templates/mail_mailinglist_edit.htm  |  9 ++++-
 .../mail/templates/mail_transport_edit.htm    |  4 ++-
 .../mail/templates/spamfilter_other_edit.htm  |  6 ++--
 .../web/mail/templates/xmpp_user_edit.htm     | 34 +++++++++++--------
 7 files changed, 57 insertions(+), 42 deletions(-)

diff --git a/interface/web/mail/templates/mail_alias_edit.htm b/interface/web/mail/templates/mail_alias_edit.htm
index 352210b4c1..07d781c676 100644
--- a/interface/web/mail/templates/mail_alias_edit.htm
+++ b/interface/web/mail/templates/mail_alias_edit.htm
@@ -3,15 +3,17 @@
 </div>
 <p><tmpl_var name="list_desc_txt"></p>
 
-
-        
-            <div class="form-group">
+			<div class="form-group">
                 <label class="col-sm-3 control-label"><em>*</em> {tmpl_var name='email_txt'}</label>
                 <div class="col-sm-9">
-                    <label for="email_local_part" class="col-sm-3 control-label">Alias<div class="col-sm-9"><input type="text" id="email_local_part" name="email_local_part" value="{tmpl_var name='email_local_part'}" class="form-control" /></div></label>
-                    <label for="email_at" class="col-sm-3 control-label">&nbsp;<span id="email_at" name="email_at" />@</label>
-                    <label for="email_domain" class="col-sm-3 control-label">{tmpl_var name='domain_txt'}<div class="col-sm-9"><select name="email_domain" id="email_domain" class="form-control">{tmpl_var name='email_domain'}</select></div></label>
-                </div>
+				    <div class='input-group'>
+						<input type="text" id="email_local_part" name="email_local_part" value="{tmpl_var name='email_local_part'}" class="form-control" />
+						<span class='input-group-addon'>@</span>
+                        <div class='input-group-field'>
+							<select name="email_domain" id="email_domain" class="form-control" style="height:50px;">{tmpl_var name='email_domain'}</select>
+                        </div>
+                    </div>
+				</div>
             </div>
             <div class="form-group">
                 <label for="destination" class="col-sm-3 control-label">{tmpl_var name='destination_txt'}</label>
diff --git a/interface/web/mail/templates/mail_domain_catchall_edit.htm b/interface/web/mail/templates/mail_domain_catchall_edit.htm
index 38a924625b..63c4405de2 100644
--- a/interface/web/mail/templates/mail_domain_catchall_edit.htm
+++ b/interface/web/mail/templates/mail_domain_catchall_edit.htm
@@ -2,15 +2,14 @@
 	<h1><tmpl_var name="list_head_txt"></h1>
 </div>
 <p><tmpl_var name="list_desc_txt"></p>
-
-
-        
-            <div class="form-group">
-                <label class="col-sm-3 control-label">{tmpl_var name='source_txt'}</label>
+			<div class="form-group">
+                <label for="email_domain" class="col-sm-3 control-label">{tmpl_var name='source_txt'}</label>
                 <div class="col-sm-9">
-                    <label for="email_at" class="col-sm-3 control-label">&nbsp;<span id="email_at" name="email_at" />@</label>
-                    <label for="email_domain" class="col-sm-3 control-label">{tmpl_var name='domain_txt'}<div class="col-sm-9"><select name="email_domain" id="email_domain" class="form-control">{tmpl_var name='email_domain'}</select></div></label>
-                </div>
+					<div class="input-group">
+						<span class="input-group-addon" id="domain-desc">* @</span>
+						<select name="email_domain" id="email_domain" class="form-control" aria-describedby="domain-desc">{tmpl_var name='email_domain'}</select>
+					</div>
+				</div>
             </div>
             <div class="form-group">
                 <label for="destination" class="col-sm-3 control-label">{tmpl_var name='destination_txt'}</label>
@@ -22,7 +21,6 @@
                 </div>
             </div>
         
-
         <input type="hidden" name="id" value="{tmpl_var name='id'}">
         <input type="hidden" name="type" value="catchall">
 
diff --git a/interface/web/mail/templates/mail_forward_edit.htm b/interface/web/mail/templates/mail_forward_edit.htm
index 4a5a784604..c6a2de878c 100644
--- a/interface/web/mail/templates/mail_forward_edit.htm
+++ b/interface/web/mail/templates/mail_forward_edit.htm
@@ -3,15 +3,17 @@
 </div>
 <p><tmpl_var name="list_desc_txt"></p>
 
-
-        
             <div class="form-group">
                 <label class="col-sm-3 control-label"><em>*</em> {tmpl_var name='email_txt'}</label>
                 <div class="col-sm-9">
-                    <label for="email_local_part" class="col-sm-3 control-label">Alias<div class="col-sm-9"><input type="text" id="email_local_part" name="email_local_part" value="{tmpl_var name='email_local_part'}" class="form-control" /></div></label>
-                    <label for="email_at" class="col-sm-3 control-label">&nbsp;<span id="email_at" name="email_at" />@</label>
-                    <label for="email_domain" class="col-sm-3 control-label">{tmpl_var name='domain_txt'}<div class="col-sm-9"><select name="email_domain" id="email_domain" class="form-control">{tmpl_var name='email_domain'}</select></div></label>
-                </div>
+				    <div class='input-group'>
+						<input type="text" id="email_local_part" name="email_local_part" value="{tmpl_var name='email_local_part'}" class="form-control" />
+						<span class='input-group-addon'>@</span>
+                        <div class='input-group-field'>
+							<select name="email_domain" id="email_domain" class="form-control" style="height:50px;">{tmpl_var name='email_domain'}</select>
+                        </div>
+                    </div>
+				</div>
             </div>
             <div class="form-group">
                 <label for="destination" class="col-sm-3 control-label">{tmpl_var name='destination_txt'}</label>
diff --git a/interface/web/mail/templates/mail_mailinglist_edit.htm b/interface/web/mail/templates/mail_mailinglist_edit.htm
index f6d77843fc..fc09a27190 100644
--- a/interface/web/mail/templates/mail_mailinglist_edit.htm
+++ b/interface/web/mail/templates/mail_mailinglist_edit.htm
@@ -56,7 +56,14 @@
             </tmpl_if>
             <div class="form-group">
                 <label for="password" class="col-sm-3 control-label">{tmpl_var name='password_txt'}</label>
-                <div class="col-sm-6"><input type="password" name="password" id="password" value="{tmpl_var name='password'}" class="form-control" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /></div><div class="col-sm-3 input-sm">&nbsp;</div><a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a>
+                <div class="col-sm-9">
+				<div class="input-group">
+					<input type="password" name="password" id="password" value="{tmpl_var name='password'}" class="form-control" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" />
+					<span class="input-group-btn">
+						<button class="btn btn-default" type="button" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</button>
+					</span>
+				</div>
+				</div>
             </div>
             <div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='password_strength_txt'}</label>
diff --git a/interface/web/mail/templates/mail_transport_edit.htm b/interface/web/mail/templates/mail_transport_edit.htm
index ebde99ebf3..e0332de1b6 100644
--- a/interface/web/mail/templates/mail_transport_edit.htm
+++ b/interface/web/mail/templates/mail_transport_edit.htm
@@ -22,7 +22,9 @@
             </div>
             <div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='mx_txt'}</label>
-                <div class="col-sm-9"><input class="form-control" type="checkbox" value="y" id="mx" name="mx" {tmpl_var name='mx'} /></div>
+                <div class="col-sm-9">
+					<input type="checkbox" value="y" id="mx" name="mx" {tmpl_var name='mx'} />
+				</div>
             </div>
             <div class="form-group">
                 <label for="destination" class="col-sm-3 control-label">{tmpl_var name='destination_txt'}</label>
diff --git a/interface/web/mail/templates/spamfilter_other_edit.htm b/interface/web/mail/templates/spamfilter_other_edit.htm
index 9716472e4a..83cd4a95c9 100644
--- a/interface/web/mail/templates/spamfilter_other_edit.htm
+++ b/interface/web/mail/templates/spamfilter_other_edit.htm
@@ -50,10 +50,10 @@
             <div class="form-group">
                 <label for="spam_admin" class="col-sm-3 control-label">{tmpl_var name='spam_admin_txt'}</label>
                 <div class="col-sm-9"><input type="text" name="spam_admin" id="spam_admin" value="{tmpl_var name='spam_admin'}" class="form-control" /></div></div>
-            <div class="form-group">
+			<div class="form-group">
                 <label for="message_size_limit" class="col-sm-3 control-label">{tmpl_var name='message_size_limit_txt'}</label>
-                <div class="col-sm-6"><input type="text" name="message_size_limit" id="message_size_limit" value="{tmpl_var name='message_size_limit'}" class="form-control" /></div><div class="col-sm-3 input-sm">&nbsp;Bytes
-            </div></div>
+                <div class="col-sm-9"><div class="input-group"><input type="text" name="message_size_limit" id="message_size_limit" value="{tmpl_var name='message_size_limit'}" class="form-control" aria-describedby="message_size_limit-desc" /><span class="input-group-addon" id="message_size_limit-desc">Bytes</span></div></div>
+            </div>
             <div class="form-group">
                 <label for="banned_rulenames" class="col-sm-3 control-label">{tmpl_var name='banned_rulenames_txt'}</label>
                 <div class="col-sm-9"><input type="text" name="banned_rulenames" id="banned_rulenames" value="{tmpl_var name='banned_rulenames'}" class="form-control" /></div></div>
diff --git a/interface/web/mail/templates/xmpp_user_edit.htm b/interface/web/mail/templates/xmpp_user_edit.htm
index e155ec0231..5682aac5f1 100644
--- a/interface/web/mail/templates/xmpp_user_edit.htm
+++ b/interface/web/mail/templates/xmpp_user_edit.htm
@@ -2,24 +2,28 @@
 	<h1><tmpl_var name="list_head_txt"></h1>
 </div>
 <p><tmpl_var name="list_desc_txt"></p>
-
-
-        
-
-            <div class="form-group">
+			<div class="form-group">
                 <label class="col-sm-3 control-label"><em>*</em> {tmpl_var name='jid_txt'}</label>
-                <div class="col-sm-4">
-                    <input type="text" id="jid_local_part" name="jid_local_part" value="{tmpl_var name='jid_local_part'}" class="form-control" />
-                </div>
-                <div class="col-sm-1 text-center">@</div>
-                <div class="col-sm-4">
-                    <select name="jid_domain" id="jid_domain" class="form-control">{tmpl_var name='jid_domain'}</select>
-                </div>
+                <div class="col-sm-9">
+				    <div class='input-group'>
+						<input type="text" id="jid_local_part" name="jid_local_part" value="{tmpl_var name='jid_local_part'}" class="form-control" />
+						<span class='input-group-addon'>@</span>
+                        <div class='input-group-field'>
+							<select name="jid_domain" id="jid_domain" class="form-control" style="height:50px;">{tmpl_var name='jid_domain'}</select>
+                        </div>
+                    </div>
+				</div>
             </div>
-
-            <div class="form-group">
+			<div class="form-group">
                 <label for="password" class="col-sm-3 control-label">{tmpl_var name='password_txt'}</label>
-                <div class="col-sm-6"><input type="password" name="password" id="password" value="{tmpl_var name='password'}" class="form-control" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /></div><div class="col-sm-3 input-sm">&nbsp;</div><a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a>
+                <div class="col-sm-9">
+				<div class="input-group">
+					<input type="password" name="password" id="password" value="{tmpl_var name='password'}" class="form-control" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" />
+					<span class="input-group-btn">
+						<button class="btn btn-default" type="button" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</button>
+					</span>
+				</div>
+				</div>
             </div>
             <div class="form-group">
                 <label class="col-sm-3 control-label">{tmpl_var name='password_strength_txt'}</label>
-- 
GitLab