git subrepo commit (merge) mailcow/src/mailcow-dockerized

subrepo: subdir:   "mailcow/src/mailcow-dockerized"
  merged:   "02ae5285"
upstream: origin:   "https://github.com/mailcow/mailcow-dockerized.git"
  branch:   "master"
  commit:   "649a5c01"
git-subrepo: version:  "0.4.3"
  origin:   "???"
  commit:   "???"
Change-Id: I870ad468fba026cc5abf3c5699ed1e12ff28b32b
diff --git a/mailcow/src/mailcow-dockerized/data/web/modals/mailbox.php b/mailcow/src/mailcow-dockerized/data/web/modals/mailbox.php
index c1362c4..77533ea 100644
--- a/mailcow/src/mailcow-dockerized/data/web/modals/mailbox.php
+++ b/mailcow/src/mailcow-dockerized/data/web/modals/mailbox.php
@@ -72,7 +72,7 @@
           <hr>

           <div class="form-group">

             <div class="col-sm-offset-2 col-sm-10">

-              <button class="btn btn-default" data-action="add_item" data-id="add_mailbox" data-api-url='add/mailbox' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>

+              <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-action="add_item" data-id="add_mailbox" data-api-url='add/mailbox' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>

             </div>

           </div>

         </form>

@@ -153,14 +153,14 @@
           <div class="form-group">

             <label class="control-label col-sm-2" for="rl_frame"><?=$lang['acl']['ratelimit'];?></label>

             <div class="col-sm-7">

-            <input name="rl_value" type="number" value="<?=(!empty($rl['value'])) ? $rl['value'] : null;?>" class="form-control" placeholder="disabled">

+            <input name="rl_value" type="number" value="<?=(!empty($rl['value'])) ? $rl['value'] : null;?>" class="form-control" placeholder="<?=$lang['ratelimit']['disabled']?>">

             </div>

             <div class="col-sm-3">

             <select name="rl_frame" class="form-control">

-              <option value="s" <?=(isset($rl['frame']) && $rl['frame'] == 's') ? 'selected' : null;?>>msgs / second</option>

-              <option value="m" <?=(isset($rl['frame']) && $rl['frame'] == 'm') ? 'selected' : null;?>>msgs / minute</option>

-              <option value="h" <?=(isset($rl['frame']) && $rl['frame'] == 'h') ? 'selected' : null;?>>msgs / hour</option>

-              <option value="d" <?=(isset($rl['frame']) && $rl['frame'] == 'd') ? 'selected' : null;?>>msgs / day</option>

+              <option value="s" <?=(isset($rl['frame']) && $rl['frame'] == 's') ? 'selected' : null;?>><?=$lang['ratelimit']['second']?></option>

+              <option value="m" <?=(isset($rl['frame']) && $rl['frame'] == 'm') ? 'selected' : null;?>><?=$lang['ratelimit']['minute']?></option>

+              <option value="h" <?=(isset($rl['frame']) && $rl['frame'] == 'h') ? 'selected' : null;?>><?=$lang['ratelimit']['hour']?></option>

+              <option value="d" <?=(isset($rl['frame']) && $rl['frame'] == 'd') ? 'selected' : null;?>><?=$lang['ratelimit']['day']?></option>

             </select>

             </div>

           </div>

@@ -182,18 +182,19 @@
           </div>

           <hr>

           <div class="form-group">

-            <div class="col-sm-offset-2 col-sm-10">

+            <div class="col-sm-offset-2 col-sm-10 btn-group">

               <?php if (getenv('SKIP_SOGO') != "y") { ?>

-              <button class="btn btn-default" data-action="add_item" data-id="add_domain" data-api-url='add/domain' data-api-attr='{}' href="#"><?=$lang['add']['add_domain_only'];?></button>

-              <button class="btn btn-default" data-action="add_item" data-id="add_domain" data-api-url='add/domain' data-api-attr='{"restart_sogo":"1"}' href="#"><?=$lang['add']['add_domain_restart'];?></button>

+              <button class="btn btn-xs-lg btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" data-action="add_item" data-id="add_domain" data-api-url='add/domain' data-api-attr='{}' href="#"><?=$lang['add']['add_domain_only'];?></button>

+              <button class="btn btn-xs-lg btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" data-action="add_item" data-id="add_domain" data-api-url='add/domain' data-api-attr='{"restart_sogo":"1"}' href="#"><?=$lang['add']['add_domain_restart'];?></button>

+              <div class="clearfix visible-xs"></div>

               <?php } else { ?>

-              <button class="btn btn-default" data-action="add_item" data-id="add_domain" data-api-url='add/domain' data-api-attr='{}' href="#"><?=$lang['add']['add'];?></button>

+              <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-action="add_item" data-id="add_domain" data-api-url='add/domain' data-api-attr='{}' href="#"><?=$lang['add']['add'];?></button>

               <?php } ?>

             </div>

           </div>

           <?php // TODO: Separate SOGo-related text

           if (getenv('SKIP_SOGO') != "y") { ?>

-          <p><span class="glyphicon glyphicon-exclamation-sign text-danger"></span> <?=$lang['add']['post_domain_add'];?></p>

+          <p><i class="bi bi-shield-fill-exclamation text-danger"></i> <?=$lang['add']['post_domain_add'];?></p>

           <?php } ?>

         </form>

       </div>

@@ -262,7 +263,7 @@
           </div>

           <div class="form-group">

             <div class="col-sm-offset-2 col-sm-10">

-              <button class="btn btn-default" data-action="add_item" data-id="add_resource" data-api-url='add/resource' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>

+              <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-action="add_item" data-id="add_resource" data-api-url='add/resource' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>

             </div>

           </div>

         </form>

@@ -320,7 +321,7 @@
           </div>

           <div class="form-group">

             <div class="col-sm-offset-2 col-sm-10">

-              <button class="btn btn-default" data-action="add_item" data-id="add_alias" data-api-url='add/alias' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>

+              <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-action="add_item" data-id="add_alias" data-api-url='add/alias' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>

             </div>

           </div>

         </form>

@@ -369,20 +370,20 @@
           <div class="form-group">

             <label class="control-label col-sm-2" for="rl_frame"><?=$lang['acl']['ratelimit'];?></label>

             <div class="col-sm-7">

-            <input name="rl_value" type="number" value="<?=(!empty($rl['value'])) ? $rl['value'] : null;?>" class="form-control" placeholder="disabled">

+            <input name="rl_value" type="number" value="<?=(!empty($rl['value'])) ? $rl['value'] : null;?>" class="form-control" placeholder="<?=$lang['ratelimit']['disabled']?>">

             </div>

             <div class="col-sm-3">

             <select name="rl_frame" class="form-control">

-              <option value="s" <?=(isset($rl['frame']) && $rl['frame'] == 's') ? 'selected' : null;?>>msgs / second</option>

-              <option value="m" <?=(isset($rl['frame']) && $rl['frame'] == 'm') ? 'selected' : null;?>>msgs / minute</option>

-              <option value="h" <?=(isset($rl['frame']) && $rl['frame'] == 'h') ? 'selected' : null;?>>msgs / hour</option>

-              <option value="d" <?=(isset($rl['frame']) && $rl['frame'] == 'd') ? 'selected' : null;?>>msgs / day</option>

+              <option value="s" <?=(isset($rl['frame']) && $rl['frame'] == 's') ? 'selected' : null;?>><?=$lang['ratelimit']['second']?></option>

+              <option value="m" <?=(isset($rl['frame']) && $rl['frame'] == 'm') ? 'selected' : null;?>><?=$lang['ratelimit']['minute']?></option>

+              <option value="h" <?=(isset($rl['frame']) && $rl['frame'] == 'h') ? 'selected' : null;?>><?=$lang['ratelimit']['hour']?></option>

+              <option value="d" <?=(isset($rl['frame']) && $rl['frame'] == 'd') ? 'selected' : null;?>><?=$lang['ratelimit']['day']?></option>

             </select>

             </div>

           </div>

           <div class="form-group">

             <div class="col-sm-offset-2 col-sm-10">

-              <button class="btn btn-default" data-action="add_item" data-id="add_alias_domain" data-api-url='add/alias-domain' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>

+              <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-action="add_item" data-id="add_alias_domain" data-api-url='add/alias-domain' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>

             </div>

           </div>

         </form>

@@ -559,7 +560,7 @@
           </div>

           <div class="form-group">

             <div class="col-sm-offset-2 col-sm-10">

-              <button class="btn btn-default" data-action="add_item" data-id="add_syncjob" data-api-url='add/syncjob' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>

+              <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-action="add_item" data-id="add_syncjob" data-api-url='add/syncjob' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>

             </div>

           </div>

         </form>

@@ -625,9 +626,10 @@
             </div>

           </div>

           <div class="form-group">

-            <div class="col-sm-offset-2 col-sm-10 add_filter_btns">

-              <button class="btn btn-default validate_sieve" href="#"><?=$lang['add']['validate'];?></button>

-              <button class="btn btn-success add_sieve_script" data-action="add_item" data-id="add_filter" data-api-url='add/filter' data-api-attr='{}' href="#" disabled><?=$lang['admin']['add'];?></button>

+            <div class="col-sm-offset-2 col-sm-10 add_filter_btns btn-group">

+              <button class="btn btn-xs-lg btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default validate_sieve" href="#"><?=$lang['add']['validate'];?></button>

+              <button class="btn btn-xs-lg btn-xs-half visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success add_sieve_script" data-action="add_item" data-id="add_filter" data-api-url='add/filter' data-api-attr='{}' href="#" disabled><?=$lang['admin']['add'];?></button>

+              <div class="clearfix visible-xs"></div>

             </div>

           </div>

         </form>

@@ -650,25 +652,38 @@
           <div class="form-group">

             <label class="control-label col-sm-2" for="local_dest"><?=$lang['mailbox']['bcc_local_dest'];?></label>

             <div class="col-sm-10">

-              <select data-live-search="true" name="local_dest" required>

+              <select data-live-search="true" data-size="20" name="local_dest" required>

               <?php

               $domains = mailbox('get', 'domains');

               $alias_domains = mailbox('get', 'alias_domains');

               if (!empty($domains)) {

+                echo '<optgroup label="',$lang['mailbox']['domains'],'">';

                 foreach ($domains as $domain) {

                   echo "<option>".htmlspecialchars($domain)."</option>";

                 }

+                echo "</optgroup>";

               }

               if (!empty($alias_domains)) {

+                echo '<optgroup label="',$lang['mailbox']['domain_aliases'],'">';

                 foreach ($alias_domains as $alias_domain) {

                   echo "<option>".htmlspecialchars($alias_domain)."</option>";

                 }

+                echo "</optgroup>";

               }

               if (!empty($domains)) {

                 foreach ($domains as $domain) {

                   $mailboxes = mailbox('get', 'mailboxes', $domain);

                   foreach ($mailboxes as $mailbox) {

-                    echo "<option>".htmlspecialchars($mailbox)."</option>";

+                    echo "<optgroup label=\"" . htmlspecialchars($mailbox) . "\">";

+                    echo "<option> " . htmlspecialchars($mailbox) . "</option>";

+                    $user_alias_details = user_get_alias_details($mailbox);

+                    foreach ($user_alias_details['direct_aliases'] as $k => $v) {

+                      echo "<option>" . htmlspecialchars($k) . "</option>";

+                    }

+                    foreach ($user_alias_details['shared_aliases'] as $k => $v) {

+                      echo "<option>" . htmlspecialchars($k) . "</option>";

+                    }

+                    echo "</optgroup>";

                   }

                 }

               }

@@ -689,6 +704,7 @@
             <label class="control-label col-sm-2" for="bcc_dest"><?=$lang['mailbox']['bcc_destination'];?></label>

             <div class="col-sm-10">

               <input type="text" class="form-control" name="bcc_dest">

+              <small><?=$lang['add']['bcc_dest_format'];?></small>

             </div>

           </div>

           <div class="form-group">

@@ -700,7 +716,7 @@
           </div>

           <div class="form-group">

             <div class="col-sm-offset-2 col-sm-10">

-              <button class="btn btn-success" data-action="add_item" data-id="add_bcc" data-api-url='add/bcc' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>

+              <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-action="add_item" data-id="add_bcc" data-api-url='add/bcc' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>

             </div>

           </div>

         </form>

@@ -741,7 +757,7 @@
           </div>

           <div class="form-group">

             <div class="col-sm-offset-2 col-sm-10">

-              <button class="btn btn-success" data-action="add_item" data-id="add_recipient_map" data-api-url='add/recipient_map' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>

+              <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-action="add_item" data-id="add_recipient_map" data-api-url='add/recipient_map' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>

             </div>

           </div>

         </form>

@@ -797,7 +813,7 @@
           </div>

           <div class="form-group">

             <div class="col-sm-offset-2 col-sm-10">

-              <button class="btn btn-success" data-action="add_item" data-id="add_tls_policy_map" data-api-url='add/tls-policy-map' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>

+              <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-action="add_item" data-id="add_tls_policy_map" data-api-url='add/tls-policy-map' data-api-attr='{}' href="#"><?=$lang['admin']['add'];?></button>

             </div>

           </div>

         </form>

@@ -809,7 +825,10 @@
 <div class="modal fade" id="syncjobLogModal" tabindex="-1" role="dialog" aria-labelledby="syncjobLogModalLabel">

   <div class="modal-dialog modal-lg" role="document">

     <div class="modal-content">

-      <div class="modal-header"><h4 class="modal-title">Log</h4></div>

+      <div class="modal-header">

+	    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>

+	    <h3 class="modal-title">Log</h3>

+	  </div>

       <div class="modal-body">

         <textarea class="form-control" rows="20" id="logText" spellcheck="false"></textarea>

       </div>

@@ -820,10 +839,14 @@
 <div class="modal fade" id="dnsInfoModal" tabindex="-1" role="dialog" aria-labelledby="dnsInfoModalLabel">

   <div class="modal-dialog modal-lg" role="document">

     <div class="modal-content">

-      <div class="modal-header"><h4 class="modal-title"><?=$lang['diagnostics']['dns_records'];?></h4></div>

+      <div class="modal-header">

+	    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>

+	    <h3 class="modal-title"><?=$lang['diagnostics']['dns_records'];?></h3>

+	  </div>

       <div class="modal-body">

         <p><?=$lang['diagnostics']['dns_records_24hours'];?></p>

         <div class="dns-modal-body"></div>

+        <p><?=$lang['diagnostics']['dns_records_docs'];?></p>

       </div>

     </div>

   </div>