Browse Source

Hide DNS fields if no DNS server is present

Kristan Kenney 6 years ago
parent
commit
336e2a7afc

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

@@ -298,6 +298,7 @@
                                     <img name="unlim-bandwidth" class="unlim-trigger" src="/images/unlim.png" />
                                 </td>
                             </tr>
+                            <?php if ((isset($_SESSION['DNS_SYSTEM'])) && (!empty($_SESSION['DNS_SYSTEM']))) {?>
                             <tr>
                                 <td class="vst-text input-label">
                                     <?php print __('Name servers');?>
@@ -368,6 +369,7 @@
                                       <span class="add-ns-button additional-control add"><?=__('Add one more Name Server')?></span>
                                     </td>
                                 </tr>
+                            <?php } ?>
                         </table>
                         <table class="data-col2">
                         </table>

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

@@ -295,6 +295,7 @@
                                     <img name="unlim-bandwidth" class="unlim-trigger" src="/images/unlim.png" />
                                 </td>
                             </tr>
+                        <?php if ((isset($_SESSION['DNS_SYSTEM'])) && (!empty($_SESSION['DNS_SYSTEM']))) {?>
                             <tr>
                                 <td class="vst-text input-label">
                                     <?php print __('Name Servers');?>
@@ -367,7 +368,7 @@
                                       <span class="add-ns-button additional-control add"><?=__('Add one more Name Server')?></span>
                                     </td>
                                 </tr>
-
+                            <?php } ?>
                         </table>
                         <table class="data-col2">
                         </table>

+ 2 - 2
web/templates/admin/edit_user.html

@@ -178,6 +178,7 @@
                                     </select>
                                 </td>
                             </tr>
+                        <?php if ((isset($_SESSION['DNS_SYSTEM'])) && (!empty($_SESSION['DNS_SYSTEM']))) {?>
                             <tr>
                                 <td class="vst-text input-label">
                                     <?php print __('Default Name Servers');?>
@@ -249,8 +250,7 @@
                                       <span class="add-ns-button additional-control add"><?=__('Add one more Name Server')?></span>
                                     </td>
                                 </tr>
-
-
+                            <?php } ?>
                         </table>
                         <table class="data-col2">
                         </table>