Fix wishlist create default value
This commit is contained in:
parent
fa7cafb408
commit
9d3a37e3f9
2 changed files with 5 additions and 2 deletions
|
@ -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({
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue