mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-25 22:16:08 +00:00
feat(preferences): apply auto-completion (village name suggestions) [#198]
Honour the per-user auto-completion checkboxes on the rally point and the marketplace, where the target village is typed by name (dname field): - v1: own villages - v2: villages in the surroundings of the active village - v3: villages of the player's alliance members A new Database::getAutoCompleteVillages() builds the bounded, de-duplicated name list from the enabled categories (system accounts excluded). A shared Templates/villageAutocomplete.tpl renders a native <datalist> consumed by the dname input via list="dnameSuggest"; nothing is emitted when every box is unchecked, keeping the previous behaviour. Removes the "not coded yet" tag from the auto-completion section in the preferences form. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -134,7 +134,7 @@ if (isset($_GET['z'])) {
|
||||
|
||||
<table id="target_select" class="res_target" cellpadding="1" cellspacing="1">
|
||||
<tr><td class="mer"><?php echo MERCHANT;?> <?php echo $merchantAvail;?>/<?php echo $totalMerchants;?></td></tr>
|
||||
<tr><td class="vil"><span><?php echo VILLAGES;?>:</span> <input class="text" type="text" name="dname" value="" maxlength="30" tabindex="5"></td></tr>
|
||||
<tr><td class="vil"><span><?php echo VILLAGES;?>:</span> <input class="text" type="text" name="dname" value="" maxlength="30" tabindex="5" list="dnameSuggest" autocomplete="off"><?php include("Templates/villageAutocomplete.tpl"); ?></td></tr>
|
||||
<tr><td class="or"><?php echo OR_;?></td></tr>
|
||||
<tr>
|
||||
<td class="coo">
|
||||
|
||||
Reference in New Issue
Block a user