Skip to content

Commit

Permalink
firewall: bring back original host_url field
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Oct 26, 2017
1 parent 7d98ae1 commit 8f2360e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/www/firewall_aliases_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ function toggleType() {
$("#proto").addClass("hidden");
$(".geoip_table").addClass("hidden");
$(".not_geoip_table").removeClass("hidden");
$(".host_url").removeClass("hidden");
$(".host_url").removeAttr("disabled");
$(".geoip_item").attr("disabled", "disabled");
switch($("#typeSelect").val()) {
case 'urltable':
$("#detailsHeading1").html("<?=gettext("URL");?>");
Expand All @@ -461,7 +462,8 @@ function toggleType() {
$("#proto").removeClass("hidden");
$(".geoip_table").removeClass("hidden");
$(".not_geoip_table").addClass("hidden");
$(".host_url").addClass("hidden");
$(".host_url").attr("disabled", "disabled");
$(".geoip_item").removeAttr("disabled");
break;
}
$(".fld_detail").typeahead("destroy");
Expand Down Expand Up @@ -609,6 +611,9 @@ function toggleType() {
<td>
<div style="cursor:pointer;" class="act-removerow btn btn-default btn-xs" alt="remove"><span class="glyphicon glyphicon-minus"></span></div>
</td>
<td>
<input type="text" class="host_url fld_detail" name="host_url[]" value="<?=$aliasurl;?>"/>
</td>
<td>
<input type="text" class="form-control" name="detail[]" value="<?= isset($pconfig['detail'][$aliasid])?$pconfig['detail'][$aliasid]:"";?>">
</td>
Expand Down Expand Up @@ -647,7 +652,7 @@ function toggleType() {
<?php $i = 0; foreach (geoip_countries() as $code => $name):
if ($region == $where[$code]): ?>
<td>
<input type="checkbox" name="host_url[]" class="region_<?= html_safe($region) ?>" value="<?= html_safe($code) ?>" <?= in_array($code, $pconfig['host_url']) ? 'checked="checked"' : '' ?>/>
<input type="checkbox" name="host_url[]" class="geoip_item region_<?= html_safe($region) ?>" value="<?= html_safe($code) ?>" <?= in_array($code, $pconfig['host_url']) ? 'checked="checked"' : '' ?>/>
<strong><?= $name ?></strong>
</td>
<?php $i += 1;
Expand Down

0 comments on commit 8f2360e

Please sign in to comment.