Skip to content

Commit

Permalink
dsl: Merged www from GPL 42095
Browse files Browse the repository at this point in the history
  • Loading branch information
zaloisio committed Apr 7, 2021
1 parent 6ba4dc0 commit fc78ca6
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,18 @@ function check_ginp_try(obj){
</td>
</tr>

<tr>
<th>
<a class="hintstyle" href="javascript:void(0);" onClick="openHint(25,17);">G.INP Stability Adjustment</a>
</th>
<td>
<select class="input_option" name="dslx_vdsl_ginp">
<option value="1" <% nvram_match("dslx_vdsl_ginp", "1", "selected"); %>><#btn_Enabled#></option>
<option value="0" <% nvram_match("dslx_vdsl_ginp", "0", "selected"); %>><#btn_Disabled#></option>
</select>
</td>
</tr>

<!--dslx_vdsl_tx_gain_off-->
<tr id="id_vdtxpwrtestmode">
<th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ function showDSLWANList(){
function initial(){
show_menu();
document.form.dsl_dhcp_clientid.value = decodeURIComponent('<% nvram_char_to_ascii("", "dsl_dhcp_clientid"); %>');
// WAN port
genWANSoption();
change_wan_unit(document.form.wan_unit);
Expand Down Expand Up @@ -743,6 +745,7 @@ function disable_all_ctrl() {
document.getElementById("DNSsetting").style.display = "none";
document.getElementById("dot1q_setting").style.display = "none";
document.getElementById("IPsetting").style.display = "none";
document.getElementById("DHCP_option").style.display = "none";
document.getElementById("vpn_server").style.display = "none";
document.getElementById("btn_apply").style.display = "none";
}
Expand All @@ -755,6 +758,7 @@ function enable_all_ctrl() {
document.getElementById("DNSsetting").style.display = "";
document.getElementById("dot1q_setting").style.display = "";
document.getElementById("IPsetting").style.display = "";
document.getElementById("DHCP_option").style.display = "";
document.getElementById("vpn_server").style.display = "";
document.getElementById("btn_apply").style.display = "";
}
Expand All @@ -766,6 +770,10 @@ function change_dsl_type(dsl_type){
if(dsl_type == "pppoe" || dsl_type == "pppoa"){
//inputCtrl(document.form.dsl_dnsenable[0], 1);
//inputCtrl(document.form.dsl_dnsenable[1], 1);
showhide("DHCP_option",0);
inputCtrl(document.form.dsl_dhcp_vendorid, 0);
inputCtrl(document.form.dsl_dhcp_clientid, 0);
document.form.dsl_dhcp_clientid_type.disabled = true;
inputCtrl(document.form.dsl_pppoe_username, 1);
inputCtrl(document.form.dsl_pppoe_passwd, 1);
Expand All @@ -787,6 +795,10 @@ function change_dsl_type(dsl_type){
else if(dsl_type == "static"){
//inputCtrl(document.form.dsl_dnsenable[0], 0);
//inputCtrl(document.form.dsl_dnsenable[1], 0);
showhide("DHCP_option",0);
inputCtrl(document.form.dsl_dhcp_vendorid, 0);
inputCtrl(document.form.dsl_dhcp_clientid, 0);
document.form.dsl_dhcp_clientid_type.disabled = true;
inputCtrl(document.form.dsl_pppoe_username, 0);
inputCtrl(document.form.dsl_pppoe_passwd, 0);
Expand All @@ -807,6 +819,11 @@ function change_dsl_type(dsl_type){
else if(dsl_type == "dhcp"){
//inputCtrl(document.form.dsl_dnsenable[0], 1);
//inputCtrl(document.form.dsl_dnsenable[1], 1);
showhide("DHCP_option",1);
inputCtrl(document.form.dsl_dhcp_vendorid, 1);
inputCtrl(document.form.dsl_dhcp_clientid, 1);
document.form.dsl_dhcp_clientid_type.disabled = false;
showDiableDHCPclientID(document.form.tmp_dhcp_clientid_type);
inputCtrl(document.form.dsl_pppoe_username, 0);
inputCtrl(document.form.dsl_pppoe_passwd, 0);
Expand All @@ -828,7 +845,10 @@ function change_dsl_type(dsl_type){
else if(dsl_type == "bridge") {
//inputCtrl(document.form.dsl_dnsenable[0], 0);
//inputCtrl(document.form.dsl_dnsenable[1], 0);
showhide("DHCP_option",0);
inputCtrl(document.form.dsl_dhcp_vendorid, 0);
inputCtrl(document.form.dsl_dhcp_clientid, 0);
document.form.dsl_dhcp_clientid_type.disabled = true;
inputCtrl(document.form.dsl_pppoe_username, 0);
inputCtrl(document.form.dsl_pppoe_passwd, 0);
inputCtrl(document.form.dsl_pppoe_auth, 0);
Expand Down Expand Up @@ -1111,6 +1131,19 @@ function pullDNSList(_this) {
$element.hide();
}
}
function showDiableDHCPclientID(clientid_enable){
if(clientid_enable.checked) {
document.form.dsl_dhcp_clientid_type.value = "1";
document.form.dsl_dhcp_clientid.value = "";
document.form.dsl_dhcp_clientid.style.display = "none";
}
else {
document.form.dsl_dhcp_clientid_type.value = "0";
document.form.dsl_dhcp_clientid.style.display = "";
}
}
</script>
</head>

Expand Down Expand Up @@ -1150,6 +1183,7 @@ function pullDNSList(_this) {
<input type="hidden" name="dslx_rmvlan" value="<% nvram_get("dslx_rmvlan"); %>">
<input type="hidden" name="wan_enable" value="" disabled>
<input type="hidden" name="add_pvc_flag" value="0">
<input type="hidden" name="dsl_dhcp_clientid_type" value="">
<span id="bridgePPPoE_relay"></span>
<table class="content" align="center" cellpadding="0" cellspacing="0">
<tr>
Expand Down Expand Up @@ -1364,6 +1398,25 @@ function pullDNSList(_this) {
</tr>
</table>

<table id="DHCP_option" width="100%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#6b8fa3" class="FormTable">
<thead>
<tr><td colspan="2"><#ipv6_6rd_dhcp_option#></td></tr>
</thead>
<tr>
<th width="40%">Class-identifier (option 60):</th>
<td>
<input type="text" name="dsl_dhcp_vendorid" class="input_25_table" value="<% nvram_get("dsl_dhcp_vendorid"); %>" maxlength="126" autocapitalization="off" autocomplete="off">
</td>
</tr>
<tr>
<th width="40%">Client-identifier (option 61):</th>
<td>
<input type="checkbox" id="tmp_dhcp_clientid_type" name="tmp_dhcp_clientid_type" onclick="showDiableDHCPclientID(this);" <% nvram_match("dsl_dhcp_clientid_type", "1", "checked"); %>>IAID/DUID<br>
<input type="text" name="dsl_dhcp_clientid" class="input_25_table" value="<% nvram_get("dsl_dhcp_clientid"); %>" maxlength="126" autocapitalization="off" autocomplete="off">
</td>
</tr>
</table>

<table id="PPPsetting" width="100%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#6b8fa3" class="FormTable">
<thead>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function valid_form(){
<td>
<select id="dslx_snrm_offset" class="input_option" name="dslx_snrm_offset">
<option value="0" <% nvram_match("dslx_snrm_offset", "0", "selected"); %>><#btn_Disabled#></option>
<option value="16" <% nvram_match("dslx_snrm_offset", "32", "selected"); %>>1 dB</option>
<option value="16" <% nvram_match("dslx_snrm_offset", "16", "selected"); %>>1 dB</option>
<option value="32" <% nvram_match("dslx_snrm_offset", "32", "selected"); %>>2 dB</option>
<option value="48" <% nvram_match("dslx_snrm_offset", "48", "selected"); %>>3 dB</option>
<option value="64" <% nvram_match("dslx_snrm_offset", "64", "selected"); %>>4 dB</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,8 @@ function showMSWANList(){
function initial(){
show_menu();
document.form.wan_clientid.value = decodeURIComponent('<% nvram_char_to_ascii("", "wan_clientid"); %>');
// WAN port
genWANSoption();
change_wan_unit(document.form.wan_unit_x);
Expand Down Expand Up @@ -769,6 +771,7 @@ function disable_all_ctrl() {
document.getElementById("DNSsetting").style.display = "none";
document.getElementById("dot1q_setting").style.display = "none";
document.getElementById("IPsetting").style.display = "none";
document.getElementById("wan_DHCP_opt").style.display = "none";
document.getElementById("vpn_server").style.display = "none";
document.getElementById("btn_apply").style.display = "none";
}
Expand All @@ -781,6 +784,7 @@ function enable_all_ctrl() {
document.getElementById("DNSsetting").style.display = "";
document.getElementById("dot1q_setting").style.display = "";
document.getElementById("IPsetting").style.display = "";
document.getElementById("wan_DHCP_opt").style.display = "";
document.getElementById("vpn_server").style.display = "";
document.getElementById("btn_apply").style.display = "";
Expand All @@ -802,6 +806,10 @@ function change_wan_proto_type(proto_type){
if(proto_type == "pppoe" || proto_type == "pppoa"){
inputCtrl(document.form.wan_dnsenable_x[0], 1);
inputCtrl(document.form.wan_dnsenable_x[1], 1);
showhide("wan_DHCP_opt",0);
inputCtrl(document.form.wan_vendorid, 0);
inputCtrl(document.form.wan_clientid, 0);
document.form.wan_clientid_type.disabled = true;
inputCtrl(document.form.wan_auth_x, 0);
inputCtrl(document.form.wan_pppoe_username, 1);
Expand All @@ -825,6 +833,10 @@ function change_wan_proto_type(proto_type){
else if(proto_type == "pptp"){
inputCtrl(document.form.wan_dnsenable_x[0], 1);
inputCtrl(document.form.wan_dnsenable_x[1], 1);
showhide("wan_DHCP_opt",0);
inputCtrl(document.form.wan_vendorid, 0);
inputCtrl(document.form.wan_clientid, 0);
document.form.wan_clientid_type.disabled = true;
inputCtrl(document.form.wan_auth_x, 0);
inputCtrl(document.form.wan_pppoe_username, 1);
Expand All @@ -850,6 +862,10 @@ function change_wan_proto_type(proto_type){
else if(proto_type == "l2tp"){
inputCtrl(document.form.wan_dnsenable_x[0], 1);
inputCtrl(document.form.wan_dnsenable_x[1], 1);
showhide("wan_DHCP_opt",0);
inputCtrl(document.form.wan_vendorid, 0);
inputCtrl(document.form.wan_clientid, 0);
document.form.wan_clientid_type.disabled = true;
inputCtrl(document.form.wan_auth_x, 0);
inputCtrl(document.form.wan_pppoe_username, 1);
Expand All @@ -875,6 +891,10 @@ function change_wan_proto_type(proto_type){
else if(proto_type == "static"){
inputCtrl(document.form.wan_dnsenable_x[0], 0);
inputCtrl(document.form.wan_dnsenable_x[1], 0);
showhide("wan_DHCP_opt",0);
inputCtrl(document.form.wan_vendorid, 0);
inputCtrl(document.form.wan_clientid, 0);
document.form.wan_clientid_type.disabled = true;
inputCtrl(document.form.wan_auth_x, 1);
inputCtrl(document.form.wan_pppoe_username, (document.form.wan_auth_x.value != ""));
Expand All @@ -897,6 +917,11 @@ function change_wan_proto_type(proto_type){
else if(proto_type == "dhcp"){
inputCtrl(document.form.wan_dnsenable_x[0], 1);
inputCtrl(document.form.wan_dnsenable_x[1], 1);
showhide("wan_DHCP_opt",1);
inputCtrl(document.form.wan_vendorid, 1);
inputCtrl(document.form.wan_clientid, 1);
document.form.wan_clientid_type.disabled = false;
showDiableDHCPclientID(document.form.tmp_dhcp_clientid_type);
inputCtrl(document.form.wan_auth_x, 1);
inputCtrl(document.form.wan_pppoe_username, (document.form.wan_auth_x.value != ""));
Expand All @@ -920,6 +945,10 @@ function change_wan_proto_type(proto_type){
else if(proto_type == "bridge") {
inputCtrl(document.form.wan_dnsenable_x[0], 0);
inputCtrl(document.form.wan_dnsenable_x[1], 0);
showhide("wan_DHCP_opt",0);
inputCtrl(document.form.wan_vendorid, 0);
inputCtrl(document.form.wan_clientid, 0);
document.form.wan_clientid_type.disabled = true;
inputCtrl(document.form.wan_auth_x, 0);
inputCtrl(document.form.wan_pppoe_username, 0);
inputCtrl(document.form.wan_pppoe_passwd, 0);
Expand Down Expand Up @@ -1326,6 +1355,19 @@ function pullDNSList(_this) {
$element.hide();
}
}
function showDiableDHCPclientID(clientid_enable){
if(clientid_enable.checked) {
document.form.wan_clientid_type.value = "1";
document.form.wan_clientid.value = "";
document.form.wan_clientid.style.display = "none";
}
else {
document.form.wan_clientid_type.value = "0";
document.form.wan_clientid.style.display = "";
}
}
</script>
</head>

Expand Down Expand Up @@ -1356,6 +1398,7 @@ function pullDNSList(_this) {
<input type="hidden" name="lan_ipaddr" value="<% nvram_get("lan_ipaddr"); %>" />
<input type="hidden" name="lan_netmask" value="<% nvram_get("lan_netmask"); %>" />
<input type="hidden" name="wan_unit" value="<% nvram_get("wan_unit"); %>">
<input type="hidden" name="wan_clientid_type" value="">
<!--input type="hidden" name="wan_dhcpenable_x" value="<% nvram_get("wan_dhcpenable_x"); %>"-->
<span id="bridgePPPoE_relay"></span>
<table class="content" align="center" cellpadding="0" cellspacing="0">
Expand Down Expand Up @@ -1605,6 +1648,24 @@ function pullDNSList(_this) {
<!-- server block -->
<div id="dnspriv_rulelist_Block"></div>

<table id="wan_DHCP_opt" width="100%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#6b8fa3" class="FormTable">
<thead>
<tr><td colspan="2"><#ipv6_6rd_dhcp_option#></td></tr>
</thead>
<tr>
<th width="40%">Class-identifier (option 60):</th>
<td>
<input type="text" name="wan_vendorid" class="input_25_table" value="<% nvram_get("wan_vendorid"); %>" maxlength="126" autocapitalization="off" autocomplete="off">
</td>
</tr>
<tr>
<th width="40%">Client-identifier (option 61):</th>
<td>
<input type="checkbox" id="tmp_dhcp_clientid_type" name="tmp_dhcp_clientid_type" onclick="showDiableDHCPclientID(this);" <% nvram_match("wan_clientid_type", "1", "checked"); %>>IAID/DUID<br>
<input type="text" name="wan_clientid" class="input_25_table" value="<% nvram_get("wan_clientid"); %>" maxlength="126" autocapitalization="off" autocomplete="off">
</td>
</tr>
</table>

<table id="PPPsetting" width="100%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#6b8fa3" class="FormTable">
<thead>
Expand Down
Loading

0 comments on commit fc78ca6

Please sign in to comment.