Fix empty item in dropdown

This commit is contained in:
grandeljay 2022-08-09 11:02:50 +02:00
parent ae4d05d186
commit 11ac3491fa
3 changed files with 2 additions and 6 deletions

View file

@ -36,8 +36,7 @@ $(function() {
} }
$.fn.api.settings.onSuccess = function(response, element, xhr) { $.fn.api.settings.onSuccess = function(response, element, xhr) {
element.dropdown({ element.dropdown({
values : response.results, values : response.results
placeholder: text.wishlist_no_selection
}) })
if ($_GET.id) { if ($_GET.id) {

View file

@ -23,8 +23,7 @@ $(function () {
wishlists = response.results; wishlists = response.results;
element.dropdown({ element.dropdown({
values : wishlists, values : wishlists
placeholder : text.wishlist_no_selection
}) })
if (wishlist.id) { if (wishlist.id) {

View file

@ -334,8 +334,6 @@ class Page
var wish_status_unavailable = '<?= Wish::STATUS_UNAVAILABLE ?>'; var wish_status_unavailable = '<?= Wish::STATUS_UNAVAILABLE ?>';
var wish_status_fulfilled = '<?= Wish::STATUS_FULFILLED ?>'; var wish_status_fulfilled = '<?= Wish::STATUS_FULFILLED ?>';
var text = { var text = {
wishlist_no_selection : '<?= __('No wishlist selected.') ?>',
modal_error_title : '<?= __('Error') ?>', modal_error_title : '<?= __('Error') ?>',
modal_failure_title : '<?= __('Failure') ?>', modal_failure_title : '<?= __('Failure') ?>',
modal_failure_content : '<?= __('The server did not confirm that the action was successful.') ?>', modal_failure_content : '<?= __('The server did not confirm that the action was successful.') ?>',