Skip to content

Commit

Permalink
wireless: hide more config options from this page
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Sep 18, 2015
1 parent 0fd22da commit cf34360
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/www/interfaces_wireless_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,13 @@ function clone_compare($a, $b) {
<?php
foreach ($portlist as $ifn => $ifinfo)
if (match_wireless_interface($ifn)) {
if (strstr($ifn, '_wlan')) {
continue;
}
echo "<option value=\"{$ifn}\"";
if ($ifn == $pconfig['if'])
if ($ifn == $pconfig['if']) {
echo " selected=\"selected\"";
}
echo ">";
echo htmlspecialchars($ifn . " (" . $ifinfo['mac'] . ")");
echo "</option>";
Expand All @@ -177,19 +181,6 @@ function clone_compare($a, $b) {
</select>
</td>
</tr>
<tr>
<td valign="top" class="vncellreq"><?=gettext("Mode");?></td>
<td class="vtable">
<select name="mode" class="selectpicker">
<option <?php if ($pconfig['mode'] == 'bss') echo "selected=\"selected\"";?> value="bss"><?=gettext("Infrastructure (BSS)");?></option>
<?php if (interfaces_test_wireless_capability($pconfig['cloneif'], 'adhoc')): ?>
<option <?php if ($pconfig['mode'] == 'adhoc') echo "selected=\"selected\"";?> value="adhoc"><?=gettext("Ad-hoc (IBSS)");?></option>
<?php endif; ?>
<?php if (interfaces_test_wireless_capability($pconfig['cloneif'], 'hostap')): ?>
<option <?php if ($pconfig['mode'] == 'hostap') echo "selected=\"selected\"";?> value="hostap"><?=gettext("Access Point");?></option>
<?php endif; ?>
</select></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
Expand All @@ -201,6 +192,7 @@ function clone_compare($a, $b) {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input type="hidden" name="mode" value="bss" />
<input type="hidden" name="cloneif" value="<?=htmlspecialchars($pconfig['cloneif']); ?>" />
<input 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;?>'" />
Expand Down

0 comments on commit cf34360

Please sign in to comment.