Fix wishlist create default value

This commit is contained in:
Jay Trees 2022-03-15 10:10:58 +01:00
parent fa7cafb408
commit 9d3a37e3f9
2 changed files with 5 additions and 2 deletions

View file

@ -399,6 +399,10 @@ $(function () {
$(document).on('click', '.button.wishlist-create', function () { $(document).on('click', '.button.wishlist-create', function () {
var modalWishlistCreate = $('.ui.modal.wishlist-create'); var modalWishlistCreate = $('.ui.modal.wishlist-create');
var formWishlistCreate = modalWishlistCreate.find('.ui.form'); var formWishlistCreate = modalWishlistCreate.find('.ui.form');
var inputWishlistName = formWishlistCreate.find('[name="wishlist-name"]');
inputWishlistName.attr('placeholder', inputWishlistName.data('default'));
inputWishlistName.val(inputWishlistName.data('default'));
modalWishlistCreate modalWishlistCreate
.modal({ .modal({

View file

@ -115,8 +115,7 @@ $page->navigation();
<label>Name</label> <label>Name</label>
<input type="text" <input type="text"
name="wishlist-name" name="wishlist-name"
placeholder="<?= getCurrentSeason() ?>" data-default="<?= getCurrentSeason() ?>"
value="<?= getCurrentSeason() ?>"
/> />
</div> </div>
</form> </form>