@if(session()->has('coupon_updated')) @endif @include('includes.form_errors') @can('read', App\Location::class)
@lang('Location:') @if($coupon->location) {{$coupon->location->name}} @else @lang('None') @endif

@endcan {!! Form::model($coupon, ['method'=>'patch', 'action'=>['ManageCouponsController@update', $coupon->id], 'onsubmit'=>'submit_button.disabled = true; submit_button.value = "' . __('Please Wait...') . '"; return true;']) !!}
{!! Form::label('name', __('Coupon Name:')) !!} {!! Form::text('name', null, ['class'=>'form-control', 'placeholder'=>__('Enter coupon name'), 'required'])!!}
{!! Form::label('code', __('Coupon Code:')) !!} {!! Form::text('code', null, ['class'=>'form-control', 'placeholder'=>__('Enter coupon code'), 'required'])!!}
{!! Form::label('description', __('Description:')) !!} {!! Form::textarea('description', null, ['class'=>'form-control', 'placeholder'=>__('Enter description')]) !!}
{!! Form::label('discount_amount', __('Discount Amount:')) !!} {!! Form::number('discount_amount', null, ['class'=>'form-control', 'step'=>'any', 'placeholder'=>__('Enter discount amount'), 'required', 'min'=>0]) !!}
{!! Form::label('starts_at', __('Starting Date and Time:')) !!} {!! Form::text('starts_at', null, ['class'=>'form-control', 'placeholder'=>__('Select starting date and time'), 'required', 'id' =>'datetimepicker_start'])!!}
{!! Form::label('expires_at', __('Ending Date and Time:')) !!} {!! Form::text('expires_at', null, ['class'=>'form-control', 'placeholder'=>__('Select ending date and time'), 'required', 'id' =>'datetimepicker_end'])!!}
{!! Form::label('valid_above_amount', __('Amount above which Coupon is Valid:')) !!} {!! Form::number('valid_above_amount', null, ['class'=>'form-control', 'step'=>'any', 'placeholder'=>__('Enter amount above which coupon is valid'), 'min'=>0]) !!}
{!! Form::label('discount_type', __('Discount Type:')) !!} {!! Form::select('discount_type', [0=>__('Fixed Amount'), 1=>__('Percentage')], null, ['class'=>'form-control selectpicker', 'data-style'=>'btn-default' ,'required']) !!}
{!! Form::submit(__('Update Coupon'), ['class'=>'btn btn-primary btn-block', 'name'=>'submit_button']) !!}
{!! Form::close() !!}