custom/plugins/MadMykey/src/Resources/views/storefront/utilities/mykey-modal-choice.html.twig line 1

Open in your IDE?
  1. <div id ="mykeyModalChoice" class="mykey-modal modal fade" tabindex="-1" role="dialog" aria-modal="true">
  2.     <div class="modal-dialog">
  3.         <div class="modal-content">
  4.             <div class="modal-header">
  5.                 <button type="button"
  6.                         class="modal-close close"
  7.                         data-dismiss="modal"
  8.                         aria-label="Close">
  9.                             <span aria-hidden="true">
  10.                                 {% sw_icon 'x' style { 'size': 'sm' } %}
  11.                             </span>
  12.                 </button>
  13.                 <div class="row">
  14.                     <div class="col-12 col-sm-6 col-md-8 col-lg-9 modal-header-left">
  15.                         <div class="fancy-headline">
  16.                             <div class="fancy-headline-icon">{% sw_icon "mykey" style {'pack':'bodymed'} %}</div>
  17.                             {{ "mykey.modal.headerSublime"|trans }}
  18.                             <div class="h3">{{ "mykey.modal.headerTitle"|trans }}</div>
  19.                         </div>
  20.                         <p>
  21.                             {% if not isCustomerPharmacy() %}
  22.                                 {{ "mykey.modal.headerText"|trans|raw }}
  23.                             {% else %}
  24.                                 {{ "mykey.modal.bodymedCode.content"|trans|raw }}
  25.                             {% endif %}
  26.                         </p>
  27.                     </div>
  28.                     <div class="col-sm-6 col-md-4 col-lg-3 d-none d-sm-block modal-header-right"><img src="/bundles/madmykey/storefront/img/mykey-modal-choice-header.svg" /></div>
  29.                 </div>
  30.             </div>
  31.             <div class="modal-body">
  32.                 {% if not context.customer %}
  33.                     <div class="mykey-choice has-mykey">
  34.                         <a  href="#hasMyKey" data-toggle="collapse" aria-expanded="false">
  35.                             <div class="row">
  36.                                 <div class="col-1 col-sm-2 col-md-1">
  37.                                     {% sw_icon "mykey-key" style {'pack':'bodymed'} %}
  38.                                 </div>
  39.                                 <div class="col-8 col-md-10">
  40.                                     <div class="mykey-choice-sublime">{{ "mykey.modal.choice.hasMyKey.sublime"|trans }}</div>
  41.                                     <div class="mykey-choice-title">{{ "mykey.modal.choice.hasMyKey.title"|trans|raw }}</div>
  42.                                 </div>
  43.                                 <div class="col-2 col-md-1 text-right">
  44.                                     {% sw_icon "angle-circled" style {'pack':'bodymed'} %}
  45.                                 </div>
  46.                             </div>
  47.                             <div class="row">
  48.                                 <div id="hasMyKey" class="col-12 col-sm-10 col-md-11 offset-sm-2 offset-md-1 mykey-choice-inner-content collapse">
  49.                                     <div class="mykey-choice-inner-content-form">
  50.                                         <p>
  51.                                             {{ "mykey.modal.choice.hasMyKey.content.text"|trans|raw }}
  52.                                         </p>
  53.                                         {# Für den korrekten Redirect nach Login, muss die ProductId oder NavigationId als Parameter angegeben werden #}
  54.                                         {% if page is instanceof('\\Shopware\\Storefront\\Page\\Navigation\\NavigationPage') %}
  55.                                             {# Kategorieseite #}
  56.                                             {% set redirectParams = {
  57.                                                 'navigationId': page.navigationId,
  58.                                             } %}
  59.                                             {% set loginUrl =  url('frontend.bodymed_id.connect', {
  60.                                                 'redirectTo': 'frontend.navigation.page',
  61.                                                 'redirectParameters': redirectParams|json_encode
  62.                                             }) %}
  63.                                         {% elseif page is instanceof('\\Shopware\\Storefront\\Page\\Product\\ProductPage') %}
  64.                                             {# Produktseite #}
  65.                                             {% set redirectParams = {
  66.                                                 'productId': page.product.id,
  67.                                             } %}
  68.                                             {% set loginUrl = url('frontend.bodymed_id.connect', {
  69.                                                 'redirectTo': 'frontend.detail.page',
  70.                                                 'redirectParameters': redirectParams|json_encode
  71.                                             })  %}
  72.                                         {% else %}
  73.                                             {% set loginUrl = url('frontend.bodymed_id.connect') %}
  74.                                         {% endif %}
  75.                                         <a href="{{ loginUrl }}" class="btn btn-primary">{{ "account.loginBtnText"|trans }}</a>
  76.                                     </div>
  77.                                 </div>
  78.                             </div>
  79.                         </a>
  80.                     </div>
  81.                     <div class="mykey-choice-divider">
  82.                         <span class="mykey-choice-divider-text">{{ "checkout.addressDividerChoiceLabel"|trans|sw_sanitize }}</span>
  83.                     </div>
  84.                 {% endif %}
  85.                 {% if not isCustomerPharmacy() %}
  86.                 <div class="mykey-choice has-no-mykey">
  87.                     <a href="#hasNoMyKey" data-toggle="collapse" {% if not context.customer %}aria-expanded="false"{% else %}aria-expanded="true"{% endif %}>
  88.                         <div class="row">
  89.                             <div class="col-1 col-sm-2 col-md-1">
  90.                                 {% sw_icon "mykey" style {'pack':'bodymed'} %}
  91.                             </div>
  92.                             <div class="col-8 col-md-10">
  93.                                 <div class="mykey-choice-sublime">{{ "mykey.modal.choice.hasNoMyKey.sublime"|trans }}</div>
  94.                                 <div class="mykey-choice-title">{{ "mykey.modal.choice.hasNoMyKey.title"|trans|raw }}</div>
  95.                             </div>
  96.                             <div class="col-2 col-md-1 text-right">
  97.                                 {% sw_icon "angle-circled" style {'pack':'bodymed'} %}
  98.                             </div>
  99.                         </div>
  100.                     </a>
  101.                     <div class="row">
  102.                         <div id="hasNoMyKey" class="col-12 col-sm-10 col-md-11 offset-sm-2 offset-md-1 mykey-choice-inner-content collapse {% if context.customer %}show{% endif %}">
  103.                             <div class="mykey-choice-inner-content-form">
  104.                                 {% sw_include "@Storefront/storefront/utilities/mykey-register-form.html.twig" ignore missing %}
  105.                             </div>
  106.                             <div class="mykey-choice-inner-content-text">
  107.                                 <p>
  108.                                     {{ "mykey.modal.choice.hasNoMyKey.content.text"|trans|raw }}
  109.                                 </p>
  110.                             </div>
  111.                         </div>
  112.                     </div>
  113.                 </div>
  114.                 {% endif %}
  115.             </div>
  116.         </div>
  117.     </div>
  118. </div>