Commit 2d557995 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(legacy) fix html error issue in firewall_aliases_edit.php,...

(legacy) fix html error issue in firewall_aliases_edit.php, https://github.com/opnsense/core/issues/785

(cherry picked from commit bcaaf64c)
parent 49f799d9
...@@ -338,63 +338,62 @@ include("head.inc"); ...@@ -338,63 +338,62 @@ include("head.inc");
endforeach; endforeach;
endif; endif;
?> ?>
</option> </select>
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?> <?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<div id="inputerrors"></div> <section class="col-xs-12">
<section class="col-xs-12"> <div class="content-box">
<div class="content-box"> <header class="content-box-head container-fluid">
<header class="content-box-head container-fluid"> <h3><?=gettext("Alias Edit");?></h3>
<h3><?=gettext("Alias Edit");?></h3> </header>
</header> <div class="content-box-main">
<div class="content-box-main"> <form action="firewall_aliases_edit.php" method="post" name="iform" id="iform">
<form action="firewall_aliases_edit.php" method="post" name="iform" id="iform"> <div class="table-responsive">
<div class="table-responsive"> <table class="table table-striped">
<table class="table table-striped"> <tr>
<tr> <td colspan="2" align="right">
<td colspan="2" align="right"> <small><?=gettext("full help"); ?> </small>
<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>
<i class="fa fa-toggle-off text-danger" style="cursor: pointer;" id="show_all_help_page" type="button"></i></a> </td>
</td> </tr>
</tr> <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="22%"><a id="help_for_name" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Name"); ?></td> <td width="78%">
<td width="78%"> <input name="origname" type="hidden" id="origname" class="form-control unknown" size="40" value="<?=$pconfig['name'];?>" />
<input name="origname" type="hidden" id="origname" class="form-control unknown" size="40" value="<?=$pconfig['name'];?>" /> <?php if (isset($id)): ?>
<?php if (isset($id)): ?> <input name="id" type="hidden" value="<?=$id;?>" />
<input name="id" type="hidden" value="<?=$id;?>" /> <?php endif; ?>
<?php endif; ?> <input name="name" type="text" id="name" class="form-control unknown" size="40" maxlength="31" value="<?=$pconfig['name'];?>" />
<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">
<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 _\"."); ?>
<?=gettext("The name of the alias may only consist of the characters \"a-z, A-Z, 0-9 and _\"."); ?> </div>
</div> </td>
</td> </tr>
</tr> <tr>
<tr> <td><a id="help_for_description" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Description"); ?></td>
<td><a id="help_for_description" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Description"); ?></td> <td>
<td> <input name="descr" type="text" class="form-control unknown" id="descr" size="40" value="<?=$pconfig['descr'];?>" />
<input name="descr" type="text" class="form-control unknown" id="descr" size="40" value="<?=$pconfig['descr'];?>" /> <div class="hidden" for="help_for_description">
<div class="hidden" for="help_for_description"> <?=gettext("You may enter a description here for your reference (not parsed)."); ?>
<?=gettext("You may enter a description here for your reference (not parsed)."); ?> </div>
</div> </td>
</td> </tr>
</tr> <tr>
<tr> <td><a id="help_for_type" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Type"); ?></td>
<td><a id="help_for_type" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Type"); ?></td> <td>
<td> <select name="type" class="form-control" id="typeSelect">
<select name="type" class="form-control" id="typeSelect"> <option value="host" <?=$pconfig['type'] == "host" ? "selected=\"selected\"" : ""; ?>><?=gettext("Host(s)"); ?></option>
<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="network" <?=$pconfig['type'] == "network" ? "selected=\"selected\"" : ""; ?>><?=gettext("Network(s)"); ?></option> <option value="port" <?=$pconfig['type'] == "port" ? "selected=\"selected\"" : ""; ?>><?=gettext("Port(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" <?=$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="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" <?=$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>
<option value="urltable_ports" <?=$pconfig['type'] == "urltable_ports" ? "selected=\"selected\"" : ""; ?>><?=gettext("URL Table (Ports)"); ?></option> </select>
</select> </td>
</td>
</tr> </tr>
<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> <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"); ...@@ -413,24 +412,24 @@ include("head.inc");
$detail_desc = explode("||", $pconfig['detail']); $detail_desc = explode("||", $pconfig['detail']);
foreach ($pconfig['aliasurl'] as $aliasid => $aliasurl): foreach ($pconfig['aliasurl'] as $aliasid => $aliasurl):
?> ?>
<tr> <tr>
<td> <td>
<div style="cursor:pointer;" class="act-removerow btn btn-default btn-xs" alt="remove"><span class="glyphicon glyphicon-minus"></span></div> <div style="cursor:pointer;" class="act-removerow btn btn-default btn-xs" alt="remove"><span class="glyphicon glyphicon-minus"></span></div>
</td> </td>
<td> <td>
<input type="text" class="form-control" name="host_url[]" value="<?=$aliasurl;?>"/> <input type="text" class="form-control" name="host_url[]" value="<?=$aliasurl;?>"/>
</td> </td>
<td> <td>
<input type="text" class="form-control" name="detail[]" value="<?= isset($detail_desc[$aliasid])?$detail_desc[$aliasid]:"";?>"?> <input type="text" class="form-control" name="detail[]" value="<?= isset($detail_desc[$aliasid])?$detail_desc[$aliasid]:"";?>">
</td> </td>
<td> <td>
<?php if ($aliasid ==0): <?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; <?php endif;
?> ?>
</td> </td>
</tr> </tr>
<?php endforeach; <?php endforeach;
else: else:
$detail_desc = explode("||", $pconfig['detail']); $detail_desc = explode("||", $pconfig['detail']);
...@@ -441,74 +440,75 @@ include("head.inc"); ...@@ -441,74 +440,75 @@ include("head.inc");
} }
foreach ($addresslst as $addressid => $address): foreach ($addresslst as $addressid => $address):
?> ?>
<tr> <tr>
<td> <td>
<div style="cursor:pointer;" class="act-removerow btn btn-default btn-xs" alt="remove"><span class="glyphicon glyphicon-minus"></span></div> <div style="cursor:pointer;" class="act-removerow btn btn-default btn-xs" alt="remove"><span class="glyphicon glyphicon-minus"></span></div>
</td> </td>
<td> <td>
<input type="text" class="fld_detail" name="host_url[]" value="<?=$address;?>"/> <input type="text" class="fld_detail" name="host_url[]" value="<?=$address;?>"/>
</td> </td>
<td> <td>
<input type="text" name="detail[]" value="<?= isset($detail_desc[$addressid])?$detail_desc[$addressid]:"";?>"?> <input type="text" name="detail[]" value="<?= isset($detail_desc[$addressid])?$detail_desc[$addressid]:"";?>"?>
</td> </td>
<td> <td>
<?php if ($addressid ==0): <?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; <?php endif;
?> ?>
</td> </td>
</tr> </tr>
<?php endforeach; <?php endforeach;
endif; endif;
?> ?>
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="4"> <td colspan="4">
<div id="addNew" style="cursor:pointer;" class="btn btn-default btn-xs" alt="add"><span class="glyphicon glyphicon-plus"></span></div> <div id="addNew" style="cursor:pointer;" class="btn btn-default btn-xs" alt="add"><span class="glyphicon glyphicon-plus"></span></div>
</td> </td>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
<div class="hidden" for="help_for_hosts"> <div class="hidden" for="help_for_hosts">
<span class="text-info"> <span class="text-info">
<?=gettext("Networks")?><br/> <?=gettext("Networks")?><br/>
</span> </span>
<small> <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.");?> <?=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/> <br/>
</small> </small>
<span class="text-info"> <span class="text-info">
<?=gettext("Hosts")?><br/> <?=gettext("Hosts")?><br/>
</span> </span>
<small> <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.");?> <?=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/> <br/>
</small> </small>
<span class="text-info"> <span class="text-info">
<?=gettext("Ports")?><br/> <?=gettext("Ports")?><br/>
</span> </span>
<small> <small>
<?=gettext("Enter as many ports as you wish. Port ranges can be expressed by separating with a colon.");?> <?=gettext("Enter as many ports as you wish. Port ranges can be expressed by separating with a colon.");?>
<br/> <br/>
</small> </small>
<span class="text-info"> <span class="text-info">
<?=gettext("URL's")?><br/> <?=gettext("URL's")?><br/>
</span> </span>
<small> <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.");?> <?=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> </small>
</div> </div>
</td> </td>
<tr> </tr>
<td>&nbsp;</td> <tr>
<td> <td>&nbsp;</td>
<input id="submit" name="submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" /> <td>
<input type="button" class="btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" /> <input id="submit" name="submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
</td> <input type="button" class="btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
</tr> </td>
</tr>
</table> </table>
</div> </div>
</form> </form>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment