@if($customFields)
{!! trans('lang.main_fields') !!}
@endif
{!! Form::label('code', trans("lang.coupon_code"), ['class' => 'col-3 control-label text-right']) !!}
@if(isset($coupon['code']))

{!! $coupon->code !!}

@else {!! Form::text('code', null, ['class' => 'form-control','placeholder'=> trans("lang.coupon_code_placeholder")]) !!}
{{ trans("lang.coupon_code_help") }}
@endif
{!! Form::label('discount_type', trans("lang.coupon_discount_type"),['class' => 'col-3 control-label text-right']) !!}
{!! Form::select('discount_type', ['percent' => trans('lang.coupon_percent'),'fixed' => trans('lang.coupon_fixed')], null, ['class' => 'select2 form-control']) !!}
{{ trans("lang.coupon_discount_type_help") }}
{!! Form::label('discount', trans("lang.coupon_discount"), ['class' => 'col-3 control-label text-right']) !!}
{!! Form::number('discount', null, ['class' => 'form-control','placeholder'=> trans("lang.coupon_discount_placeholder"),'step'=>"any", 'min'=>"0"]) !!}
{!! trans("lang.coupon_discount_help") !!}
{!! Form::label('description', trans("lang.coupon_description"), ['class' => 'col-3 control-label text-right']) !!}
{!! Form::textarea('description', null, ['class' => 'form-control','placeholder'=> trans("lang.coupon_description_placeholder") ]) !!}
{{ trans("lang.coupon_description_help") }}
{!! Form::label('foods[]', trans("lang.coupon_food_id"),['class' => 'col-3 control-label text-right']) !!}
{!! Form::select('foods[]', $food, $foodsSelected, ['class' => 'select2 form-control', 'multiple'=>'multiple']) !!}
{{ trans("lang.coupon_food_id_help") }}
{!! Form::label('restaurants', trans("lang.coupon_restaurant_id"),['class' => 'col-3 control-label text-right']) !!}
{!! Form::select('restaurants[]', $restaurant, $restaurantsSelected, ['class' => 'select2 form-control', 'multiple'=>'multiple']) !!}
{{ trans("lang.coupon_restaurant_id_help") }}
{!! Form::label('categories[]', trans("lang.coupon_category_id"),['class' => 'col-3 control-label text-right']) !!}
{!! Form::select('categories[]', $category, $categoriesSelected, ['class' => 'select2 form-control', 'multiple'=>'multiple']) !!}
{{ trans("lang.coupon_category_id_help") }}
{!! Form::label('expires_at', trans("lang.coupon_expires_at"), ['class' => 'col-3 control-label text-right']) !!}
{!! Form::text('expires_at', null, ['class' => 'form-control datepicker','autocomplete'=>'off','placeholder'=> trans("lang.coupon_expires_at_placeholder") ]) !!}
{{ trans("lang.coupon_expires_at_help") }}
{!! Form::label('enabled', trans("lang.coupon_enabled"),['class' => 'col-3 control-label text-right']) !!} {!! Form::hidden('enabled', 0, ['id'=>"hidden_enabled"]) !!}
{!! Form::checkbox('enabled', 1, null) !!}
@if($customFields)
{!! trans('lang.custom_field_plural') !!}
{!! $customFields !!}
@endif
{{trans('lang.cancel')}}