Просмотр исходного кода

Hide webmail client option if WEBMAIL_SYSTEM is blank

Kristan Kenney 5 лет назад
Родитель
Сommit
e088f4c6cb

+ 1 - 1
web/templates/admin/add_mail.html

@@ -80,7 +80,7 @@
                                                 <input type="text" size="20" class="vst-input" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
                                             </td>
                                         </tr>
-                                        <?php if($_SESSION['IMAP_SYSTEM']){?>                            
+                                        <?php if($_SESSION['WEBMAIL_SYSTEM']){?>                            
                                             <tr>
                                                 <td class="vst-text step-top">
                                                     <?php print _('Webmail Client');?>

+ 2 - 0
web/templates/admin/add_mail_acc.html

@@ -207,10 +207,12 @@
                             <td><?=_('SMTP auth method')?>:</td>
                             <td><div><?=_('Normal password')?></div></td>
                         </tr>
+                        <?php if($_SESSION['WEBMAIL_SYSTEM']){?>
                         <tr>
                             <td><?=_('Webmail URL')?>:</td>
                             <td><div><a class="vst" href="http://<?=$v_webmail_alias?>" target="_blank">http://<?=$v_webmail_alias?> <i></i></a></div></td>
                         </tr>
+                        <?php } ?>
                     </table>
                 </div>
             </td>

+ 1 - 1
web/templates/admin/edit_mail.html

@@ -64,7 +64,7 @@
                                   <input type="hidden" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
                                 </td>
                             </tr>
-                            <?php if($_SESSION['IMAP_SYSTEM']){?>                            
+                            <?php if($_SESSION['WEBMAIL_SYSTEM']){?>                            
                                 <tr>
                                     <td class="vst-text step-top">
                                         <?php print _('Webmail Client');?>

+ 2 - 0
web/templates/admin/edit_mail_acc.html

@@ -224,10 +224,12 @@
                                 <td><?=_('SMTP auth method')?>:</td>
                                 <td><div><?=_('Normal password')?></div></td>
                             </tr>
+                            <?php if($_SESSION['WEBMAIL_SYSTEM']){?>
                             <tr>
                                 <td><?=_('Webmail URL')?>:</td>
                                 <td><div><a class="vst" href="http://<?=$v_webmail_alias?>" target="_blank">http://<?=$v_webmail_alias?> <i></i></a></div></td>
                             </tr>
+                            <?php } ?>
                         </table>
                     </div>
                 </td>

+ 2 - 0
web/templates/admin/edit_server.html

@@ -412,6 +412,7 @@
                                             </td>
                                         </tr>
                                         <?php } ?>
+                                        <?php if($_SESSION['WEBMAIL_SYSTEM']){?>   
                                         <tr>
                                             <td class="vst-text">
                                                 <?php print _('Webmail URL') ?>
@@ -423,6 +424,7 @@
                                                 <br><br>
                                             </td>
                                         </tr>
+                                        <?php } ?>
 					                    <tr>
                                                 <td class="vst-text">
                                                 <label>

+ 2 - 0
web/templates/admin/list_mail.html

@@ -102,7 +102,9 @@ sort-accounts="<?=$data[$key]['ACCOUNTS']?>" sort-star="<? if($_SESSION['favouri
                             <div class="actions-panel__col actions-panel__logs shortcut-n" key-action="href"><a href="/add/mail/?domain=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Add Mail Account')?>"><i class="fas fa-plus-circle status-icon green status-icon dim"></i></a></div>
                             <div class="actions-panel__col actions-panel__edit shortcut-l" key-action="href"><a href="?domain=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('mail accounts')?>"><i class="fas fa-users status-icon blue status-icon dim"></i></a></div>
                             <div class="actions-panel__col actions-panel__edit shortcut-l" key-action="href"><a href="?domain=<?=$key?>&dns=1&token=<?=$_SESSION['token']?>" title="<?=_('DNS records mail')?>"><i class="fas fa-atlas status-icon blue status-icon dim"></i></a></div>
+                            <?php if($_SESSION['WEBMAIL_SYSTEM']){?>
                             <div class="actions-panel__col actions-panel__edit" key-action="href"><a href="http://<?=$webmail;?>.<?=$key?>/" target="_blank" title="<?=_('open webmail')?>"><i class="fas fa-paper-plane status-icon lightblue status-icon dim"></i></a></div>
+                            <?php } ?>
                             <div class="actions-panel__col actions-panel__logs shortcut-enter" key-action="href"><a href="/edit/mail/?domain=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Mail Domain')?>"><i class="fas fa-pencil-alt status-icon orange status-icon dim"></i></a></div>
 
                             <div class="actions-panel__col actions-panel__suspend shortcut-s" key-action="js">

+ 2 - 1
web/templates/admin/list_mail_acc.html

@@ -98,8 +98,9 @@ sort-star="<? if($_SESSION['favourites']['MAIL_ACC'][$key."@".$_GET['domain']] =
                 <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">
                   <div class="actions-panel clearfix">
                     <div class="actions-panel__col actions-panel__edit" key-action="href"><a href="http://<?=$v_webmail_alias;?>.<?=htmlspecialchars($_GET['domain'])?>/?_user=<?=$key?>@<?=htmlspecialchars($_GET['domain'])?>" target="_blank" title="<?=_('open webmail')?>"><i class="fas fa-envelope-open-text status-icon maroon status-icon dim"></i></a></div>
+                    <?php if($_SESSION['WEBMAIL_SYSTEM']){?>
                     <div class="actions-panel__col actions-panel__logs shortcut-enter" key-action="href"><a href="/edit/mail/?domain=<?=htmlspecialchars($_GET['domain'])?>&account=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Mail Account')?>"><i class="fas fa-pencil-alt status-icon orange status-icon dim"></i></a></div>
-
+                    <?php } ?>
                     <div class="actions-panel__col actions-panel__suspend shortcut-s" key-action="js">
                       <a id="<?=$spnd_action ?>_link_<?=$i?>" class="data-controls do_<?=$spnd_action?>" title="<?=_($spnd_action)?>">
                         <i class="fas <?=$spnd_icon?> status-icon highlight status-icon dim do_<?=$spnd_action?>"></i>

+ 2 - 0
web/templates/admin/list_mail_dns.html

@@ -48,6 +48,7 @@ if (!empty($_SESSION['WEBMAIL_ALIAS'])) $v_webmail_alias = $_SESSION['WEBMAIL_AL
                     <div class="clearfix l-unit__stat-col--left wide-3"><b><input type="text" class="vst-input" value="<?php echo array_key_first($ips);?>"/></b></div>
               </div>
     </div>
+    <?php if($_SESSION['WEBMAIL_SYSTEM']){?>
     <div class="l-unit animated fadeIn">
                   <div class="l-unit__col l-unit__col--right">
                     <div class="clearfix l-unit__stat-col--left wide-3"><b><input type="text" class="vst-input" style="width:200px !important;" value="<?=$v_webmail_alias;?>.<?=htmlspecialchars($_GET['domain']);?>"/></b> </div>
@@ -57,6 +58,7 @@ if (!empty($_SESSION['WEBMAIL_ALIAS'])) $v_webmail_alias = $_SESSION['WEBMAIL_AL
                   <div class="clearfix l-unit__stat-col--left wide-3"><b><input type="text" class="vst-input" value="<?php echo array_key_first($ips);?>"/></b></div>
             </div>
     </div>
+    <?php } ?>
     <div class="l-unit animated fadeIn">
           <div class="l-unit__col l-unit__col--right">
             <div class="clearfix l-unit__stat-col--left wide-3"><b><input type="text" class="vst-input" style="width:200px !important;" value="@"/></b> </div>

+ 2 - 0
web/templates/user/list_mail.html

@@ -101,7 +101,9 @@ sort-accounts="<?=$data[$key]['ACCOUNTS']?>" sort-star="<? if($_SESSION['favouri
                         <div class="actions-panel__col actions-panel__logs shortcut-n" key-action="href"><a href="/add/mail/?domain=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Add Mail Account')?>"><i class="fas fa-plus-circle status-icon green status-icon dim"></i></a></div>
                         <div class="actions-panel__col actions-panel__edit shortcut-l" key-action="href"><a href="?domain=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('mail accounts')?>"><i class="fas fa-users status-icon blue status-icon dim"></i></a></div>
                         <div class="actions-panel__col actions-panel__edit shortcut-l" key-action="href"><a href="?domain=<?=$key?>&dns=1&token=<?=$_SESSION['token']?>" title="<?=_('DNS records mail')?>"><i class="fas fa-atlas status-icon blue status-icon dim"></i></a></div>
+                        <?php if($_SESSION['WEBMAIL_SYSTEM']){?>
                         <div class="actions-panel__col actions-panel__edit" key-action="href"><a href="http://<?=$webmail;?>.<?=$key?>/" target="_blank" title="<?=_('open webmail')?>"><i class="fas fa-paper-plane status-icon lightblue status-icon dim"></i></a></div>
+                        <?php } ?>
                         <div class="actions-panel__col actions-panel__logs shortcut-enter" key-action="href"><a href="/edit/mail/?domain=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Mail Domain')?>"><i class="fas fa-pencil-alt status-icon orange status-icon dim"></i></a></div>
 
                         <div class="actions-panel__col actions-panel__suspend shortcut-s" key-action="js">

+ 2 - 0
web/templates/user/list_mail_acc.html

@@ -97,7 +97,9 @@ sort-star="<? if($_SESSION['favourites']['MAIL_ACC'][$key."@".$_GET['domain']] =
               <div class="clearfix l-unit__stat-col--left text-right compact-4">
                 <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">
                   <div class="actions-panel clearfix">
+                    <?php if($_SESSION['WEBMAIL_SYSTEM']){?>
                     <div class="actions-panel__col actions-panel__edit" key-action="href"><a href="http://<?=$v_webmail_alias;?>.<?=htmlspecialchars($_GET['domain'])?>/?_user=<?=$key?>@<?=htmlspecialchars($_GET['domain'])?>" target="_blank" title="<?=_('open webmail')?>"><i class="fas fa-envelope-open-text status-icon maroon status-icon dim"></i></a></div>
+                    <?php } ?>
                     <div class="actions-panel__col actions-panel__logs shortcut-enter" key-action="href"><a href="/edit/mail/?domain=<?=htmlspecialchars($_GET['domain'])?>&account=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Mail Account')?>"><i class="fas fa-pencil-alt status-icon orange status-icon dim"></i></a></div>
 
                     <div class="actions-panel__col actions-panel__suspend shortcut-s" key-action="js">