{extends "[shared]window/sliders.tpl"}

{block "custom-data"}
   <div class="row form-group">
      <div class="col-md-2 control-label">
         <label for="custom-color">Pozadí</label>
      </div>
      <div class="col-md-4">
         <select name="data[images][{$key}][data][color]" class="form-control">
            <option value="black" {if $image.data.color == "black"}selected{/if}>Tmavé</option>
            <option value="white" {if $image.data.color == "white"}selected{/if}>Světlé</option>
         </select>
      </div>
   </div>
   <div class="row form-group">
      <div class="col-md-2 control-label">
         <label for="custom-color">Tlačítko</label>
      </div>
      <div class="col-md-10">
         <input name="data[images][{$key}][data][btn]" value="{$image.data.btn}" class="form-control">
      </div>
   </div>
    {if $body.data.label == "home-reviews"}
       <div class="row form-group">
          <div class="col-md-2 control-label">
             <label>Jméno</label>
          </div>
          <div class="col-md-10">
             <input name="data[images][{$key}][data][name]" class="form-control input-sm" value="{$image.data.name}">
          </div>
       </div>
       <div class="row form-group">
          <div class="col-md-2 control-label">
             <label>Počet hvězdiček</label>
          </div>
          <div class="col-md-2">
             <select name="data[images][{$key}][data][stars]">
                 {for $i=1 to 5}
                    <option value="{$i}"{if $image.data.stars == $i} selected{/if}>{$i}</option>
                 {/for}
             </select>
          </div>
       </div>
    {/if}
{/block}


{block js append}
   <script type="text/javascript">
      function applyChosen($selector, type) {
         $selector.ajaxChosen({
            dataType: 'json',
            type: 'GET',
            keepTypingMsg: 'Zadejte více znaků...',
            lookingForMsg: 'Hledání slova',
            url: 'launch.php?s=autocomplete.php&type=' + $selector.data('type'),
         }, function (data) {
            return data;
         }, {
            width: '100%',
            placeholder_text_single: 'Vyberte sekci',
            placeholder_text_multiple: 'Vyberte několik možností',
         });
      }
   </script>
{/block}
