diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2020-10-05 23:51:39 +0100 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2020-10-05 23:51:39 +0100 |
| commit | 63763244e313b0e5dc598319721f6a7aa399e128 (patch) | |
| tree | 7635d38d0791f0ecab64def7224b8c1ac530edee /resources/views/modules/statistics-chart/custom.phtml | |
| parent | e1994f421e2e448df20c8ce72f79078bd14cbbf2 (diff) | |
| download | webtrees-63763244e313b0e5dc598319721f6a7aa399e128.tar.gz webtrees-63763244e313b0e5dc598319721f6a7aa399e128.tar.bz2 webtrees-63763244e313b0e5dc598319721f6a7aa399e128.zip | |
Fix: #3113 - add autocomplete to surname fields
Diffstat (limited to 'resources/views/modules/statistics-chart/custom.phtml')
| -rw-r--r-- | resources/views/modules/statistics-chart/custom.phtml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/resources/views/modules/statistics-chart/custom.phtml b/resources/views/modules/statistics-chart/custom.phtml index 84b479ea95..428f511ee6 100644 --- a/resources/views/modules/statistics-chart/custom.phtml +++ b/resources/views/modules/statistics-chart/custom.phtml @@ -1,5 +1,6 @@ <?php +use Fisharebest\Webtrees\Http\RequestHandlers\AutoCompleteSurname; use Fisharebest\Webtrees\I18N; use Fisharebest\Webtrees\View; @@ -158,7 +159,7 @@ use Fisharebest\Webtrees\View; <div id="surname_opt" class="form-group" style="display:none;"> <label for="SURN"><?= I18N::translate('Surname') ?></label> - <input data-autocomplete-type="SURN" class="form-control" type="text" id="SURN" name="SURN"> + <input data-autocomplete-url="<?= e(route(AutoCompleteSurname::class, ['tree' => $tree->name()])) ?>" autocomplete="off" class="form-control" type="text" id="SURN" name="SURN"> </div> </fieldset> @@ -337,5 +338,6 @@ use Fisharebest\Webtrees\View; }); $("#own-stats-form").on("submit", loadCustomChart); + webtrees.autocomplete('#SURN'); </script> <?php View::endpush() ?> |
