edit_dns.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!-- Begin toolbar -->
  2. <div class="l-sort">
  3. <div class="l-sort__inner">
  4. <div class="l-unit-toolbar__buttonstrip">
  5. <a class="button button-secondary" id="btn-back" href="/list/dns/"><i class="fas fa-arrow-left status-icon blue"></i><?=_('Back');?></a>
  6. </div>
  7. <div class="l-unit-toolbar__buttonstrip">
  8. <a href="#" class="button" data-action="submit" data-id="vstobjects"><i class="fas fa-floppy-disk status-icon purple"></i><?=_('Save');?></a>
  9. </div>
  10. </div>
  11. </div>
  12. <!-- End toolbar -->
  13. <div class="l-center animate__animated animate__fadeIn">
  14. <form id="vstobjects" name="v_edit_dns" method="post" class="<?=$v_status?>">
  15. <input type="hidden" name="token" value="<?=$_SESSION['token']?>">
  16. <input type="hidden" name="save" value="save">
  17. <div class="form-container">
  18. <h1 class="form-title"><?=_('Editing DNS Domain');?></h1>
  19. <?php show_alert_message($_SESSION);?>
  20. <div class="u-mb10">
  21. <label for="v_domain" class="form-label"><?=_('Domain');?></label>
  22. <input type="text" class="form-control" name="v_domain" id="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>" disabled>
  23. <input type="hidden" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
  24. </div>
  25. <div class="u-mb10">
  26. <label for="v_ip" class="form-label"><?=_('IP address');?></label>
  27. <div class="u-pos-relative">
  28. <select class="form-select" tabindex="-1" onchange="this.nextElementSibling.value=this.value">
  29. <option value="">clear</option>
  30. <?php
  31. foreach ($v_ips as $ip => $value) {
  32. $display_ip = empty($value['NAT']) ? $ip : "{$value['NAT']}";
  33. $ip_selected = ((!empty($v_ip) && ($v_ip==$ip||$v_ip==$display_ip) ))? 'selected' : '';
  34. echo "<option value='{$display_ip}' {$ip_selected}>" . htmlentities($display_ip) . "</option>\n";
  35. }
  36. ?>
  37. </select>
  38. <input type="text" class="form-control list-editor" name="v_ip" id="v_ip" value="<?=htmlentities(trim($v_ip, "'"))?>">
  39. </div>
  40. </div>
  41. <?php if (($_SESSION['userContext'] === 'admin') || ($_SESSION['userContext'] === 'user') && ($_SESSION['POLICY_USER_EDIT_DNS_TEMPLATES'] === 'yes')) { ?>
  42. <div class="u-mb10">
  43. <label for="v_template" class="form-label">
  44. <?=_('Template') . "<span class='optional'>" . strtoupper($_SESSION['DNS_SYSTEM']) . "</span>";?>
  45. </label>
  46. <select class="form-select" name="v_template" id="v_template">
  47. <?php
  48. foreach ($templates as $key => $value) {
  49. echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
  50. $svalue = "'".$value."'";
  51. if ((!empty($v_template)) && ( $value == $v_template ) || ($svalue == $v_template)){
  52. echo ' selected' ;
  53. }
  54. echo ">".htmlentities($value)."</option>\n";
  55. }
  56. ?>
  57. </select>
  58. </div>
  59. <?php } ?>
  60. <div class="form-check u-mb10">
  61. <input class="form-check-input" type="checkbox" name="v_dnssec" id="v_dnssec" value="yes" <?php if($v_dnssec === 'yes'){ echo ' checked'; } ?>>
  62. <label for="v_dnssec">
  63. <?=_('Enable DNSSEC');?>
  64. </label>
  65. </div>
  66. <div class="u-mb10">
  67. <label for="v_exp" class="form-label">
  68. <?=_('Expiration Date');?><span class="optional">(<?=_('YYYY-MM-DD');?>)</span>
  69. </label>
  70. <input type="text" class="form-control" name="v_exp" id="v_exp" value="<?=htmlentities(trim($v_exp, "'"))?>">
  71. </div>
  72. <div class="u-mb10">
  73. <label for="v_soa" class="form-label"><?=_('SOA');?></label>
  74. <input type="text" class="form-control" name="v_soa" id="v_soa" value="<?=htmlentities(trim($v_soa, "'"))?>">
  75. </div>
  76. <div class="u-mb10">
  77. <label for="v_ttl" class="form-label"><?=_('TTL');?></label>
  78. <input type="text" class="form-control" name="v_ttl" id="v_ttl" value="<?=htmlentities(trim($v_ttl, "'"))?>">
  79. </div>
  80. </div>
  81. </form>
  82. </div>