{{function name="selectOptions" aOptions=0 mOption=0}}
	{{foreach from=$aOptions item=sOption}}
		<option value="{{$sOption@key}}" {{if ( is_array( $mOption ) && in_array( $sOption@key, $mOption ) ) || ( $sOption@key == $mOption )}}selected="selected"{{/if}}>{{$sOption}}</option>
	{{/foreach}}
{{/function}}

<form action="admin.php?p=discount-coupons-generate" method="post" enctype="multipart/form-data">
	<table class="details">
		<tr><td class="name">{{$lang.File_codes}}</td><td class="value"><input type="file" name="codes_file" /></td><td class="help"></td></tr>
		<tr><td class="name">{{$lang.Quantity}}</td><td class="value"><input type="text" name="count" /></td><td class="help"><img class="tTip info" src="templates/images/info.png"  title="{{$lang.help_discounts_quantity}}" /></td></tr>
		<tr><td class="name">{{$lang.Length}}</td><td class="value"><input type="text" name="length" /></td><td class="help"><img class="tTip info" src="templates/images/info.png"  title="{{$lang.help_discounts_length}}" /></td></tr>
		<tr><td class="name">{{$lang.Prefix}}</td><td class="value"><input type="text" name="sPrefix" /></td><td class="help"><img class="tTip info" src="templates/images/info.png"  title="{{$lang.help_discounts_prefix}}" /></td></tr>
		<tr><td class="name">{{$lang.Discount_value}}</td><td class="value"><input type="text" name="sDiscountValue" id="discount-value" /></td><td class="help"><img class="tTip info" src="templates/images/info.png"  title="{{$lang.help_discounts_value}}" /></td></tr>
		<tr><td class="name">{{$lang.Discount_time}}</td><td class="value"><input class="datetime" type="text" name="sTimeTo" value="{{$sDefaultTimeTo}}" /></td><td class="help"><img class="tTip info" src="templates/images/info.png"  title="{{$lang.help_discounts_time}}" /></td></tr>
		<tr><td class="name">{{$lang.Producer}}</td><td class="value"><select name="iProducer" id="producer"><option value="">{{$lang.All}}</option>{{selectOptions aOptions=$aProducers}}</select></td></tr>
		<tr><td class="name">{{$lang.Multiuse}}</td><td class="value"><input type="checkbox" value="1" name="iNotExpiring" /></td></tr>
		<tr><td colspan="3" class="save"><input class="submit" name="sOption" type="submit" value="{{$lang.Discount_add}}" /></td></tr>
	</table>
</form>