Projet

Général

Profil

« Précédent | Suivant » 

Révision 5d792074

Ajouté par Gertjan il y a presque 10 ans

Update status_captiveportal.php

Don't ask to select a zone if there is only ONE.

Voir les différences:

usr/local/www/status_captiveportal.php
62 62
        $config['captiveportal'] = array();
63 63
$a_cp =& $config['captiveportal'];
64 64

  
65
if (count($a_cp) == 1)
66
 $cpzone = current(array_keys($a_cp));
67

  
65 68
include("head.inc");
66 69

  
67 70
?>
......
122 125
	<td width="20%" class="vncell" valign="top"> 
123 126
               <br /><?=gettext("Captive Portal Zone"); ?><br/><br />
124 127
	</td>
125
	<td class="vncell" width="30%" align="center"> 
128
	<td class="vncell" width="30%" align="center">
129
	<?php if (count($a_cp) >  1) { ?>
126 130
	<form action="status_captiveportal.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
127 131
		<select name="zone" class="formselect" onchange="document.form1.submit()">
128 132
		<option value="">none</option>
......
136 140
               </select>
137 141
		<br />
138 142
	</form>
143
	<?php } else echo $a_cp[$cpzone]['zone']; ?>
139 144
	</td>
140 145
	<td colspan="3" width="50%"></td>
141 146
  </tr>

Formats disponibles : Unified diff