{extends_parent}

{block "custom-data" append}
   {if $body.data.label == "home"}
      <div class="form-group">
         <div class="col-md-2 control-label">
            <label>Anotace</label>
         </div>
         <div class="col-md-10">
            <input type="text" class="form-control" name="data[images][{$key}][data][annotation]" value="{$image.data.annotation}"/>
         </div>
      </div>
   {elseif $body.data.label|in_array:['home-sections', 'home-brands']}
      {for $i=1 to 5}
         <div class="form-group">
            <div class="col-md-2 control-label">
               <label>Tlačítko {$i}</label>
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control" placeholder="text" name="data[images][{$key}][data][buttons][{$i}][text]" value="{$image.data.buttons[$i].text}"/>
            </div>
            <div class="col-md-5">
               <input type="text" class="form-control" placeholder="odkaz" name="data[images][{$key}][data][buttons][{$i}][link]" value="{$image.data.buttons[$i].link}"/>
            </div>
         </div>
      {/for}
   {elseif $body.data.label == "footer-reviews"}
      <div class="row form-group">
         <div class="col-md-2 control-label">
            <label>Počet hvězdiček</label>
         </div>
         <div class="col-md-1">
            <select name="data[images][{$key}][data][stars]" class="selecter">
               {for $i=1 to 5}
                  <option value="{$i}"{if $image.data.stars == $i} selected{/if}>{$i}</option>
               {/for}
            </select>
         </div>
      </div>
      <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]" placeholder="Ověřený zákazník" class="form-control input-sm" value="{$image.data.name}">
         </div>
      </div>
      <div class="row form-group">
         <div class="col-md-2 control-label">
            <label>Datum</label>
         </div>
         <div class="col-md-10">
            <input type="date" name="data[images][{$key}][data][date]" class="form-control input-sm" value="{$image.data.date}">
         </div>
      </div>
   {/if}
   <div class="form-group">
      <div class="col-md-2 control-label"><label>Značka</label></div>
      <div class="col-md-3">
         <select class="selecter ajax-selecter" name="data[images][{$key}][data][producer_id]"
                 data-type="producers" data-autocomplete="producers" data-preload="producers">
            <option value="{$image.data.producer_id}" selected>{$image.data.producer_id}</option>
         </select>
      </div>
   </div>
{/block}
