|
1 | 1 | <!-- Begin toolbar --> |
2 | 2 | <div class="l-center edit"> |
3 | | - <div class="l-sort clearfix"> |
4 | | - <div class="l-unit-toolbar__buttonstrip"> |
5 | | - <a class="ui-button cancel" dir="ltr" id="btn-back" href="/list/dns/?domain=<?=htmlentities(trim($v_domain, "'"))?>&token=<?=$_SESSION['token']?>"><i class="fas fa-arrow-left status-icon blue"></i><?=_('Back');?></a> |
6 | | - </div> |
7 | | - <div class="l-unit-toolbar__buttonstrip float-right"> |
8 | | - <a href="#" class="ui-button" data-action="submit" data-id="vstobjects"><i class="fas fa-save status-icon purple"></i><?=_('Save');?></a> |
9 | | - </div> |
10 | | - </div> |
| 3 | + <div class="l-sort clearfix"> |
| 4 | + <div class="l-unit-toolbar__buttonstrip"> |
| 5 | + <a class="ui-button cancel" dir="ltr" id="btn-back" href="/list/dns/?domain=<?=htmlentities(trim($v_domain, "'"))?>&token=<?=$_SESSION['token']?>"><i class="fas fa-arrow-left status-icon blue"></i><?=_('Back');?></a> |
| 6 | + </div> |
| 7 | + <div class="l-unit-toolbar__buttonstrip float-right"> |
| 8 | + <a href="#" class="ui-button" data-action="submit" data-id="vstobjects"><i class="fas fa-save status-icon purple"></i><?=_('Save');?></a> |
| 9 | + </div> |
| 10 | + </div> |
11 | 11 | </div> |
12 | 12 | <!-- End toolbar --> |
13 | 13 |
|
14 | 14 | <div class="l-separator"></div> |
15 | 15 |
|
16 | 16 | <div class="l-center animated fadeIn"> |
17 | 17 |
|
18 | | - <form id="vstobjects" name="v_add_dns_rec" method="post"> |
19 | | - <input type="hidden" name="token" value="<?=$_SESSION['token']?>"> |
20 | | - <input type="hidden" name="ok_rec" value="add"> |
| 18 | + <form id="vstobjects" name="v_add_dns_rec" method="post"> |
| 19 | + <input type="hidden" name="token" value="<?=$_SESSION['token']?>"> |
| 20 | + <input type="hidden" name="ok_rec" value="add"> |
| 21 | + |
| 22 | + <div class="app-form"> |
| 23 | + <h1 class="page-title"><?=_('Adding DNS Record');?></h1> |
| 24 | + <?php show_error_panel($_SESSION);?> |
| 25 | + <div class="u-input-width"> |
| 26 | + <div class="u-mb10"> |
| 27 | + <label for="v_domain" class="form-label"><?=_('Domain');?></label> |
| 28 | + <input type="text" class="form-control" name="v_domain" id="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>" disabled> |
| 29 | + <input type="hidden" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>"> |
| 30 | + </div> |
| 31 | + <div class="u-mb10"> |
| 32 | + <label for="v_rec" class="form-label"><?=_('Record');?></label> |
| 33 | + <input type="text" class="form-control" name="v_rec" id="v_rec" value="<?=htmlentities(trim($v_rec, "'"))?>"> |
| 34 | + <small class="hint"></small> |
| 35 | + </div> |
| 36 | + <div class="u-mb10"> |
| 37 | + <label for="v_type" class="form-label"><?=_('Type');?></label> |
| 38 | + <select class="form-select" name="v_type" id="v_type"> |
| 39 | + <option value="A" <?php if ($v_type == 'A') echo "selected"; ?>>A</option> |
| 40 | + <option value="AAAA" <?php if ($v_type == 'AAAA') echo "selected"; ?>>AAAA</option> |
| 41 | + <option value="CAA" <?php if ($v_type == 'CAA') echo "selected"; ?>>CAA</option> |
| 42 | + <option value="CNAME" <?php if ($v_type == 'CNAME') echo "selected"; ?>>CNAME</option> |
| 43 | + <option value="DNSKEY" <?php if ($v_type == 'DNSKEY') echo "selected"; ?>>DNSKEY</option> |
| 44 | + <option value="IPSECKEY" <?php if ($v_type == 'IPSECKEY') echo "selected"; ?>>IPSECKEY</option> |
| 45 | + <option value="KEY" <?php if ($v_type == 'KEY') echo "selected"; ?>>KEY</option> |
| 46 | + <option value="MX" <?php if ($v_type == 'MX') echo "selected"; ?>>MX</option> |
| 47 | + <option value="NS" <?php if ($v_type == 'NS') echo "selected"; ?>>NS</option> |
| 48 | + <option value="PTR" <?php if ($v_type == 'PTR') echo "selected"; ?>>PTR</option> |
| 49 | + <option value="SPF" <?php if ($v_type == 'SPF') echo "selected"; ?>>SPF</option> |
| 50 | + <option value="SRV" <?php if ($v_type == 'SRV') echo "selected"; ?>>SRV</option> |
| 51 | + <option value="TLSA" <?php if ($v_type == 'TLSA') echo "selected"; ?>>TLSA</option> |
| 52 | + <option value="TXT" <?php if ($v_type == 'TXT') echo "selected"; ?>>TXT</option> |
| 53 | + </select> |
| 54 | + </div> |
| 55 | + <div class="u-mb10"> |
| 56 | + <label for="v_val" class="form-label"><?=_('IP or Value');?></label> |
| 57 | + <div class="u-pos-relative"> |
| 58 | + <select class="form-select" tabindex="-1" onchange="this.nextElementSibling.value=this.value"> |
| 59 | + <option value=""> </option> |
| 60 | + <?php |
| 61 | + foreach ($v_ips as $ip => $value) { |
| 62 | + $display_ip = empty($value['NAT']) ? $ip : "{$value['NAT']}"; |
| 63 | + echo "<option value='{$display_ip}'>" . htmlentities($display_ip) . "</option>\n"; |
| 64 | + } |
| 65 | + ?> |
| 66 | + </select> |
| 67 | + <input type="text" class="form-control list-editor" name="v_val" id="v_val" value="<?=htmlentities(trim($v_val, "'"))?>"> |
| 68 | + </div> |
| 69 | + </div> |
| 70 | + <div class="u-mb10"> |
| 71 | + <label for="v_priority" class="form-label"> |
| 72 | + <?=_('Priority');?> <span class="optional">(<?=_('optional');?>)</span> |
| 73 | + </label> |
| 74 | + <input type="text" class="form-control" name="v_priority" id="v_priority" value="<?=htmlentities(trim($v_priority, "'"))?>"> |
| 75 | + </div> |
| 76 | + <div class="u-mb10"> |
| 77 | + <label for="v_ttl" class="form-label"> |
| 78 | + <?=_('TTL');?> <span class="optional">(<?=_('optional');?>)</span> |
| 79 | + </label> |
| 80 | + <input type="text" class="form-control" name="v_ttl" id="v_ttl" value="<?=htmlentities(trim($v_ttl, "'"))?>"> |
| 81 | + </div> |
| 82 | + </div> |
| 83 | + </div> |
| 84 | + |
| 85 | + </form> |
21 | 86 |
|
22 | | - <table class="data"> |
23 | | - <tr class="data-add"> |
24 | | - <td class="data-dotted"> |
25 | | - <table class="data-col1"> |
26 | | - <tr> |
27 | | - <td></td> |
28 | | - </tr> |
29 | | - </table> |
30 | | - </td> |
31 | | - <td class="data-dotted"> |
32 | | - <table class="data-col2" width="600px"> |
33 | | - <tr> |
34 | | - <td class="u-pt18"> |
35 | | - <span class="page-title"><?=_('Adding DNS Record');?></span> |
36 | | - </td> |
37 | | - </tr> |
38 | | - <tr> |
39 | | - <td> |
40 | | - <?php show_error_panel($_SESSION);?> |
41 | | - </td> |
42 | | - </tr> |
43 | | - <tr> |
44 | | - <td class="u-pt18"> |
45 | | - <label for="v_domain" class="form-label"><?=_('Domain');?></label> |
46 | | - <input type="text" class="form-control u-input-width" name="v_domain" id="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>" disabled> |
47 | | - <input type="hidden" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>"> |
48 | | - </td> |
49 | | - </tr> |
50 | | - <tr> |
51 | | - <td class="u-pt6"> |
52 | | - <label for="v_rec" class="form-label"><?=_('Record');?></label> |
53 | | - <input type="text" class="form-control u-input-width" name="v_rec" id="v_rec" value="<?=htmlentities(trim($v_rec, "'"))?>"> |
54 | | - <small class="hint"></small> |
55 | | - </td> |
56 | | - </tr> |
57 | | - <tr> |
58 | | - <td class="u-pt6"> |
59 | | - <label for="v_type" class="form-label"><?=_('Type');?></label> |
60 | | - <select class="form-select u-input-width" name="v_type" id="v_type"> |
61 | | - <option value="A" <?php if ($v_type == 'A') echo "selected"; ?>>A</option> |
62 | | - <option value="AAAA" <?php if ($v_type == 'AAAA') echo "selected"; ?>>AAAA</option> |
63 | | - <option value="CAA" <?php if ($v_type == 'CAA') echo "selected"; ?>>CAA</option> |
64 | | - <option value="CNAME" <?php if ($v_type == 'CNAME') echo "selected"; ?>>CNAME</option> |
65 | | - <option value="DNSKEY" <?php if ($v_type == 'DNSKEY') echo "selected"; ?>>DNSKEY</option> |
66 | | - <option value="IPSECKEY" <?php if ($v_type == 'IPSECKEY') echo "selected"; ?>>IPSECKEY</option> |
67 | | - <option value="KEY" <?php if ($v_type == 'KEY') echo "selected"; ?>>KEY</option> |
68 | | - <option value="MX" <?php if ($v_type == 'MX') echo "selected"; ?>>MX</option> |
69 | | - <option value="NS" <?php if ($v_type == 'NS') echo "selected"; ?>>NS</option> |
70 | | - <option value="PTR" <?php if ($v_type == 'PTR') echo "selected"; ?>>PTR</option> |
71 | | - <option value="SPF" <?php if ($v_type == 'SPF') echo "selected"; ?>>SPF</option> |
72 | | - <option value="SRV" <?php if ($v_type == 'SRV') echo "selected"; ?>>SRV</option> |
73 | | - <option value="TLSA" <?php if ($v_type == 'TLSA') echo "selected"; ?>>TLSA</option> |
74 | | - <option value="TXT" <?php if ($v_type == 'TXT') echo "selected"; ?>>TXT</option> |
75 | | - </select> |
76 | | - </td> |
77 | | - </tr> |
78 | | - <tr> |
79 | | - <td class="u-pt6"> |
80 | | - <label for="v_val" class="form-label"><?=_('IP or Value');?></label> |
81 | | - <div class="u-pos-relative u-input-width"> |
82 | | - <select class="form-select" tabindex="-1" onchange="this.nextElementSibling.value=this.value"> |
83 | | - <option value=""> </option> |
84 | | - <?php |
85 | | - foreach ($v_ips as $ip => $value) { |
86 | | - $display_ip = empty($value['NAT']) ? $ip : "{$value['NAT']}"; |
87 | | - echo "<option value='{$display_ip}'>" . htmlentities($display_ip) . "</option>\n"; |
88 | | - } |
89 | | - ?> |
90 | | - </select> |
91 | | - <input type="text" class="form-control list-editor" name="v_val" id="v_val" value="<?=htmlentities(trim($v_val, "'"))?>"> |
92 | | - </div> |
93 | | - </td> |
94 | | - </tr> |
95 | | - <tr> |
96 | | - <td class="u-pt6"> |
97 | | - <label for="v_priority" class="form-label"> |
98 | | - <?=_('Priority');?> <span class="optional">(<?=_('optional');?>)</span> |
99 | | - </label> |
100 | | - <input type="text" class="form-control u-input-width" name="v_priority" id="v_priority" value="<?=htmlentities(trim($v_priority, "'"))?>"> |
101 | | - </td> |
102 | | - </tr> |
103 | | - <tr> |
104 | | - <td class="u-pt6"> |
105 | | - <label for="v_ttl" class="form-label"> |
106 | | - <?=_('TTL');?> <span class="optional">(<?=_('optional');?>)</span> |
107 | | - </label> |
108 | | - <input type="text" class="form-control u-input-width" name="v_ttl" id="v_ttl" value="<?=htmlentities(trim($v_ttl, "'"))?>"> |
109 | | - </td> |
110 | | - </tr> |
111 | | - </table> |
112 | | - <table class="data-col2 u-mb20"> |
113 | | - </table> |
114 | | - </td> |
115 | | - </tr> |
116 | | - </table> |
117 | | - </form> |
118 | 87 | </div> |
119 | 88 |
|
120 | 89 | <script> |
121 | | - GLOBAL.DNS_REC_PREFIX = "<?=htmlentities($_GET['domain']); ?>"; |
| 90 | + GLOBAL.DNS_REC_PREFIX = "<?=htmlentities($_GET['domain']); ?>"; |
122 | 91 | </script> |
0 commit comments