Skip to content

Commit fda044b

Browse files
committed
removed dns templates from user menu
1 parent fe71ef2 commit fda044b

File tree

4 files changed

+10
-24
lines changed

4 files changed

+10
-24
lines changed

bin/v_add_dns_domain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# info: add dns domain
3-
# options: user domain ip [template] [ns1] [ns2] [ns3] [ns4]
3+
# options: user domain ip [template] [ns1] [ns2] [ns3] [ns4] [restart]
44
#
55
# The function adds DNS zone with records defined in the template. If the exp
66
# argument isn't stated, the expiration date value will be set to next year.

bin/v_add_dns_domain_record

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# info: add dns domain record
3-
# options: user domain record type value [priority] [id]
3+
# options: user domain record type value [priority] [id] [restart]
44
#
55
# The call is used for adding new DNS record. Complex records of TXT, MX and
66
# SRV types can be used by a filling in the 'value' argument. The function also
@@ -24,7 +24,7 @@ dvalue=$(idn -t --quiet -u "$5" )
2424
dvalue=$(echo "$dvalue" | tr '[:upper:]' '[:lower:]')
2525
priority=$6
2626
id=$7
27-
27+
restart=$8
2828

2929
# Includes
3030
source $VESTA/conf/vesta.conf
@@ -36,7 +36,7 @@ source $VESTA/func/domain.sh
3636
# Verifications #
3737
#----------------------------------------------------------#
3838

39-
check_args '5' "$#" 'user domain record type value [priority] [id]'
39+
check_args '5' "$#" 'user domain record type value [priority] [id] [restart]'
4040
validate_format 'user' 'domain' 'record' 'rtype' 'dvalue'
4141
is_system_enabled "$DNS_SYSTEM"
4242
is_object_valid 'user' 'USER' "$user"
@@ -81,7 +81,9 @@ update_object_value 'dns' 'DOMAIN' "$domain" '$RECORDS' "$records"
8181
increase_user_value "$user" '$U_DNS_RECORDS'
8282

8383
# Restart named
84-
$BIN/v_restart_dns "$EVENT"
84+
if [ "$restart" != 'no' ]; then
85+
$BIN/v_restart_dns "$EVENT"
86+
fi
8587

8688
# Logging
8789
log_history "$EVENT"

web/templates/admin/add_dns.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<tr><td><input type="text" size="20" class="add-input" name="v_exp" <?php if (!empty($v_exp)) echo "value=".$v_exp; ?>></tr>
5353
<tr><td class="add-text" style="padding: 10px 0 0 2px;">TTL</td></tr>
5454
<tr><td><input type="text" size="20" class="add-input" name="v_ttl" <?php if (!empty($v_ttl)) echo "value=".$v_ttl; ?>></tr>
55-
<tr><td class="add-text" style="padding: 10px 0 0 2px;">NameServers</td></tr>
55+
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Name Servers</td></tr>
5656
<tr><td><input type="text" size="20" class="add-input" name="v_ns1" <?php if (!empty($v_ns1)) echo "value=".$v_ns1; ?>></tr>
5757
<tr><td><input type="text" size="20" class="add-input" name="v_ns2" <?php if (!empty($v_ns2)) echo "value=".$v_ns2; ?>></tr>
5858
<tr><td><input type="text" size="20" class="add-input" name="v_ns3" <?php if (!empty($v_ns3)) echo "value=".$v_ns3; ?>></tr>

web/templates/user/add_dns.html

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,11 @@
3232
<tr><td class="add-text" style="padding: 10px 0 0 2px;"><a href="javascript:elementHideShow('advtable');" class="add-advanced">Advanced Options ⇢</a></td></tr>
3333
<tr><td class="add-text" style="padding: 10px 0 0 0px;">
3434
<table style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
35-
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Template</td></tr>
36-
<tr><td><select class="add-list" name="v_template">
37-
<?php
38-
foreach ($templates as $key => $value) {
39-
echo "\t\t\t\t<option value=\"".$value."\"";
40-
if ((!empty($v_template)) && ( $value == $_POST['v_template'])){
41-
echo ' selected' ;
42-
}
43-
if ((empty($v_template)) && ( $value == $template)){
44-
echo ' selected' ;
45-
}
46-
47-
echo ">".$value."</option>\n";
48-
}
49-
?>
50-
</select></td></tr>
51-
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Domain Expiriation</td></tr>
35+
<tr><td class="add-text" style="padding: 0px 0 0 2px;">Domain Expiriation</td></tr>
5236
<tr><td><input type="text" size="20" class="add-input" name="v_exp" <?php if (!empty($v_exp)) echo "value=".$v_exp; ?>></tr>
5337
<tr><td class="add-text" style="padding: 10px 0 0 2px;">TTL</td></tr>
5438
<tr><td><input type="text" size="20" class="add-input" name="v_ttl" <?php if (!empty($v_ttl)) echo "value=".$v_ttl; ?>></tr>
55-
<tr><td class="add-text" style="padding: 10px 0 0 2px;">NameServers</td></tr>
39+
<tr><td class="add-text" style="padding: 10px 0 0 2px;">Name Servers</td></tr>
5640
<tr><td><input type="text" size="20" class="add-input" name="v_ns1" <?php if (!empty($v_ns1)) echo "value=".$v_ns1; ?>></tr>
5741
<tr><td><input type="text" size="20" class="add-input" name="v_ns2" <?php if (!empty($v_ns2)) echo "value=".$v_ns2; ?>></tr>
5842
<tr><td><input type="text" size="20" class="add-input" name="v_ns3" <?php if (!empty($v_ns3)) echo "value=".$v_ns3; ?>></tr>

0 commit comments

Comments
 (0)