switch to using defaults all the time instead of params, so multi tab works

This commit is contained in:
Oliver Gorwits
2017-12-10 13:38:54 +00:00
parent f8cee4cff6
commit b8ab3b396c
3 changed files with 34 additions and 27 deletions

View File

@@ -62,7 +62,7 @@
<li>
<label class="checkbox">
<input type="checkbox" id="[% item.name | html_entity %]"
name="[% item.name | html_entity %]"[% ' checked="checked"' IF params.${item.name} %] />
name="[% item.name | html_entity %]"[% ' checked="checked"' IF item.default %] />
[% IF item.name == 'c_admin' %]
<span class="label label-info">[% item.label | html_entity %]</span>
[% ELSE %]
@@ -85,12 +85,12 @@
<em class="muted">Mark as Free if Down for:</em><br/>
<select id="nd_days-select" name="age_num">
[% FOREACH count IN [1..32] %]
<option[% ' selected="selected"' IF params.age_num == count %]>[% count %]</option>
<option[% ' selected="selected"' IF device_ports_defaults.age_num == count %]>[% count %]</option>
[% END %]
</select>
<select id="nd_age-select" name="age_unit">
[% FOREACH unit IN [ 'days', 'weeks', 'months', 'years' ] %]
<option[% ' selected="selected"' IF params.age_unit == unit %]>[% unit %]</option>
<option[% ' selected="selected"' IF device_ports_defaults.age_unit == unit %]>[% unit %]</option>
[% END %]
</select>
</li>
@@ -126,7 +126,7 @@
<em class="muted">MAC address format:</em><br/>
<select id="nd_mac-format" name="mac_format">
[% FOREACH format IN [ 'IEEE', 'Cisco', 'Microsoft', 'Sun' ] %]
<option[% ' selected="selected"' IF params.mac_format == format %]>[% format %]</option>
<option[% ' selected="selected"' IF device_ports_defaults.mac_format == format %]>[% format %]</option>
[% END %]
</select>
</li>
@@ -134,7 +134,7 @@
<li>
<label class="checkbox">
<input type="checkbox" id="[% item.name | html_entity %]"
name="[% item.name | html_entity %]"[% ' checked="checked"' IF params.${item.name} %] />
name="[% item.name | html_entity %]"[% ' checked="checked"' IF item.default %] />
[% item.label | html_entity %]
</label>
</li>