mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-29 18:59:21 +02:00
Hide select town field when creating a new character if there is only one town to select.
This commit is contained in:
parent
b4b3843abc
commit
a29f3e93f5
@ -128,18 +128,28 @@ if (isset($_GET['success']) && empty($_GET['success'])) {
|
|||||||
<option value="0">Female(girl)</option>
|
<option value="0">Female(girl)</option>
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<!-- Available towns to select from when creating character -->
|
|
||||||
Town:<br>
|
|
||||||
<select name="selected_town">
|
|
||||||
<?php foreach ($config['available_towns'] as $tid) { ?>
|
|
||||||
<option value="<?php echo $tid; ?>"><?php echo town_id_to_name($tid); ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
</select>
|
|
||||||
</li>
|
|
||||||
<?php
|
<?php
|
||||||
/* Form file */
|
$available_towns = $config['available_towns'];
|
||||||
Token::create();
|
if (count($available_towns) > 1):
|
||||||
|
?>
|
||||||
|
<li>
|
||||||
|
<!-- Available towns to select from when creating character -->
|
||||||
|
Town:<br>
|
||||||
|
<select name="selected_town">
|
||||||
|
<?php foreach ($config['available_towns'] as $tid) { ?>
|
||||||
|
<option value="<?php echo $tid; ?>"><?php echo town_id_to_name($tid); ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
else:
|
||||||
|
?>
|
||||||
|
<input type="hidden" name="selected_town" value="<?php echo end($config['available_towns']); ?>">
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
|
||||||
|
/* Form file */
|
||||||
|
Token::create();
|
||||||
?>
|
?>
|
||||||
<li>
|
<li>
|
||||||
<input type="submit" value="Create Character">
|
<input type="submit" value="Create Character">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user