{extends file="triggers/trigger.tpl"}

{block "trigger"}
<div class="form-group">
   <div class="col-md-3 control-label">
      <label>{'price'|translate}</label>
   </div>
   <div class="col-md-5">
   <div class="input-group">
      <input type="text" class="form-control input-sm" name="{$name}[data][min]" value="{$data.min}" placeholder="{'from'|translate}" />
      <span class="input-group-btn"></span>
      <input type="text" class="form-control input-sm" name="{$name}[data][max]" value="{$data.max}" placeholder="{'to'|translate}" />
      {get_contexts currency=1 assign='contexts'}
      {$selected = $data.unit|default:$contexts.currency->getDefaultId()}
      <span class="input-group-addon" style="padding: 0px; border: 0px; min-width: 50px;">
         <select name="{$name}[data][unit]" class="selecter">
         {foreach $contexts.currency->getAll() as $currency}
            <option value="{$currency->getId()}" {$currency->getId()|selected:$selected}>{$currency->getId()}</option>
         {/foreach}
         </select>
      </span>
   </div>
   </div>
   <div class="col-md-3">
       {$values = ['1' => 'withTax'|translate:'choice', '0' => 'withoutTax'|translate:'choice']}
       {print_select name="{$name}[data][withVat]" var=$values selected=$data.withVat}
   </div>
</div>
{/block}
