templates/tarifrechner/index.html.twig line 1

  1. {% extends 'base.html.twig' %}
  2. {% block title %} - Tarifrechner{% endblock %}
  3. {% block stylesheets %}
  4.     <link rel="stylesheet" href="{{ asset('dist/css/tom-select.css')}}"/>
  5. {% endblock %}
  6. {% block body %}
  7.     {% include 'menu/topbar.html.twig' %}
  8.     <div class="content container mx-auto">
  9.         <div class="intro-y flex items-center mt-8">
  10.             <h2 class="text-lg font-medium mr-auto">
  11.                     Finden Sie ihr passendes Produkt
  12.             </h2>
  13.     </div>
  14.         <div class="grid grid-cols-12 gap-6 mt-5">
  15.             <div class="intro-y col-span-12 lg:col-span-12">
  16.                     <!-- BEGIN: Wizard Layout -->
  17.                     <div class="intro-y box py-10 sm:py-20 mt-5">
  18.                     {% include 'global/steps.html.twig' %}
  19.                     <form action="{{ path('app_tarifrechner') }}" method="post" id="form_tarifrechner" class="mt-3">
  20.                         <input type="hidden" name="formSend" value="1"/>
  21.                         <input type="hidden" id="step" name="step" value="{{step}}"/>
  22.                         <input type="hidden" id="tarifrechner_gewerbeprodukte" name="tarifrechner_gewerbeprodukte" value="{{ gewerbeprodukte }}"/>
  23.                         
  24.                         <div class="px-5 sm:px-20 mt-10 pt-10 pb-10 border-t border-slate-200/60 dark:border-darkmode-400 stepcontent">
  25.                             <div class="font-medium text-base">
  26.                                 Tarifrechner
  27.                             </div>
  28.                             
  29.                             {# Sparte #}
  30.                             <select id="select_sparte" class="form-select sm:mt-2 sm:mr-2" aria-label=".form-select-lg example" name="sparte" required>
  31.                                 {% for key,value in spartenkennung %}
  32.                                         <option value="{{ key }}" {% if sparte is defined and key == sparte %}selected{% endif %}>{{ value }}</option>
  33.                                 {% endfor %}
  34.                             </select>
  35.                         
  36.                             <div id="form_parameter" class="flex flex-col mt-5">
  37.                                 {# Kundentyp #}
  38.                                 <div class="mb-10">
  39.                                     <div class="font-medium">Ich bin</div>
  40.                                     <div id="radio_box_kundentyp" class="flex flex-row sm:flex-col-6 mt-2">
  41.                                         <div class="grid grid-cols-12 gap-4 gap-y-5">
  42.                                             <div class="col-span-12 lg:col-span-4">
  43.                                                 <div class="form-check mr-10">
  44.                                                     <input id="radio_kundentyp_privat" class="form-check-input radio_kundentypen" type="radio" name="kundentyp" value="privat" {% if kundentyp == "privat" or kundentyp is empty %}checked="true"{% endif %} {% if warenkorbExists is not empty %}disabled="true"{% endif %}>
  45.                                                     <label class="form-check-label" for="radio_kundentyp_privat">ein neuer Privatkunde</label>
  46.                                                 </div>
  47.                                             </div>
  48.                                             <div class="col-span-12 lg:col-span-4">
  49.                                                 <div class="form-check mr-10">
  50.                                                     <input id="radio_kundentyp_gewerbe" class="form-check-input radio_kundentypen" type="radio" name="kundentyp" value="gewerbe" {% if kundentyp == "gewerbe" %}checked="true"{% endif %} {% if warenkorbExists is not empty %}disabled="true"{% endif %}>
  51.                                                     <label class="form-check-label" for="radio_kundentyp_gewerbe">ein neuer Gewerbekunde</label>
  52.                                                 </div>
  53.                                             </div>
  54.                                             <div class="col-span-12 lg:col-span-4">
  55.                                                 <div class="form-check mr-10">
  56.                                                     <input id="radio_kundentyp_bestand" class="form-check-input radio_kundentypen" type="radio" name="kundentyp" value="kunde" {% if warenkorbExists is not empty %}disabled="true"{% endif %}>
  57.                                                     <label class="form-check-label" for="radio_kundentyp_bestand">bereits Kunde</label>
  58.                                                 </div>
  59.                                             </div>
  60.                                         </div>
  61.                                     </div>
  62.                                 </div>
  63.                                 <div id="content_tarif_finden">
  64.                                     <div class="intro-y grid grid-cols-12 gap-4 gap-y-5">
  65.                                         <div class="col-span-12 lg:col-span-6">
  66.                                             <div class="font-medium">Bitte wählen Sie die Anzahl der Personen</div>
  67.                                             <div class="flex flex-col">
  68.                                                 {# Personen im Haushalt #}
  69.                                                 {% include 'global/personenimhaushalt.html.twig' %}
  70.                                             </div>
  71.                                         </div>
  72.                                     </div>
  73.                                     {# Tarifrechner Passwort #}
  74.                                     {% if tarifrechner_passwort == true %}                                
  75.                                     <div class="intro-y grid grid-cols-12 gap-4 gap-y-5 mt-5">
  76.                                         <div class="col-span-12 lg:col-span-6">
  77.                                             <div class="mt-3">
  78.                                                 <label for="input_produktkennung" class="form-label">Produktkennung</label>
  79.                                                 <input id="input_produktkennung" type="text" class="form-control" placeholder="Produktkennung" required name="tarifrechner_passwort">
  80.                                             </div>
  81.                                         </div>
  82.                                     </div>
  83.                                     {% endif %}
  84.                                     <div class="intro-y grid grid-cols-12 gap-4 gap-y-5 mt-5">
  85.                                         <div class="col-span-12 lg:col-span-6">
  86.                                             {# Jahresverbrauch #}
  87.                                             <div class="mt-3">
  88.                                                 <label for="input_jahresverbrauch" class="form-label">Jahresverbrauch in <span class="unit">kWh</span><span class="red"> *</span></label>
  89.                                                 <input id="input_jahresverbrauch" type="number" class="form-control" placeholder="Jahresverbrauch" value="{% if jahresverbrauch is defined and jahresverbrauch is not empty %}{{ jahresverbrauch }}{% endif %}" min="1" step="1" name="jahresverbrauch">
  90.                                             </div>
  91.                                             {# Adresse #}
  92.                                             <div class="mt-3">
  93.                                                 <label for="p_PostCode" class="form-label">Postleitzahl<span class="red"> *</span></label>
  94.                                                 <input type="text" class="form-control" name="plz" placeholder="Postleitzahl" id="p_PostCode" value="{{ plz }}" {% if warenkorbExists is not empty %}readonly{% endif %} minlength="5" maxlength="5">
  95.                                             </div>
  96.                                             {% if 'Ort' in einzugsgebiet or 'Straße' in einzugsgebiet or 'Anschlussobjekt' in einzugsgebiet %}
  97.                                             <div class="mt-3">
  98.                                                 <label for="p_CityName" class="form-label">Ort<span class="red"> *</span></label>
  99.                                                 <div class="relative">
  100.                                                     <input type="text" value="{{ ort }}" id="p_CityName" class="form-control" name="ort" placeholder="Ort" data-cityno="" role="combobox" aria-controls="cityOptions" aria-expanded="false" {% if warenkorbExists is not empty %}readonly{% endif %}>
  101.                                                     <button type="button" class="absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none">
  102.                                                         <!-- Heroicon name: mini/chevron-up-down -->
  103.                                                         <svg class="h-5 w-5 text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
  104.                                                                 <path fill-rule="evenodd" d="M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z" clip-rule="evenodd" />
  105.                                                         </svg>
  106.                                                     </button>
  107.                                                     <ul class="absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm hidden" id="cityOptions" role="listbox">
  108.                                                             <!-- Search Results -->
  109.                                                     </ul>
  110.                                                 </div>
  111.                                             </div>
  112.                                             {% endif %}
  113.                                         </div>
  114.                                         
  115.                                         <div class="col-span-12 lg:col-span-6">
  116.                                             {% if 'Straße' in einzugsgebiet or 'Anschlussobjekt' in einzugsgebiet %}
  117.                                             <div class="mt-3">
  118.                                                 <label for="p_StreetName" class="form-label">Straße<span class="red"> *</span></label>
  119.                                                 <div class="relative">
  120.                                                     <input type="text" value="{{ strasse }}" id="p_StreetName" class="form-control" name="strasse"  placeholder="Straße" role="combobox" aria-controls="streetOptions" aria-expanded="false" {% if warenkorbExists is not empty %}readonly{% endif %}>
  121.                                                     <button type="button" class="absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none">
  122.                                                         <!-- Heroicon name: mini/chevron-up-down -->
  123.                                                         <svg class="h-5 w-5 text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
  124.                                                                 <path fill-rule="evenodd" d="M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z" clip-rule="evenodd" />
  125.                                                         </svg>
  126.                                                     </button>
  127.                                                     <ul class="absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm hidden" id="streetOptions" role="listbox">
  128.                                                             <!-- Search Results -->
  129.                                                     </ul>
  130.                                                 </div>
  131.                                             </div>
  132.                                             {% endif %}
  133.                                             {% if 'Anschlussobjekt' in einzugsgebiet %}
  134.                                             <div class="mt-3">
  135.                                                 <label for="p_HouseNo" class="form-label">Hausnummer<span class="red"> *</span></label>
  136.                                                 <input id="p_HouseNo" type="text" class="form-control" onkeypress="return /^-?[0-9]*$/.test(this.value+event.key)" placeholder="Hausnummer" name="hausnr" value="{% if requestData.p_HouseNo is defined and requestData.p_HouseNo > 0 %}{{requestData.p_HouseNo}}{% endif %}" {% if warenkorbExists is not empty %}readonly{% endif %}>
  137.                                             </div>
  138.                                             {% endif %}
  139.                                             {% if 'Anschlussobjekt' in einzugsgebiet %}
  140.                                             <div class="mt-3">
  141.                                                 <label for="p_HouseNumberAddition" class="form-label">Hausnummer Zusatz</label>
  142.                                                 <input id="p_HouseNumberAddition" type="text" class="form-control" placeholder="Hausnummer Zusatz" name="hausnrzusatz" value="{% if requestData.p_HouseNumberAddition is defined and requestData.p_HouseNumberAddition is not empty %}{{requestData.p_HouseNumberAddition}}{% endif %}" {% if warenkorbExists is not empty %}readonly{% endif %}>
  143.                                             </div>
  144.                                             {% endif %}
  145.                                         </div>
  146.                                         <div class="intro-y col-span-12 flex items-center justify-center sm:justify-end mt-5">
  147.                                             <button id="tarifFinden" type="submit" class="btn btn-primary w-56 ml-2">Tarif finden</button>
  148.                                         </div>
  149.                                     </div>
  150.                                 </div>
  151.                                 <div id="content_gewerbekunde" class="hidden">
  152.                                     <div class="intro-y mt-8">
  153.                                         {{ text_gewerbeprodukte|raw }}
  154.                                     </div>
  155.                                 </div>
  156.                                 
  157.                                 <div id="content_bereits_kunde" class="hidden">
  158.                                     <div class="intro-y mt-8">
  159.                                         {{ text_bereits_kunde|raw }}
  160.                                     </div>
  161.                                     <div class="intro-y flex flex-col md:flex-row mt-8 items-center justify-center sm:justify-end">
  162.                                         <a class="btn btn-primary w-40 md:w-56 md:ml-2" href="/">Weiter zum Login</a>
  163.                                         <a class="btn btn-dark-soft w-40 md:ml-3 mt-2 md:mt-0" href="/?target_action=register">Jetzt registrieren</a>
  164.                                     </div>
  165.                                 </div>
  166.                             </div>
  167.                         </div>
  168.                     </form>
  169.                     {# Produktübersicht #}
  170.                     {% include 'global/produktuebersicht.html.twig' %}
  171.                     
  172.                     <div class="px-5 sm:px-20 border-t border-slate-200/60 dark:border-darkmode-400">
  173.                         <div class="intro-y col-span-12 flex flex-col md:flex-row items-center justify-between sm:justify-between mt-5">
  174.                             <a class="btn btn-secondary w-40" href="/">zurück zur Startseite</a>
  175.                             <div class="flex flex-col md:flex-row">
  176.                                 <button id="btn_restart_tarifrechner" type="button" class="btn btn-secondary w-40 mt-2 md:mt-0">Tarifwahl neu starten</button>
  177.                                 {% if warenkorbExists %}
  178.                                     <a class="btn btn-dark-soft w-40 md:ml-3 mt-2 md:mt-0" href="/tarifrechner/tarif-waehlen">Zum Warenkorb</a>
  179.                                 {% endif %}
  180.                             </div>
  181.                         </div>
  182.                     </div>
  183.                 </div>
  184.                 
  185.                 {% include 'global/footerlinks-login.html.twig' %}
  186.             </div>
  187.         </div>
  188.     </div>
  189.     <!-- END: Content -->
  190. {% endblock %}
  191. {% block scripts %}
  192.     <script src="{{ asset('/js/tarifrechner/tariffinden.js')}}"></script>
  193.     <script src="{{ asset('/js/steps.js')}}"></script>
  194. {% endblock %}