Add save button
This commit is contained in:
parent
533c594fa9
commit
89c7d7c154
3 changed files with 22 additions and 0 deletions
|
@ -75,4 +75,17 @@ $(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save wishlist
|
||||||
|
*/
|
||||||
|
$(document).on('click', '.button.save', function() {
|
||||||
|
$(this).addClass('disabled loading');
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
$(this).find('.icon').addClass('red');
|
||||||
|
$(this).find('span').text(text.button_wishlist_saved);
|
||||||
|
$(this).removeClass('disabled loading');
|
||||||
|
}, 400);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -311,6 +311,8 @@ class Page
|
||||||
form_prompt_minCount : '<?= __('{name} must have at least {ruleValue} choices') ?>',
|
form_prompt_minCount : '<?= __('{name} must have at least {ruleValue} choices') ?>',
|
||||||
form_prompt_exactCount : '<?= __('{name} must have exactly {ruleValue} choices') ?>',
|
form_prompt_exactCount : '<?= __('{name} must have exactly {ruleValue} choices') ?>',
|
||||||
form_prompt_maxCount : '<?= __('{name} must have {ruleValue} or less choices') ?>',
|
form_prompt_maxCount : '<?= __('{name} must have {ruleValue} or less choices') ?>',
|
||||||
|
|
||||||
|
button_wishlist_saved : '<?= __('Saved') ?>',
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -29,6 +29,13 @@ $page->navigation();
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<h1 class="ui header"><?= $page->title ?></h1>
|
<h1 class="ui header"><?= $page->title ?></h1>
|
||||||
|
|
||||||
|
<?php if ($user->isLoggedIn() && $user->id !== intval($wishlist->user)) { ?>
|
||||||
|
<button class="ui white small basic labeled icon button save">
|
||||||
|
<i class="heart icon"></i>
|
||||||
|
<span><?= __('Save list') ?></span>
|
||||||
|
</button>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Warn the wishlist creator
|
* Warn the wishlist creator
|
||||||
|
|
Loading…
Reference in a new issue