html template fixups (#576)
* none is not a valid value for min-width, so set it to zero * these 2 "checked" if statements need a space in front of them, else they will attach to the previous element id="nd_showspeed"checked="checked" * multiple tag has no options according to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select also, don't close select before we've gotten to the option tags * multiple tag has no options according to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select also, don't close select before we've gotten to the option tags * just to be sure put a space in front of these optional tags as well, * $a is technically allowed but is considered not best practice
This commit is contained in:
@@ -31,14 +31,14 @@ ajax '/ajax/portcontrol' => require_any_role [qw(admin port_control)] => sub {
|
||||
|
||||
schema('netdisco')->txn_do(sub {
|
||||
if (param('port')) {
|
||||
my $a = "$action $subaction";
|
||||
$a =~ s/-other$//;
|
||||
$a =~ s/^portcontrol/port/;
|
||||
my $act = "$action $subaction";
|
||||
$act =~ s/-other$//;
|
||||
$act =~ s/^portcontrol/port/;
|
||||
|
||||
schema('netdisco')->resultset('DevicePortLog')->create({
|
||||
ip => param('device'),
|
||||
port => param('port'),
|
||||
action => $a,
|
||||
action => $act,
|
||||
username => session('logged_in_user'),
|
||||
userip => request->remote_address,
|
||||
reason => (param('reason') || 'other'),
|
||||
|
||||
@@ -87,7 +87,7 @@ div.content > div.tab-content table.nd_floatinghead thead {
|
||||
|
||||
/* to be added to qtip-bootstrap class */
|
||||
.nd_qtip-unconstrained {
|
||||
min-width: none;
|
||||
min-width: 0;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
<input data-form="update" name="mac" type="text" value="[% row.mac | html_entity %]">
|
||||
</td>
|
||||
<td class="nd_center-cell">
|
||||
<input data-form="update" name="matchoui" type="checkbox" [% 'checked="checked"' IF row.matchoui %]>
|
||||
<input data-form="update" name="matchoui" type="checkbox" [% ' checked="checked"' IF row.matchoui %]>
|
||||
</td>
|
||||
<td class="nd_center-cell">
|
||||
<input data-form="update" name="active" type="checkbox" [% 'checked="checked"' IF row.active %]>
|
||||
<input data-form="update" name="active" type="checkbox" [% ' checked="checked"' IF row.active %]>
|
||||
</td>
|
||||
<td class="nd_center-cell">
|
||||
<input data-form="update" name="why" type="text" value="[% row.why | html_entity %]">
|
||||
|
||||
@@ -43,13 +43,13 @@
|
||||
<input data-form="update" name="password" type="password" value="********">
|
||||
</td>
|
||||
<td class="nd_center-cell">
|
||||
<input data-form="update" name="ldap" type="checkbox" [% 'checked="checked"' IF row.ldap %]>
|
||||
<input data-form="update" name="ldap" type="checkbox" [% ' checked="checked"' IF row.ldap %]>
|
||||
</td>
|
||||
<td class="nd_center-cell">
|
||||
<input data-form="update" name="port_control" type="checkbox" [% 'checked="checked"' IF row.port_control %]>
|
||||
<input data-form="update" name="port_control" type="checkbox" [% ' checked="checked"' IF row.port_control %]>
|
||||
</td>
|
||||
<td class="nd_center-cell">
|
||||
<input data-form="update" name="admin" type="checkbox" [% 'checked="checked"' IF row.admin %]>
|
||||
<input data-form="update" name="admin" type="checkbox" [% ' checked="checked"' IF row.admin %]>
|
||||
</td>
|
||||
<td class="nd_center-cell">[% row.created | html_entity %]</td>
|
||||
<td class="nd_center-cell">[% row.last_seen | html_entity %]</td>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="checkbox pull-left">
|
||||
<label>
|
||||
<input type="checkbox" name="showips" id="nd_showips"
|
||||
[% 'checked="checked"' IF vars.sidebar_defaults.device_netmap.showips %]
|
||||
[% ' checked="checked"' IF vars.sidebar_defaults.device_netmap.showips %]
|
||||
data-toggle="toggle" data-size="small" data-width="30"
|
||||
data-on="Show" data-off=" " data-onstyle="success">
|
||||
<span onclick="$('#nd_showips').bootstrapToggle('toggle')"> Management IP</span>
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="checkbox pull-left">
|
||||
<label>
|
||||
<input type="checkbox" name="showspeed" id="nd_showspeed"
|
||||
[% 'checked="checked"' IF vars.sidebar_defaults.device_netmap.showspeed %]
|
||||
[% ' checked="checked"' IF vars.sidebar_defaults.device_netmap.showspeed %]
|
||||
data-toggle="toggle" data-size="small" data-width="30"
|
||||
data-on="Show" data-off=" " data-onstyle="success">
|
||||
<span onclick="$('#nd_showspeed').bootstrapToggle('toggle')"> Link Speed</span>
|
||||
@@ -78,8 +78,8 @@
|
||||
|
||||
[% IF hgroup_list.size %]
|
||||
<select class="nd_side-select" size="[% hgroup_list.size > 4 ? 4 : hgroup_list.size %]"
|
||||
multiple="on" name="hgroup" id="nd_hgroup-select"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Host Groups"/>
|
||||
multiple name="hgroup" id="nd_hgroup-select"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Host Groups">
|
||||
[% FOREACH opt IN hgroup_list.pairs %]
|
||||
<option[% ' selected="selected"' IF hgroup_lkp.exists(opt.key) %]
|
||||
value="[% opt.key %]">[% opt.value | html_entity %]</option>
|
||||
@@ -88,8 +88,8 @@
|
||||
[% END %]
|
||||
[% IF lgroup_list.size %]
|
||||
<select class="nd_side-select" size="[% lgroup_list.size > 4 ? 4 : lgroup_list.size %]"
|
||||
multiple="on" name="lgroup" id="nd_lgroup-select"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Device Locations"/>
|
||||
multiple name="lgroup" id="nd_lgroup-select"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Device Locations">
|
||||
[% FOREACH loc IN lgroup_list %]
|
||||
<option[% ' selected="selected"' IF lgroup_lkp.exists(loc) %]
|
||||
value="[% loc %]">[% loc | html_entity %]</option>
|
||||
@@ -123,7 +123,7 @@
|
||||
<div class="clearfix input-prepend">
|
||||
<label class="add-on">
|
||||
<input type="checkbox" id="dynamicsize" name="dynamicsize"
|
||||
[% 'checked="checked"' IF vars.sidebar_defaults.device_netmap.dynamicsize %]/>
|
||||
[% ' checked="checked"' IF vars.sidebar_defaults.device_netmap.dynamicsize %]/>
|
||||
</label>
|
||||
<label class="nd_checkboxlabel" for="dynamicsize">
|
||||
<span class="nd_searchcheckbox uneditable-input">Dynamic Size</span>
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
<li>
|
||||
<em class="muted">Show Ports with Status:</em><br/>
|
||||
<div class="clearfix">
|
||||
<select id="nd_port-state-select" size="4" multiple="on" name="port_state"/>
|
||||
<select id="nd_port-state-select" size="4" multiple name="port_state">
|
||||
<option selected="selected" value="up">Link Up</option>
|
||||
<option selected="selected" value="free">Port Free</option>
|
||||
<option selected="selected" value="down">Link Down</option>
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<select class="nd_side-select nd_colored-input" size="[% class_list.size > 5 ? 5 : class_list.size %]"
|
||||
multiple="on" name="class"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Module Class"/>
|
||||
multiple name="class"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Module Class">
|
||||
[% FOREACH opt IN class_list %]
|
||||
<option[% ' selected="selected"' IF class_lkp.exists(opt) %]>[% opt | html_entity %]</option>
|
||||
[% END %]
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<p class="nd_sidebar-title"><em>NetBIOS Domain</em></p>
|
||||
<div class="clearfix">
|
||||
<select class="nd_side-select nd_colored-input" size="[% domain_list.size > 8 ? 8 : domain_list.size %]"
|
||||
multiple="on" name="domain"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Domain"/>
|
||||
multiple name="domain"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Domain">
|
||||
[% FOREACH opt IN domain_list %]
|
||||
[% UNLESS opt == '' %]
|
||||
<option[% ' selected="selected"' IF domain_lkp.exists(opt) %]>[% opt | html_entity %]</option>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<select class="nd_side-select nd_colored-input" size="[% type_list.size > 8 ? 8 : type_list.size %]"
|
||||
multiple="on" name="remote_type"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Remote Type"/>
|
||||
multiple name="remote_type"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Remote Type">
|
||||
[% FOREACH opt IN type_list %]
|
||||
<option[% ' selected="selected"' IF type_lkp.exists(opt) %]>[% opt | html_entity %]</option>
|
||||
[% END %]
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
</legend>
|
||||
<div class="clearfix">
|
||||
<select class="nd_side-select nd_colored-input" size="[% vendor_list.size > 8 ? 8 : vendor_list.size %]"
|
||||
multiple="on" name="vendor"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Vendor"/>
|
||||
multiple name="vendor"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Vendor">
|
||||
[% FOREACH opt IN vendor_list %]
|
||||
[% UNLESS opt == '' %]
|
||||
<option[% ' selected="selected"' IF vendor_lkp.exists(opt) %]>[% opt | html_entity %]</option>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<p class="nd_sidebar-title"><em>Details by SSID</em></p>
|
||||
<div class="clearfix">
|
||||
<select class="nd_side-select nd_colored-input" size="[% ssid_list.size > 8 ? 8 : ssid_list.size %]"
|
||||
multiple="on" name="ssid"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="SSID"/>
|
||||
multiple name="ssid"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="SSID">
|
||||
[% FOREACH opt IN ssid_list %]
|
||||
<option[% ' selected="selected"' IF ssid_lkp.exists(opt) %]>[% opt | html_entity %]</option>
|
||||
[% END %]
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<select class="nd_side-select" size="[% model_list.size > 5 ? 5 : model_list.size %]"
|
||||
multiple="on" name="model"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Model"/>
|
||||
multiple name="model"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Model">
|
||||
[% FOREACH opt IN model_list %]
|
||||
<option[% ' selected="selected"' IF model_lkp.exists(opt) %]>[% opt | html_entity %]</option>
|
||||
[% END %]
|
||||
@@ -52,8 +52,8 @@
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<select class="nd_side-select" size="[% os_list.size > 5 ? 5 : os_list.size %]"
|
||||
multiple="on" name="os"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Operating System"/>
|
||||
multiple name="os"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Operating System">
|
||||
[% FOREACH opt IN os_list %]
|
||||
<option[% ' selected="selected"' IF os_lkp.exists(opt) %]>[% opt | html_entity %]</option>
|
||||
[% END %]
|
||||
@@ -61,8 +61,8 @@
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<select class="nd_side-select" size="[% os_ver_list.size > 5 ? 5 : os_ver_list.size %]"
|
||||
multiple="on" name="os_ver"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="OS Release"/>
|
||||
multiple name="os_ver"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="OS Release">
|
||||
[% FOREACH opt IN os_ver_list %]
|
||||
<option[% ' selected="selected"' IF os_ver_lkp.exists(opt) %]>[% opt | html_entity %]</option>
|
||||
[% END %]
|
||||
@@ -70,8 +70,8 @@
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<select class="nd_side-select" size="[% vendor_list.size > 5 ? 5 : vendor_list.size %]"
|
||||
multiple="on" name="vendor"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Vendor"/>
|
||||
multiple name="vendor"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Vendor">
|
||||
[% FOREACH opt IN vendor_list %]
|
||||
<option[% ' selected="selected"' IF vendor_lkp.exists(opt) %]>[% opt | html_entity %]</option>
|
||||
[% END %]
|
||||
@@ -79,8 +79,8 @@
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<select class="nd_side-select" size="3"
|
||||
multiple="on" name="layers"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Layer"/>
|
||||
multiple name="layers"
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Layer">
|
||||
[% FOREACH opt IN [ 1 .. 7 ] %]
|
||||
<option[% ' selected="selected"' IF layers_lkp.exists(opt) %]>[% opt | html_entity %]</option>
|
||||
[% END %]
|
||||
|
||||
Reference in New Issue
Block a user