Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make blockwishlist compatible #408

Merged
merged 6 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}

<div
class="wishlist-add-to"
data-url="{$url}"
>
<div
class="wishlist-modal modal fade"
{literal}
:class="{show: !isHidden}"
{/literal}
tabindex="-1"
role="dialog"
aria-modal="true"
>
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header px-3">
<h5 class="modal-title">
{l s='Add to wishlist' d='Modules.Blockwishlist.Shop'}
</h5>
NeOMakinG marked this conversation as resolved.
Show resolved Hide resolved
<button
type="button"
class="btn-close"
@click="toggleModal"
data-dismiss="modal"
aria-label="{l s='Close' d='Modules.Blockwishlist.Shop'}"
>
</button>
</div>

<div class="modal-body">
<choose-list
@hide="toggleModal"
:product-id="productId"
:product-attribute-id="productAttributeId"
:quantity="quantity"
url="{$url}"
add-url="{$addUrl}"
empty-text="{l s='No list found.' d='Modules.Blockwishlist.Shop'}"
>
</choose-list>
</div>

<div class="modal-footer">
<a @click="openNewWishlistModal" class="wishlist-add-to-new text-primary">
<i class="material-icons text-primary">add_circle_outline</i> {$newWishlistCTA}
</a>
</div>
</div>
</div>
</div>

<div
class="modal-backdrop fade"
{literal}
:class="{in: !isHidden}"
{/literal}
>
</div>
</div>
79 changes: 79 additions & 0 deletions modules/blockwishlist/views/templates/components/modals/create.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}

<div
class="wishlist-create"
data-url="{$url}"
data-title="{l s='Create wishlist' d='Modules.Blockwishlist.Shop'}"
data-label="{l s='Wishlist name' d='Modules.Blockwishlist.Shop'}"
data-placeholder="{l s='Add name' d='Modules.Blockwishlist.Shop'}"
data-cancel-text="{l s='Cancel' d='Modules.Blockwishlist.Shop'}"
data-create-text="{l s='Create wishlist' d='Modules.Blockwishlist.Shop'}"
data-length-text="{l s='List title is too short' d='Modules.Blockwishlist.Shop'}"
>
NeOMakinG marked this conversation as resolved.
Show resolved Hide resolved
<div
class="wishlist-modal modal fade"
{literal}
:class="{show: !isHidden}"
{/literal}
tabindex="-1"
role="dialog"
aria-modal="true"
>
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header px-3">
<h5 class="modal-title">((title))</h5>
<button
type="button"
class="btn-close"
@click="toggleModal"
data-dismiss="modal"
aria-label="Close"
>
</button>
</div>
<div class="modal-body">
<div class="form-group form-group-lg">
<label class="form-label" for="input2">((label))</label>
<input
type="text"
class="form-control form-control-lg"
v-model="value"
id="input2"
:placeholder="placeholder"
/>
NeOMakinG marked this conversation as resolved.
Show resolved Hide resolved
</div>
</div>
<div class="modal-footer">
<button
type="button"
class="modal-cancel btn btn-secondary"
data-dismiss="modal"
@click="toggleModal"
>
((cancelText))
</button>

<button
type="button"
class="btn btn-primary"
@click="createWishlist"
>
((createText))
</button>
</div>
</div>
</div>
</div>

<div
class="modal-backdrop fade"
{literal}
:class="{in: !isHidden}"
{/literal}
>
</div>
</div>
75 changes: 75 additions & 0 deletions modules/blockwishlist/views/templates/components/modals/delete.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}

<div
class="wishlist-delete"
{if isset($listUrl)}
data-delete-list-url="{$listUrl}"
{/if}
{if isset($deleteProductUrl)}
data-delete-product-url="{$deleteProductUrl}"
{/if}
data-title="{l s='Remove product from wishlist' d='Modules.Blockwishlist.Shop'}"
data-title-list="{l s='Delete wishlist' d='Modules.Blockwishlist.Shop'}"
data-placeholder='{l s='The product will be removed from "%nameofthewishlist%".' d='Modules.Blockwishlist.Shop'}'
data-cancel-text="{l s='Cancel' d='Modules.Blockwishlist.Shop'}"
data-delete-text="{l s='Remove' d='Modules.Blockwishlist.Shop'}"
data-delete-text-list="{l s='Delete' d='Modules.Blockwishlist.Shop'}"
>
<div
class="wishlist-modal modal fade"
{literal}
:class="{show: !isHidden}"
{/literal}
tabindex="-1"
role="dialog"
aria-modal="true"
>
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header px-3">
<h5 class="modal-title">((modalTitle))</h5>
<button
type="button"
class="btn-close"
@click="toggleModal"
data-dismiss="modal"
aria-label="Close"
>
</button>
</div>
<div class="modal-body" v-if="productId">
<p class="modal-text">((confirmMessage))</p>
</div>
<div class="modal-footer">
<button
type="button"
class="modal-cancel btn btn-secondary"
data-dismiss="modal"
@click="toggleModal"
>
((cancelText))
</button>

<button
type="button"
class="btn btn-primary"
@click="deleteWishlist"
>
((modalDeleteText))
</button>
</div>
</div>
</div>
</div>

<div
class="modal-backdrop fade"
{literal}
:class="{in: !isHidden}"
{/literal}
>
</div>
</div>
64 changes: 64 additions & 0 deletions modules/blockwishlist/views/templates/components/modals/login.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}

<div
class="wishlist-login"
data-login-text="{l s='Sign in' d='Modules.Blockwishlist.Shop'}"
data-cancel-text="{l s='Cancel' d='Modules.Blockwishlist.Shop'}"
>
<div
class="wishlist-modal modal fade"
{literal}
:class="{show: !isHidden}"
{/literal}
tabindex="-1"
role="dialog"
aria-modal="true"
>
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header px-3">
<h5 class="modal-title">{l s='Sign in' d='Modules.Blockwishlist.Shop'}</h5>
<button
type="button"
class="btn-close"
@click="toggleModal"
data-dismiss="modal"
aria-label="Close"
>
</button>
</div>
<div class="modal-body">
<p class="modal-text">{l s='You need to be logged in to save products in your wishlist.' d='Modules.Blockwishlist.Shop'}</p>
</div>
<div class="modal-footer">
<button
type="button"
class="modal-cancel btn btn-secondary"
data-dismiss="modal"
@click="toggleModal"
>
((cancelText))
</button>

<a
class="btn btn-primary"
:href="prestashop.urls.pages.authentication"
>
((loginText))
</a>
</div>
</div>
</div>
</div>

<div
class="modal-backdrop fade"
{literal}
:class="{in: !isHidden}"
{/literal}
>
</div>
NeOMakinG marked this conversation as resolved.
Show resolved Hide resolved
</div>
76 changes: 76 additions & 0 deletions modules/blockwishlist/views/templates/components/modals/rename.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}

<div
class="wishlist-rename"
data-url="{$url}"
data-title="{l s='Rename wishlist' d='Modules.Blockwishlist.Shop'}"
data-label="{l s='Wishlist name' d='Modules.Blockwishlist.Shop'}"
data-placeholder="{l s='Wishlist name' d='Modules.Blockwishlist.Shop'}"
data-cancel-text="{l s='Cancel' d='Modules.Blockwishlist.Shop'}"
data-rename-text="{l s='Rename wishlist' d='Modules.Blockwishlist.Shop'}"
>
<div
class="wishlist-modal modal fade"
{literal}
:class="{show: !isHidden}"
{/literal}
tabindex="-1"
role="dialog"
aria-modal="true"
>
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header px-3">
<h5 class="modal-title">((title))</h5>
<button
type="button"
class="btn-close"
@click="toggleModal"
data-dismiss="modal"
aria-label="Close"
>
</button>
</div>
<div class="modal-body">
<div class="form-group form-group-lg">
<label class="form-label" for="input2">((label))</label>
<input
type="text"
class="form-control form-control-lg"
v-model="value"
id="input2"
/>
NeOMakinG marked this conversation as resolved.
Show resolved Hide resolved
</div>
</div>
<div class="modal-footer">
<button
type="button"
class="modal-cancel btn btn-secondary"
data-dismiss="modal"
@click="toggleModal"
>
((cancelText))
</button>
<button
type="button"
class="btn btn-primary"
@click="renameWishlist"
>
((renameText))
</button>
</div>
</div>
</div>
</div>

<div
class="modal-backdrop fade"
{literal}
:class="{in: !isHidden}"
{/literal}
>
</div>
</div>
Loading