File "punti-vendita-popup.tmpl"

Full Path: /srv/www/www.cadoro.it/src/templates/punti-vendita-popup.tmpl
File size: 1.66 KB
MIME-type: text/html
Charset: utf-8

{extends file='layout-base.tmpl'}

{block name=title}
  Punti Vendita - CADORO
{/block}

<html>
  <body>
    {block name="body"}
    <form method="get" action="" class="container" id="punti-vendita-form"div>
      <div class="row">
        <div class="col-sm-3 mt20">
          <form method="post" action="{$base_url}/punti-vendita/popup">
            <h4 class="mt0">
              SELEZIONA IL PUNTO VENDITA
            </h4>
            <div class="mt20">
              PROVINCIA
              <select name="prov" id="prov" class="form-control">
                <option value=""></option>
                {html_options options=$provinces selected=$params.prov}
              </select>
            </div>
            <div class="mt20">
              CITTÀ
              <select name="city" id="city" class="form-control">
                <option value=""></option>
                {html_options options=$cities selected=$params.city}
              </select>
            </div>
            <div class="mt20">
              PUNTO VENDITA
              <select name="store" id="store" class="form-control">
                <option value=""></option>
                {html_options options=$stores selected=$params.store}
              </select>
            </div>
          </form>
        </div>
      </div>
    </form>
    {/block}
    {block name="jstail"}
    <script>
      $(function () {
        var $target = $("#punti-vendita-form")
        $target.find('select').on('change', function (e) {
          if ($(this).attr('name') == 'prov') {
            $('#city').val('')
          }
          $(e.target).closest('form').submit()
        })
      })
    </script>
    {/block}
  </body>
</html>