mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
(legacy) fix html error issue in firewall_aliases_edit.php, https://github.com/opnsense/core/issues/785
This commit is contained in:
parent
83a3cdbf34
commit
bcaaf64cf9
@ -338,63 +338,62 @@ include("head.inc");
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
</option>
|
||||
</select>
|
||||
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
|
||||
<div id="inputerrors"></div>
|
||||
<section class="col-xs-12">
|
||||
<div class="content-box">
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("Alias Edit");?></h3>
|
||||
</header>
|
||||
<div class="content-box-main">
|
||||
<form action="firewall_aliases_edit.php" method="post" name="iform" id="iform">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<small><?=gettext("full help"); ?> </small>
|
||||
<i class="fa fa-toggle-off text-danger" style="cursor: pointer;" id="show_all_help_page" type="button"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%"><a id="help_for_name" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Name"); ?></td>
|
||||
<td width="78%">
|
||||
<input name="origname" type="hidden" id="origname" class="form-control unknown" size="40" value="<?=$pconfig['name'];?>" />
|
||||
<?php if (isset($id)): ?>
|
||||
<input name="id" type="hidden" value="<?=$id;?>" />
|
||||
<?php endif; ?>
|
||||
<input name="name" type="text" id="name" class="form-control unknown" size="40" maxlength="31" value="<?=$pconfig['name'];?>" />
|
||||
<div class="hidden" for="help_for_name">
|
||||
<?=gettext("The name of the alias may only consist of the characters \"a-z, A-Z, 0-9 and _\"."); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a id="help_for_description" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Description"); ?></td>
|
||||
<td>
|
||||
<input name="descr" type="text" class="form-control unknown" id="descr" size="40" value="<?=$pconfig['descr'];?>" />
|
||||
<div class="hidden" for="help_for_description">
|
||||
<?=gettext("You may enter a description here for your reference (not parsed)."); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a id="help_for_type" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Type"); ?></td>
|
||||
<td>
|
||||
<select name="type" class="form-control" id="typeSelect">
|
||||
<option value="host" <?=$pconfig['type'] == "host" ? "selected=\"selected\"" : ""; ?>><?=gettext("Host(s)"); ?></option>
|
||||
<option value="network" <?=$pconfig['type'] == "network" ? "selected=\"selected\"" : ""; ?>><?=gettext("Network(s)"); ?></option>
|
||||
<option value="port" <?=$pconfig['type'] == "port" ? "selected=\"selected\"" : ""; ?>><?=gettext("Port(s)"); ?></option>
|
||||
<option value="url" <?=$pconfig['type'] == "url" ? "selected=\"selected\"" : ""; ?>><?=gettext("URL (IPs)");?></option>
|
||||
<option value="url_ports" <?=$pconfig['type'] == "url_ports" ? "selected=\"selected\"" : ""; ?>><?=gettext("URL (Ports)");?></option>
|
||||
<option value="urltable" <?=$pconfig['type'] == "urltable" ? "selected=\"selected\"" : ""; ?>><?=gettext("URL Table (IPs)"); ?></option>
|
||||
<option value="urltable_ports" <?=$pconfig['type'] == "urltable_ports" ? "selected=\"selected\"" : ""; ?>><?=gettext("URL Table (Ports)"); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
<section class="col-xs-12">
|
||||
<div class="content-box">
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("Alias Edit");?></h3>
|
||||
</header>
|
||||
<div class="content-box-main">
|
||||
<form action="firewall_aliases_edit.php" method="post" name="iform" id="iform">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<small><?=gettext("full help"); ?> </small>
|
||||
<i class="fa fa-toggle-off text-danger" style="cursor: pointer;" id="show_all_help_page" type="button"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%"><a id="help_for_name" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Name"); ?></td>
|
||||
<td width="78%">
|
||||
<input name="origname" type="hidden" id="origname" class="form-control unknown" size="40" value="<?=$pconfig['name'];?>" />
|
||||
<?php if (isset($id)): ?>
|
||||
<input name="id" type="hidden" value="<?=$id;?>" />
|
||||
<?php endif; ?>
|
||||
<input name="name" type="text" id="name" class="form-control unknown" size="40" maxlength="31" value="<?=$pconfig['name'];?>" />
|
||||
<div class="hidden" for="help_for_name">
|
||||
<?=gettext("The name of the alias may only consist of the characters \"a-z, A-Z, 0-9 and _\"."); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a id="help_for_description" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Description"); ?></td>
|
||||
<td>
|
||||
<input name="descr" type="text" class="form-control unknown" id="descr" size="40" value="<?=$pconfig['descr'];?>" />
|
||||
<div class="hidden" for="help_for_description">
|
||||
<?=gettext("You may enter a description here for your reference (not parsed)."); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a id="help_for_type" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Type"); ?></td>
|
||||
<td>
|
||||
<select name="type" class="form-control" id="typeSelect">
|
||||
<option value="host" <?=$pconfig['type'] == "host" ? "selected=\"selected\"" : ""; ?>><?=gettext("Host(s)"); ?></option>
|
||||
<option value="network" <?=$pconfig['type'] == "network" ? "selected=\"selected\"" : ""; ?>><?=gettext("Network(s)"); ?></option>
|
||||
<option value="port" <?=$pconfig['type'] == "port" ? "selected=\"selected\"" : ""; ?>><?=gettext("Port(s)"); ?></option>
|
||||
<option value="url" <?=$pconfig['type'] == "url" ? "selected=\"selected\"" : ""; ?>><?=gettext("URL (IPs)");?></option>
|
||||
<option value="url_ports" <?=$pconfig['type'] == "url_ports" ? "selected=\"selected\"" : ""; ?>><?=gettext("URL (Ports)");?></option>
|
||||
<option value="urltable" <?=$pconfig['type'] == "urltable" ? "selected=\"selected\"" : ""; ?>><?=gettext("URL Table (IPs)"); ?></option>
|
||||
<option value="urltable_ports" <?=$pconfig['type'] == "urltable_ports" ? "selected=\"selected\"" : ""; ?>><?=gettext("URL Table (Ports)"); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div id="addressnetworkport"><a id="help_for_hosts" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Host(s)"); ?></div></td>
|
||||
@ -413,24 +412,24 @@ include("head.inc");
|
||||
$detail_desc = explode("||", $pconfig['detail']);
|
||||
foreach ($pconfig['aliasurl'] as $aliasid => $aliasurl):
|
||||
?>
|
||||
<tr>
|
||||
<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="form-control" name="host_url[]" value="<?=$aliasurl;?>"/>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="form-control" name="detail[]" value="<?= isset($detail_desc[$aliasid])?$detail_desc[$aliasid]:"";?>"?>
|
||||
</td>
|
||||
<td>
|
||||
<tr>
|
||||
<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="form-control" name="host_url[]" value="<?=$aliasurl;?>"/>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="form-control" name="detail[]" value="<?= isset($detail_desc[$aliasid])?$detail_desc[$aliasid]:"";?>">
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($aliasid ==0):
|
||||
?>
|
||||
<input type="text" class="form-control input-sm" id="updatefreq" name="updatefreq" value="<?=$pconfig['updatefreq'];?>" >
|
||||
<input type="text" class="form-control input-sm" id="updatefreq" name="updatefreq" value="<?=$pconfig['updatefreq'];?>" >
|
||||
<?php endif;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;
|
||||
else:
|
||||
$detail_desc = explode("||", $pconfig['detail']);
|
||||
@ -441,74 +440,75 @@ include("head.inc");
|
||||
}
|
||||
foreach ($addresslst as $addressid => $address):
|
||||
?>
|
||||
<tr>
|
||||
<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="fld_detail" name="host_url[]" value="<?=$address;?>"/>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="detail[]" value="<?= isset($detail_desc[$addressid])?$detail_desc[$addressid]:"";?>"?>
|
||||
</td>
|
||||
<td>
|
||||
<tr>
|
||||
<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="fld_detail" name="host_url[]" value="<?=$address;?>"/>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="detail[]" value="<?= isset($detail_desc[$addressid])?$detail_desc[$addressid]:"";?>"?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($addressid ==0):
|
||||
?>
|
||||
<input type="text" class="input-sm" id="updatefreq" name="updatefreq" value="<?=$pconfig['updatefreq'];?>" >
|
||||
<input type="text" class="input-sm" id="updatefreq" name="updatefreq" value="<?=$pconfig['updatefreq'];?>" >
|
||||
<?php endif;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach;
|
||||
endif;
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div id="addNew" style="cursor:pointer;" class="btn btn-default btn-xs" alt="add"><span class="glyphicon glyphicon-plus"></span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div class="hidden" for="help_for_hosts">
|
||||
<span class="text-info">
|
||||
<?=gettext("Networks")?><br/>
|
||||
</span>
|
||||
<small>
|
||||
<?=gettext("Networks are specified in CIDR format. Select the CIDR mask that pertains to each entry. /32 specifies a single IPv4 host, /128 specifies a single IPv6 host, /24 specifies 255.255.255.0, /64 specifies a normal IPv6 network, etc. Hostnames (FQDNs) may also be specified, using a /32 mask for IPv4 or /128 for IPv6.");?>
|
||||
<br/>
|
||||
</small>
|
||||
<span class="text-info">
|
||||
<?=gettext("Hosts")?><br/>
|
||||
</span>
|
||||
<small>
|
||||
<?=gettext("Enter as many hosts as you would like. Hosts must be specified by their IP address or fully qualified domain name (FQDN). FQDN hostnames are periodically re-resolved and updated. If multiple IPs are returned by a DNS query, all are used.");?>
|
||||
<br/>
|
||||
</small>
|
||||
<span class="text-info">
|
||||
<?=gettext("Ports")?><br/>
|
||||
</span>
|
||||
<small>
|
||||
<?=gettext("Enter as many ports as you wish. Port ranges can be expressed by separating with a colon.");?>
|
||||
<br/>
|
||||
</small>
|
||||
<span class="text-info">
|
||||
<?=gettext("URL's")?><br/>
|
||||
</span>
|
||||
<small>
|
||||
<?=gettext("Enter a URL containing a large number of IPs,ports and/or Subnets. After saving the lists will be downloaded and scheduled for automatic updates when a frequency is provided.");?>
|
||||
</small>
|
||||
</div>
|
||||
</td>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<input id="submit" name="submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
|
||||
<input type="button" class="btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div id="addNew" style="cursor:pointer;" class="btn btn-default btn-xs" alt="add"><span class="glyphicon glyphicon-plus"></span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div class="hidden" for="help_for_hosts">
|
||||
<span class="text-info">
|
||||
<?=gettext("Networks")?><br/>
|
||||
</span>
|
||||
<small>
|
||||
<?=gettext("Networks are specified in CIDR format. Select the CIDR mask that pertains to each entry. /32 specifies a single IPv4 host, /128 specifies a single IPv6 host, /24 specifies 255.255.255.0, /64 specifies a normal IPv6 network, etc. Hostnames (FQDNs) may also be specified, using a /32 mask for IPv4 or /128 for IPv6.");?>
|
||||
<br/>
|
||||
</small>
|
||||
<span class="text-info">
|
||||
<?=gettext("Hosts")?><br/>
|
||||
</span>
|
||||
<small>
|
||||
<?=gettext("Enter as many hosts as you would like. Hosts must be specified by their IP address or fully qualified domain name (FQDN). FQDN hostnames are periodically re-resolved and updated. If multiple IPs are returned by a DNS query, all are used.");?>
|
||||
<br/>
|
||||
</small>
|
||||
<span class="text-info">
|
||||
<?=gettext("Ports")?><br/>
|
||||
</span>
|
||||
<small>
|
||||
<?=gettext("Enter as many ports as you wish. Port ranges can be expressed by separating with a colon.");?>
|
||||
<br/>
|
||||
</small>
|
||||
<span class="text-info">
|
||||
<?=gettext("URL's")?><br/>
|
||||
</span>
|
||||
<small>
|
||||
<?=gettext("Enter a URL containing a large number of IPs,ports and/or Subnets. After saving the lists will be downloaded and scheduled for automatic updates when a frequency is provided.");?>
|
||||
</small>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<input id="submit" name="submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
|
||||
<input type="button" class="btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user