odex25_standard/odex25_donation/ensan_website_sale/views/templates.xml

1136 lines
66 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="payment_sale_extra_field" inherit_id="payment.payment_tokens_list">
<xpath expr="//div[hasclass('card')]" position="before">
<div id="vit-payment-sale-extra-field"
class="d-flex flex-wrap flex-column flex-sm-row justify-content-left justify-content-sm-between align-items-left position-relative">
<div class="d-flex align-items-left mt16">
<h5 class="d-flex flex-column">
<label for="order_name">
Your Name
</label>
<input type="text" id="order_name" name="order_name"
placeholder="Enter your name" />
</h5>
</div>
<div class="d-flex align-items-left mt16">
<h5 class="d-flex flex-column">
<label for="order_mobile_number">
Mobile
</label>
<input class="allow-ar-number" id="order_mobile_number"
name="order_mobile_number" placeholder="05XXXXXXXX" maxlength="10"
inputmode="numeric" />
</h5>
</div>
</div>
</xpath>
</template>
<template id="cart_lines" inherit_id="website_sale.cart_lines">
<xpath expr="//t[@t-foreach='website_sale_order.website_order_line']/tr"
position="attributes">
<attribute name="t-att-data-product-id">line.product_id.barcode or line.product_id.id</attribute>
</xpath>
<xpath expr="//td[hasclass('td-qty')]" position="attributes">
<attribute name="t-if">not line.product_id.is_donation or (line.product_id.is_donation
and line.product_id.donation_type == 'Fixed Amount')</attribute>
</xpath>
<xpath expr="//td[hasclass('td-qty')]" position="after">
<td class="text-center td-qty" t-else="">
<span
t-esc="int(line.product_uom_qty) == line.product_uom_qty and int(line.product_uom_qty) or line.product_uom_qty" />
</td>
</xpath>
<xpath expr="//td[hasclass('td-price')]" position="attributes">
<attribute name="t-if">not line.product_id.is_donation or (line.product_id.is_donation
and line.product_id.donation_type == 'Fixed Amount')</attribute>
</xpath>
<xpath expr="//td[hasclass('td-price')]" position="after">
<td class="text-center td-price" t-else="">
<div class="css_quantity input-group mx-auto">
<div class="input-group-prepend">
<a t-attf-href="#"
class="btn btn-link js_add_cart_json d-none d-md-inline-block"
aria-label="Remove one" title="Remove one">
<i class="fa fa-minus"></i>
</a>
</div>
<input style="min-width:60px;" type="text"
class="js_quantity form-control quantity" t-att-data-line-id="line.id"
t-att-data-product-id="line.product_id.id"
t-att-value="line.price_reduce_taxexcl" />
<div class="input-group-append">
<a t-attf-href="#"
class="btn btn-link float_left js_add_cart_json d-none d-md-inline-block"
aria-label="Add one" title="Add one">
<i class="fa fa-plus"></i>
</a>
</div>
</div>
</td>
</xpath>
</template>
<template id="quick_donation_layout" inherit_id="website.layout">
<xpath expr="//div[@id='wrapwrap']" position="inside">
<div id="quick-donation-widget"
t-attf-class="donation-product-detail-layout fixed-side-menu {{'d-none' if hide_quick_donation else ''}}"
role="region"
aria-label="Quick donation">
<h2 class="sr-only">Quick donation</h2>
<div class="d-flex clickable" id="quick-donation-button">
<div class="title text-center font-bold text-primary-green">Quick donation</div>
<div class="icon">
<button id="qd-open" class="btn hide-hovered" aria-label="Quick donation"
aria-describedby="qd-opener-description">
<span class="round" aria-hidden="true">+</span>
</button>
<button id="qd-close" class="btn btn-primary-green hovered"
aria-label="Close"
aria-describedby="qd-closer-description">
<span class="close-icon" aria-hidden="true">
<i class="fa fa-times"></i>
</span>
</button>
<span id="qd-opener-description" class="d-none">Click to open the Quick
Donate box in a pop-up window</span>
<span id="qd-closer-description" class="d-none">Click to close the Quick
Donate box.</span>
</div>
</div>
<div class="options" role="application" aria-roledescription="Interactive box."
aria-label="Quick donation"
aria-owns="qd-close qd-options qd-panel" style="overflow:auto;max-height:600px;"
aria-describedby="qd-panel-description">
<h3 id="qd-options-list" class="sr-only">Quick donation options</h3>
<t t-set="quick_donation_products"
t-value="request.env['product.product'].sudo().search_read([('website_published', '=', true), ('is_donation', '=', true), ('is_quick_donation', '=', true)], ['name'])" />
<ul id="qd-options" class="nav nav-tabs" aria-labelledby="qd-options-list"
data-kbd-nav="true"
data-kbd-nav-autoclick="true" data-kbd-nav-attr="aria-pressed"
aria-describedby="qd-sr-help">
<t t-foreach="quick_donation_products" t-as="quick_product">
<li tabindex="-1" t-att-data-product_id="quick_product['id']"
role="button" aria-pressed="false"
t-att-class="'active' if quick_product['id'] == quick_donation_products[0]['id'] else ''">
<t t-esc="quick_product['name']" />
</li>
</t>
</ul>
<div id="qd-panel" class="tab-content">
<div id="fixed-side-menu-tab1" class="tab-pane fade in active p-3">
<div id="quick-donation-1" class="amount-field collapse show">
<h3 id="qd-pre-amounts-title" class="sr-only">Choose the donation
amount</h3>
<div id="qd-pre-amounts" class="d-flex justify-content-between mb-2"
role="radiogroup"
aria-labelledby="qd-pre-amounts-title"
aria-describedby="qd-need-notice" data-kbd-nav="true"
data-kbd-nav-autoclick="true" data-kbd-nav-attr="aria-checked">
<button type="button"
class="btn btn-white border flex-fill pre-amount"
data-amount="10"
aria-label="10 Saudi riyals" role="radio"
aria-checked="false">10 <small class="ms-1 "
style="color: #03604d;">SAR</small>
</button>
<button type="button"
class="btn btn-white border flex-fill pre-amount"
data-amount="50"
aria-label="50 Saudi riyals" role="radio"
aria-checked="false">50 <small class="ms-1"
style="color: #03604d;">SAR</small>
</button>
<button type="button"
class="btn btn-white border flex-fill pre-amount"
data-amount="100"
aria-label="100 Saudi riyals" role="radio"
aria-checked="false" aria-invalid="false">100 <small
class="ms-1" style="color: #03604d;">SAR</small>
</button>
</div>
<div class="price-details" role="group"
aria-label="Another donation amount">
<input id="qd_amount"
class="allow-ar-number only-number amount click-select form-control"
placeholder="amount value" autocomplete="off"
inputmode="numeric" pattern="[0-9]*"
value="" aria-describedby="qd-need-notice" />
<span class=" float-right" style="color: #03604d;"
aria-hidden="true">SAR</span>
</div>
<span class="field-validation-error" role="alert" />
<div class="form-group" style="color:black;margin-top:10px;">
<label for="mobile_number">Mobile Number</label>
<div class="card-type">
<input name="mobile_number"
class="allow-ar-number only-number click-select form-control"
id="qd_mobile_number"
placeholder="05XXXXXXXX" inputmode="numeric"
maxlength="10" pattern="[0-9]*" />
<div class="valid-feedback">Valid Number!</div>
<div class="invalid-feedback">Invalid Mobile Number!</div>
</div>
</div>
<span id="qd-need-notice"
class="text-desc w-100 text-center font-bold">
</span>
<t t-set="quick_donation_payment_acquire_ids"
t-value="request.env['payment.acquirer'].sudo().search([('state', '=', 'enabled'), ('provider', '=', 'hyperpay')])" />
<div class="form-group text-center mt-0 mb-3">
<div class="d-flex payment-methods align-content-stretch">
<t t-foreach="quick_donation_payment_acquire_ids"
t-as="quick_donation_payment_acquire_id">
<t
t-foreach="quick_donation_payment_acquire_id.sudo().payment_icon_ids"
t-as="icon_id">
<img
t-att-data-acquire-id="quick_donation_payment_acquire_id.id"
loading="lazy"
t-attf-src="/web/image/payment.icon/{{icon_id.id}}/image"
t-att-alt="icon_id.name" />
</t>
</t>
</div>
</div>
<div id="donate_error_msg"
class="o_hidden alert alert-danger text-center" />
<div class="apple-pay-button-container">
<iframe t-if="not hide_quick_donation"
style="width: 100%; height: 40px; border: none;"
t-attf-src="{{request.httprequest.url_root}}applepay">
</iframe>
</div>
<button
if="quick_donation_payment_acquire_ids and quick_donation_products"
id="qd-checkout-buuton" type="button"
class="btn btn-primary-green rounded-pill w-100"
aria-label="Donate now to facilitate">Donate now
</button>
</div>
<input id='hyperpay_tx' class="hyperpay_tx" type="hidden" name="txId"
t-att-value="txId" />
<div id="quick-donation-3" class="collapse quick_hyperpay_iframe"
style="margin:auto;" />
</div>
</div>
<div id="qn-spinner"
class="justify-content-center flex-column align-self-center m-4 o_hidden"
style="min-height:250px;">
<div class="alert alert-info text-center mt16 font-weight-bold"> We are
Processing your Payment! <br /> Please do not refresh/close this window
or click the Back button on your browser. </div>
<div class="align-self-center spinner-border" />
<span class=" align-self-center">Loading...</span>
</div>
<div id="qn-success"
class="justify-content-center flex-column align-self-center m-4 o_hidden"
style="min-height:250px;">
<h1 class="text-center slide-in d-flex justify-content-center">
<div class="btn-gradient"
style="border-radius: 50%;height: 50px;width: 50px;">
<i class="fa fa-check" />
</div>
</h1>
<h1 class="text-center font-weight-bold">
Payment Received!
</h1>
<h3 class="text-center">
Thanks for the Donation!
</h3>
</div>
<div id="qn-failure"
class="o_hidden justify-content-center flex-column align-self-center m-4"
style="min-height:250px;">
<h1 class="text-center slide-in d-flex justify-content-center">
<div
style="background-color: red;border-radius: 50%;height: 50px;width: 50px;color:white;">
<i class="fa fa-times" />
</div>
</h1>
<h1 class="text-center font-weight-bold">
Payment Failed!
</h1>
<h3 class="text-center">
Please Try again after Sometime.
</h3>
</div>
</div>
</div>
</xpath>
</template>
<template id="website_sale_payment_add_applepay" inherit_id="website_sale.payment">
<xpath expr="//div[@id='payment_method']" position="inside">
<div class="apple-pay-button-container">
<iframe style="width: 100%; height: 70px; border: none;"
t-attf-src="{{request.httprequest.url_root}}applepay">
</iframe>
</div>
</xpath>
</template>
<template id="cart_summary_inherit" inherit_id="website_sale.cart_summary">
<xpath expr="//tr[@t-foreach='website_sale_order.website_order_line']" position="attributes">
<attribute name="t-att-data-product-id">line.product_id.id</attribute>
</xpath>
</template>
<template id="product_details_gifts" name="Gifts">
<div id="product_details_gifts_container">
<div
class="center py-4 border-rounded-2 text-light position-relative gift-box"
role="presentation">
<div class="gift-checkbox-wrapper" role="presentation">
<div class="form-check form-check-input-square"
role="presentation">
<input
t-if="product.available_for_dedication and product.is_gift"
class="form-check-input" data-val="true"
id="sendAsGiftCheckbox" name="IsGift"
type="checkbox"
value="true" aria-hidden="false"
aria-label="Donate on behalf of your family or friends and share the reward with them" />
<label
t-if="product.available_for_dedication and product.is_gift"
class="form-check-label text-black-50"
for="sendAsGiftCheckbox">
Donate on behalf
of your family or friends and share the
reward with
them
</label>
</div>
<img
t-if="product.available_for_dedication and product.is_gift"
class="gift-icon"
src="/ensan_website_sale/static/src/img/icons-gift-green.svg"
alt="" />
</div>
</div>
<t t-if="product.donation_type == 'Free Amount'">
<div id="gift-details" role="group" style="display: none;">
<div id="gifteeContainer" class="form-group mb-3">
<div id="gifteeBoxDetails-1"
class="gifteeBoxDetails bg-green-opacity-5 p-3 border-rounded-10 mb-3"
role="group">
<button type="button" id="remove_gift_card"
class="btn p-0 d-block ms-auto text-primary-darksky removeGiftee"
aria-label="Remove GiftCard">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
<div class="row mb-3">
<div class="col-lg-6">
<label
class="col-form-label text-primary-blue font-bold">
Donate On Behalf
</label>
<input type="text"
class="input-gifteeName form-control"
data-checkname="true"
name="gift-name-1"
id="gift-name-1" maxlength="25"
placeholder="Full Name" />
<div class="valid-feedback">Valid Name!</div>
<div class="invalid-feedback">Invalid
Name!</div>
</div>
<div class="col-lg-6">
<label
class="col-form-label text-primary-blue font-bold"
for="Gift-MobileNumber_1">Mobile
Number
</label>
<div class="d-flex mobile-container"
role="group">
<input type="text"
class="only-number-with-paste form-control rounded-0 border-right-input number-input text-end input-gifteeNumber input-gifteeNumber-0 allow-ar-number only-number"
inputmode="numeric"
pattern="[0-9]*"
autocomplete="off"
data-val="true" maxlength="10"
placeholder="05xxxxxxxx"
name="gifteeNumber-1"
id="gifteeNumber-1" />
</div>
</div>
</div>
<div class="mb-3" role="group">
<div class="row amountsContainer">
<label
class="col-form-label text-primary-blue font-bold">
Donation Amount
</label>
<div
class="d-flex align-items-baseline col-12 col-md-6 col-lg-12 col-xl-6 amount-radios-container">
<div
class="amountRadioBtns amountRadioBtns0 d-flex mb-2 mb-lg-2 w-100"
data-bs-toggle="buttons"
role="radiogroup">
<input type="radio"
class="gift-input-amount control-input btn-check"
name="amountContainer-1"
id="amount-1"
value="10"
role="radio" />
<label for="amount-1"
class="btn flex-fill"
role="none">
<span aria-hidden="false">
<span
class="amountNumber">
10</span>
<small class="ms-1">
<t
t-esc="website.pricelist_id.currency_id.name" />
</small>
</span>
</label>
<input type="radio"
class="gift-input-amount control-input btn-check"
name="amountContainer-1"
id="amount-2"
value="50"
role="radio" />
<label for="amount-2"
class="btn flex-fill"
role="none">
<span aria-hidden="false">
<span
class="amountNumber">
50</span>
<small class="ms-1">
<t
t-esc="website.pricelist_id.currency_id.name" />
</small>
</span>
</label>
<input type="radio"
class="gift-input-amount control-input btn-check"
name="amountContainer-1"
id="amount-3"
value="100"
role="radio" />
<label for="amount-3"
class="btn flex-fill"
role="none">
<span aria-hidden="flase">
<span
class="amountNumber">
100</span>
<small class="ms-1">
<t
t-esc="website.pricelist_id.currency_id.name" />
</small>
</span>
</label>
</div>
</div>
<div
class="col-12 col-md-6 col-lg-12 col-xl-6">
<div class="AnotherAmount-container">
<div class="input-group">
<input name="otheramount-1"
id="otheramount-1"
class="donation-input-amt gift-donation-amount payment-input AnotherAmountAdd form-control input-right only-number-with-paste number-input border-end-0 allow-ar-number only-number"
type="text"
autocomplete="off"
placeholder="Another Amount"
inputmode="numeric"
pattern="[0-9]*"
aria-label="Another Amount" />
<span
class="input-group-text bg-white border-start-0 text-primary-green rounded-bottom-left-45px rounded-top-left-45px">
<t
t-esc="website.pricelist_id.currency_id.name" />
</span>
</div>
<div class="valid-feedback">Valid
Amount!</div>
<div class="invalid-feedback">Invalid
Amount!</div>
</div>
</div>
</div>
</div>
</div>
</div>
<button type="button"
class="btn btn-sm btn-outline-primary-blue rounded-pill font-semibold px-4 mb-3 mt-2"
id="addGiftee"><i class="fa fa-plus me-2 fs-12px"
aria-hidden="true" />Donate For Someone Else </button>
</div>
</t>
<t t-else="">
<div id="gift-details" role="group" style="display: none;">
<div id="gifteeContainer" class="form-group mb-3">
<div id="gifteeBoxDetails-1"
class="gifteeBoxDetails bg-green-opacity-5 p-3 border-rounded-10 mb-3"
role="group">
<button type="button" id="remove_gift_card"
class="btn p-0 d-block ms-auto text-primary-darksky removeGiftee"
aria-label="Remove GiftCard">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
<div class="row mb-3">
<div class="col-lg-6">
<label
class="col-form-label text-primary-blue font-bold">
Donate On Behalf
</label>
<input type="text"
class="input-gifteeName form-control payment-input"
data-checkname="true"
name="gift-name-1"
id="gift-name-1" maxlength="25"
placeholder="Full Name" />
<div class="valid-feedback">Valid Name!</div>
<div class="invalid-feedback">Invalid
Name!</div>
</div>
<div class="col-lg-6">
<label
class="col-form-label text-primary-blue font-bold"
for="Gift-MobileNumber_1">Mobile
Number
</label>
<div class="d-flex mobile-container"
role="group">
<input type="text"
class="only-number-with-paste form-control rounded-0 border-right-input number-input text-end input-gifteeNumber input-gifteeNumber-0 allow-ar-number only-number"
inputmode="numeric"
pattern="[0-9]*"
autocomplete="off"
data-val="true" maxlength="10"
placeholder="05xxxxxxxx"
name="gifteeNumber-1"
id="gifteeNumber-1" />
</div>
</div>
</div>
<div class="mb-3" role="group">
<div class="row amountsContainer">
<label
class="col-form-label text-primary-blue font-bold">
Donation Amount
</label>
<div
class="d-flex align-items-baseline col-12 col-md-6 col-lg-12 col-xl-6 amount-quantity">
<div
class="css_quantity input-group d-flex mb-2 mb-lg-2 w-100 align-middle"
contenteditable="false">
<a t-attf-href="#"
class="btn btn-link js_add_cart_json"
aria-label="Remove one"
title="Remove one">
<i class="fa fa-minus"></i>
</a>
<input id="fixedqtyinput-1"
type="text"
class="form-control update_amount quantity text-center allow-ar-number only-number"
t-att-data-price="product.list_price"
data-min="1" name="add_qty"
t-att-value="0"
pattern="[0-9]*" />
<a t-attf-href="#"
class="btn btn-link float_left js_add_cart_json"
aria-label="Add one"
title="Add one">
<i class="fa fa-plus"></i>
</a>
</div>
</div>
<div
class="col-12 col-md-6 col-lg-12 col-xl-6">
<div class="AnotherAmount-container">
<div class="input-group">
<input
name="fixedamountinput-1"
id="fixedamountinput-1"
readonly="readonly"
class="donation-input-amt gift-donation-amount payment-input AnotherAmountAdd form-control input-right only-number-with-paste number-input border-end-0 allow-ar-number only-number"
type="text"
autocomplete="off"
placeholder="Another Amount"
inputmode="numeric"
pattern="d*"
aria-label="Another Amount" />
<span
class="input-group-text bg-white border-start-0 text-primary-green rounded-bottom-left-45px rounded-top-left-45px">
<t
t-esc="website.pricelist_id.currency_id.name" />
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<button type="button"
class="btn btn-sm btn-outline-primary-blue rounded-pill font-semibold px-4 mb-3 mt-2"
id="addGiftee"><i class="fa fa-plus me-2 fs-12px"
aria-hidden="true" />Donate For Someone Else </button>
</div>
</t>
</div>
</template>
<template id="donation_product_details_layout" inherit_id="website_sale.product">
<xpath expr="//p[@t-field='product.description_sale']" position="after">
<t t-if="product.donation_type == 'Free Amount'">
<div
class="align-items-center bg-light-grey d-flex justify-content-between px-3 py-2">
<div class="font-semibold">
<span class="text-primary-blue">
Case number
</span>
<span class="text-primary-green ms-2">
<t t-esc="product.default_code" />
</span>
</div>
<div class="font-semibold">
<button
class="donation_share_btn btn btn-dark-grey d-flex px-3 py-1 rounded-pill share-help ghiras_share align-items-center"
title="Share your donation on social media"
t-att-data-website_url="website.domain + product.website_url">
<span class="text-primary-blue me-2">
sharing
</span>
<i
class="fa fa-share-alt share-icon text-primary-green" />
</button>
</div>
</div>
<t t-if="product.sudo().target_amount &gt; 1">
<div class="row p-3">
<div class="col">
<span class=" font-semibold"
style="color:#03604d;">Target</span>
<label class=" d-block h5 font-regular fw-light"
style="color:#03604d;">
<t t-esc="product.sudo().target_amount" />
<small class="ms-2 text-nowrap">
<t
t-esc="website.pricelist_id.currency_id.name" />
</small>
</label>
</div>
<div class="col">
<span class=" font-semibold"
style="color:#03604d;">Remaining amount</span>
<label
class=" d-block h5 font-regular fw-light MaxValSpan"
style="color:#03604d;">
<t t-esc="product.sudo().remaining_amount" />
<small class="ms-2 text-nowrap">
<t
t-esc="website.pricelist_id.currency_id.name" />
</small>
</label>
</div>
</div>
</t>
<div class="progress flex-row-reverse active">
<div
class="progress-bar progress-bar-striped progress-bar-animated"
role="progressbar"
aria-valuenow="product.done_percentage"
aria-valuemin="0" aria-valuemax="100"
t-att-style="'width: ' + str(product.sudo().done_percentage) + '%'">
<t t-esc="str(product.sudo().done_percentage) + '%'" />
</div>
</div>
</t>
<t t-elif="product.donation_type == 'Fixed Amount'">
<div
class="align-items-center bg-light-grey d-flex justify-content-between px-3 py-2">
<div class="font-semibold">
<span class="text-primary-blue">
The unit price is
</span>
<span class="text-primary-green ms-2">
<t t-out="product.list_price"
t-options="{'widget': 'monetary', 'display_currency': website.pricelist_id.currency_id}" />
</span>
</div>
<div class="font-semibold">
<button
class="donation_share_btn btn btn-dark-grey d-flex px-3 py-1 rounded-pill share-help ghiras_share align-items-center"
title="Share your donation on social media"
t-att-data-website_url="website.domain + product.website_url">
<span class=" me-2" style="color:#03604d;">
sharing
</span>
<i
class="fa fa-share-alt share-icon text-primary-green" />
</button>
</div>
</div>
<div class="row p-3">
<div class="col">
<t t-if="product.sudo().target_amount &gt; 1">
<span class=" font-semibold"
style="color:#03604d;">has been supported</span>
<label class="d-block h5 font-regular fw-light"
style="color:#03604d;">
<t t-esc="product.sudo().beneficiaries_been_supported" />
<small class="ms-2 text-nowrap">
<span class="font-semibold"
style="color:#03604d;">Share</span>
</small>
</label>
</t>
</div>
<div class="col">
<t t-if="product.sudo().target_amount &gt; 1">
<span class="font-semibold"
style="color:#03604d;">Residual</span>
<label
class=" d-block h5 font-regular fw-light MaxValSpan"
style="color:#03604d;">
<t
t-esc="product.sudo().beneficiaries_residual" />
<small class="ms-2 text-nowrap">
<span class="font-semibold"
style="color:#03604d;">Share</span>
</small>
</label>
</t>
</div>
</div>
<div class="progress flex-row-reverse active">
<div
class="progress-bar progress-bar-striped progress-bar-animated"
role="progressbar"
aria-valuenow="product.done_percentage"
aria-valuemin="0" aria-valuemax="100"
t-att-style="'width: ' + str(product.sudo().done_percentage) + '%'">
<t t-esc="str(product.sudo().done_percentage) + '%'" />
</div>
</div>
</t>
</xpath>
<xpath expr="//form[@t-if='product._is_add_to_cart_possible()']" position="before">
<t t-if="product.donation_type == 'Free Amount'">
<div class="title-with-amounts">
<h6 class="title mb-3" aria-level="3">
Donation amount
</h6>
<div class="ProhectDetailsSubBox">
<div
class="price-details d-flex flex-lg-nowrap flex-wrap justify-content-center justify-content-lg-between">
<button type="button"
class="btn btn-white border px-3 me-1 input-radius flex-fill pre-amount single-amount"
data-amount="10"
aria-label="10 Saudi riyals"
aria-pressed="false"> 10 <small class="ms-1">
<t
t-esc="website.pricelist_id.currency_id.name" />
</small>
</button>
<button type="button"
class="btn btn-white border px-3 me-1 input-radius flex-fill pre-amount single-amount"
data-amount="50"
aria-label="50 Saudi riyals"
aria-pressed="false"> 50 <small class="ms-1">
<t
t-esc="website.pricelist_id.currency_id.name" />
</small>
</button>
<button type="button"
class="btn btn-white border px-3 me-1 input-radius flex-fill pre-amount single-amount"
data-amount="100"
aria-label="100 Saudi riyals"
aria-pressed="false"> 100 <small
class="ms-1">
<t
t-esc="website.pricelist_id.currency_id.name" />
</small>
</button>
<div class="input-group mt-1 mt-lg-0">
<input
class="donation-input-amt personal-donation-amount allow-ar-number only-number form-control border-end-0 input-another-amount"
name="amount"
placeholder="amount value" value=""
autocomplete="off" maxlength="7"
inputmode="numeric"
pattern="[0-9]*"
aria-label="Other amount (SAR)"
/>
<span
class="input-group-text bg-white border-start-0">
<small class="text-primary-green">
<t
t-esc="website.pricelist_id.currency_id.name" />
</small>
</span>
</div>
</div>
</div>
</div>
</t>
<t t-elif="product.donation_type == 'Fixed Amount'">
<div class="row amountsContainer">
<label
class="col-form-label text-primary-blue font-bold">
Donation Amount
</label>
<div
class="d-flex align-items-baseline col-12 col-md-6 col-lg-12 col-xl-6 amount-quantity">
<div
class="css_quantity input-group d-flex mb-2 mb-lg-2 w-100 align-middle"
contenteditable="false">
<a t-attf-href="#"
class="btn btn-link js_add_cart_json"
aria-label="Remove one"
title="Remove one">
<i class="fa fa-minus"></i>
</a>
<input id="fixedqtyinput-1" type="text"
class="form-control update_amount quantity text-center allow-ar-number only-number"
t-att-data-price="product.list_price"
data-min="1" name="add_qty"
value="1" pattern="[0-9]*" />
<a t-attf-href="#"
class="btn btn-link float_left js_add_cart_json"
aria-label="Add one"
title="Add one">
<i class="fa fa-plus"></i>
</a>
</div>
</div>
<div class="col-12 col-md-6 col-lg-12 col-xl-6">
<div class="AnotherAmount-container">
<div class="input-group">
<input name="fixedamountinput-1"
id="fixedamountinput-1"
readonly="readonly"
class="donation-input-amt personal-donation-amount payment-input AnotherAmountAdd form-control input-right only-number-with-paste number-input border-end-0 allow-ar-number only-number"
type="text" autocomplete="off"
placeholder="Another Amount"
inputmode="numeric" pattern="d*"
aria-label="Another Amount" />
<span
class="input-group-text bg-white border-start-0 text-primary-green rounded-bottom-left-45px rounded-top-left-45px">
<t
t-esc="website.pricelist_id.currency_id.name" />
</span>
</div>
</div>
</div>
</div>
</t>
</xpath>
<xpath expr="//p[@t-field='product.description_sale']" position="before">
<t t-call="ensan_website_sale.product_details_gifts" />
<div t-if="product._is_add_to_cart_possible()"
class="d-flex align-items-center justify-content-between pb-3 flex-wrap">
<div class="apple-pay-button-container">
<iframe
style="width: 100%; height: 40px; border: none;"
t-attf-src="{{request.httprequest.url_root}}applepay">
</iframe>
</div>
<a
class="btn btn-gradient flex-fill me-2 temp-donate-now">
Donate now
</a>
<a role="button"
class="btn btn-primary-green btn-round-icon temp-add-cart">
<i class="fa fa-cart-plus"></i>
</a>
</div>
<t t-set="product_visits" t-value="product.get_product_visitors_info(website.domain)" />
<div
class="card card-shadow mt-4 align-items-center border-0 bg-smoke-white-2 border-rounded-15 py-3 mb-3">
<div>
<img src="/ensan_website_sale/static/src/img/icon-eye.svg"
class="icon-shadow me-3 mb-2" alt="" />
<span class="font-semibold me-2" style="color:#03604d;">
Visits
</span>
<span class=" h5 me-2 numberOfVisits"
style="color:#03604d;">
<t t-esc="product_visits.get('visits', 0)" />
</span>
<span style="color:#03604d;">
visits
</span>
</div>
</div>
<div
class="card card-shadow align-items-center border-0 bg-smoke-white-2 border-rounded-15 py-3 mb-3">
<div>
<img
src="/ensan_website_sale/static/src/img/icon-last-donation.svg"
class="icon-shadow me-3 mb-2" alt="" />
<span class=" font-semibold me-2" style="color:#03604d;">
Last donation
</span>
<span class=" h5 me-2" style="color:#03604d;">
<t t-esc="product_visits.get('last_order', 0)" />
</span>
</div>
</div>
<div
class="card card-shadow align-items-center border-0 bg-smoke-white-2 border-rounded-15 py-3 mb-3">
<div>
<img
src="/ensan_website_sale/static/src/img/icon-hand.svg"
class="icon-shadow me-3 mb-2" alt="" />
<span class="font-semibold me-2" style="color:#03604d;">
The number of donations is
</span>
<span class=" h5 me-2" style="color:#03604d;">
<t t-esc="product.sudo().number_of_donations" />
</span>
<span style="color:#03604d;">
</span>
</div>
</div>
</xpath>
<xpath
expr="//form[@t-if='product._is_add_to_cart_possible()']//input[@name='product_template_id']"
position="after">
<input type="hidden"
class="form-control quantity text-center"
data-min="1" name="add_qty"
t-att-value="add_qty or 1" />
</xpath>
<xpath expr="//a[@id='add_to_cart']" position="before">
<a class="btn btn-gradient flex-fill me-2 o_we_buy_now donate_prod_buy_now">
Donate now
</a>
</xpath>
<xpath expr="//form[@t-if='product._is_add_to_cart_possible()']" position="attributes">
<attribute name="class" separator=" " add="d-none" />
</xpath>
</template>
<template id="donation_products_item" inherit_id="website_sale.products_item">
<xpath expr="//form" position="inside">
<!-- <t t-set="combination_info"
t-value="{'product_id': product_variant_id, 'display_name': product.display_name, 'list_price':
product.list_price}" />
<input name="product-tracking-info" type="hidden"
t-att-value="json.dumps(request.env['product.template'].get_google_analytics_data(combination_info))"
/> -->
<input name="product_id" t-att-value="product_variant_id" type="hidden" />
</xpath>
<xpath expr="//h6[hasclass('o_wsale_products_item_title')]" position="after">
<button
class="donation_share_btn btn btn-primary shadow-none rounded-pill"
aria-label="Share"
t-att-data-website_url="website.domain + product.website_url">
<i class="fa fa-share-alt" />
</button>
</xpath>
<xpath expr="//span[@t-field='image_holder.image_1920']" position="after">
<t t-if="product.sudo().default_code">
<figcaption>
<div>
<span class="text-primary-blue font-semibold me-2">
Case Number:
</span>
<span class="text-primary-green h5 me-2">
<t t-esc="product.sudo().default_code" />
</span>
</div>
</figcaption>
</t>
</xpath>
<xpath expr="//div[hasclass('oe_product_image')]" position="after">
<div class="progress active">
<div
class="progress-bar progress-bar-striped progress-bar-animated align-items-center"
role="progressbar"
aria-valuenow="product.done_percentage" aria-valuemin="0"
aria-valuemax="100"
t-att-style="'width: ' + str(product.sudo().done_percentage) + '%'">
<t t-esc="str(product.sudo().done_percentage) + '%'" />
</div>
</div>
<div class="tp-product-content text-center text-lg-start">
<div style="padding:0px 0.5rem;"
class="d-flex flex-wrap flex-sm-row justify-content-center justify-content-between align-items-center position-relative">
<div style="margin:10px 0px;" class="d-flex align-items-center">
<t t-if="product.sudo().target_amount &gt; 1">
<div class="d-flex flex-column">
<div>Target</div>
<div class="text-primary" t-if="product.target_amount > 0">
<span
t-if="product.is_donation and product.donation_type == 'Fixed Amount'"
style="white-space: nowrap;"
t-esc="product.target_amount"
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" />
<span t-else="" style="white-space: nowrap;"
t-esc="product.target_amount"
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" />
</div>
</div>
</t>
</div>
<div
t-if="not product.is_donation or (product.is_donation and product.donation_type == 'Fixed Amount')"
style="margin:10px 0px;"
class="d-flex align-items-center">
<div class="d-flex flex-column">
<div>Amount</div>
<div class="product_price" itemprop="offers" itemscope="itemscope"
itemtype="http://schema.org/Offer">
<del
t-attf-class="text-danger mr-2 {{'' if combination_info['has_discounted_price'] else 'd-none'}}"
style="white-space: nowrap;"
t-esc="combination_info['list_price']"
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" />
<span t-if="combination_info['price']"
t-esc="combination_info['price']"
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" />
<span itemprop="price" style="display:none;"
t-esc="combination_info['price']" />
<span itemprop="priceCurrency" style="display:none;"
t-esc="website.currency_id.name" />
</div>
</div>
</div>
<t t-if="product.sudo().target_amount &lt; 1">
<div
t-if="not product.is_donation or (product.is_donation and product.donation_type == 'Free Amount')"
style="margin:10px 0px;"
class="d-flex align-items-center">
<div class="d-flex flex-column">
<div> </div>
<div>
<div> </div>
</div>
</div>
</div>
</t>
<div style="margin:10px 0px;" class="d-flex align-items-center">
<t t-if="product.sudo().target_amount &gt; 1">
<div class="d-flex flex-column">
<div>Remaining</div>
<div class="text-primary"
t-if="product.sudo().target_amount > 0">
<span
t-if="product.is_donation and product.donation_type == 'Fixed Amount'"
style="white-space: nowrap;"
t-esc="product.sudo().remaining_amount"
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" />
<span t-else="" style="white-space: nowrap;"
t-esc="product.sudo().remaining_amount"
t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" />
</div>
</div>
</t>
</div>
</div>
<div
t-if="not product.is_donation or (product.is_donation and product.donation_type == 'Fixed Amount')"
class="align-middle text-center">
<div class="price-details d-inline-block">
<div class="css_quantity input-group mb-3">
<a t-attf-href="#" class="btn btn-link js_add_cart_json"
aria-label="Remove one"
title="Remove one">
<i class="fa fa-minus" />
</a>
<input type="text"
class="form-control update_amount quantity text-center"
t-att-data-price="product.list_price" data-min="1"
name="add_qty" value="1" />
<a t-attf-href="#" class="btn btn-link js_add_cart_json"
aria-label="Add one"
title="Add one">
<i class="fa fa-plus" />
</a>
</div>
<div class="AnotherAmount-container">
<div class="input-group mb-3">
<input name="otheramount-1" id="otheramount-1"
t-att-value="int(product.list_price)"
style="width: 90px;text-align: center !important;"
class="donation-input-amt payment-input AnotherAmountAdd form-control only-number-with-paste number-input"
type="text" autocomplete="off"
placeholder="Another Amount"
inputmode="numeric" pattern="[0-9]*"
aria-label="Another Amount"
readonly="true" />
<span class="input-group-text bg-white text-primary-green">
<t t-esc="website.pricelist_id.currency_id.name" />
</span>
</div>
<div class="valid-feedback">Valid Amount!</div>
<div class="invalid-feedback">Invalid Amount!</div>
</div>
</div>
</div>
<div style="padding:0px 0.5rem;"
class="d-flex flex-wrap flex-sm-row justify-content-center justify-content-around align-items-center position-relative">
<div
t-if="not product.is_donation or (product.is_donation and product.donation_type == 'Free Amount')"
style="margin:5px 0px;"
class="css_quantity input-group d-inline-flex me-2 mb-2 align-middle"
contenteditable="false">
<input
class="donation-product-detail-layout form-control quantity text-center"
name="add_qty"
data-min="1" style="width: 90px;text-align: center !important;"
placeholder="Donation Amount" inputmode="numeric"
pattern="[0-9]*" required="true"
oninput="checkDonationAmount(this)"
/>
<script>
function checkDonationAmount(inputField) {
var language = document.documentElement.lang||"en" ;
var enteredValue = inputField.value;
if (enteredValue === "0") {
if (language === "en-US") {alert("Donation amount cannot be zero"); }
else{ alert("لا يمكن التبرع بقيمة صفر ");}
inputField.value = "";
}
}
</script>
<span class="input-group-text bg-white border-start-0">
<small class="text-primary-green">
<t t-esc="website.pricelist_id.currency_id.symbol" />
</small>
</span>
</div>
<button style="margin:5px 1px;" type="submit"
class="btn btn-primary shadow-none rounded-pill"
aria-label="Donate Now">
Donate Now
</button>
<a style="margin:5px 0px;" id="add_to_cart" href="#" role="button"
class="a-submit btn btn-secondary shadow-none rounded-pill"
aria-label="Add to Cart">
<i class="fa fa-shopping-cart" />
</a>
</div>
<hr />
<div>
<a class="tp-link-dark text-truncate d-block text-center"
href="product_href" t-att-href="product_href"
style="text-align: center !important;">Case Details<p></p></a>
</div>
</div>
</xpath>
<xpath expr="//div[hasclass('product_price')]" position="replace" />
</template>
</odoo>