Project

General

Profile

Bug #13087 ยป vpn_openvpn_server.patch

Phil Wardt, 04/22/2022 10:29 AM

View differences:

src/usr/local/www/vpn_openvpn_server.php
1682 1682

  
1683 1683
	$section->addInput(new Form_Checkbox(
1684 1684
		'wins_server_enable',
1685
		'WINS server enable',
1685
		'WINS servers',
1686 1686
		'Provide a WINS server list to clients',
1687 1687
		$pconfig['wins_server_enable']
1688 1688
	));
1689 1689

  
1690
	$section->addInput(new Form_Input(
1690
	$group = new Form_Group(null);
1691

  
1692
	$group->add(new Form_Input(
1691 1693
		'wins_server1',
1692
		'WINS Server 1',
1694
		null,
1693 1695
		'text',
1694 1696
		$pconfig['wins_server1']
1695
	));
1697
	))->setHelp('Server 1');
1696 1698

  
1697
	$section->addInput(new Form_Input(
1699
	$group->add(new Form_Input(
1698 1700
		'wins_server2',
1699
		'WINS Server 2',
1701
		null,
1700 1702
		'text',
1701 1703
		$pconfig['wins_server2']
1702
	));
1704
	))->setHelp('Server 2');
1703 1705

  
1706
	$group->addClass('winsservers');
1707

  
1708
	$section->add($group);
1709

  
1710

  
1704 1711
	$form->add($section);
1705 1712

  
1706 1713
	$section = new Form_Section('Advanced Configuration');
......
2151 2158
	}
2152 2159

  
2153 2160
	function wins_server_change() {
2154
		var hide  = ! $('#wins_server_enable').prop('checked')
2155

  
2156
		hideInput('wins_server1', hide);
2157
		hideInput('wins_server2', hide);
2161
		hideClass('winsservers', ! $('#wins_server_enable').prop('checked'));
2158 2162
	}
2159 2163

  
2160

  
2161 2164
	function ntp_server_change() {
2162 2165
		var hide  = ! $('#ntp_server_enable').prop('checked')
2163 2166

  
......
2166 2169
	}
2167 2170

  
2168 2171
	function netbios_change() {
2169
		var hide  = ! $('#netbios_enable').prop('checked')
2170

  
2171
		hideInput('netbios_ntype', hide);
2172
		hideInput('netbios_scope', hide);
2173
		hideCheckbox('wins_server_enable', hide);
2172
		if ($('#netbios_enable').prop('checked')) {
2173
			hideInput('netbios_ntype', false);
2174
			hideInput('netbios_scope', false);
2175
			hideCheckbox('wins_server_enable', false);
2174 2176
			wins_server_change();
2177
		} else {
2178
			hideInput('netbios_ntype', true);
2179
			hideInput('netbios_scope', true);
2180
			hideCheckbox('wins_server_enable', true);
2181
			hideClass('winsservers', true);
2182
		}
2175 2183
	}
2176 2184

  
2177 2185
	function tuntap_change() {
    (1-1/1)