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

@endcan {!! Form::model($discount, ['method'=>'patch', 'action'=>['ManageProductDiscountsController@update', $discount->id], 'onsubmit'=>'submit_button.disabled = true; submit_button.value = "' . __('Please Wait...') . '"; return true;']) !!}
{!! Form::label('name', __('Discount Name:')) !!} {!! Form::text('name', null, ['class'=>'form-control', 'placeholder'=>__('Enter discount name'), 'required'])!!}
{!! Form::label('description', __('Description:')) !!} {!! Form::textarea('description', null, ['class'=>'form-control', 'placeholder'=>__('Enter description')]) !!}
{!! Form::label('discount_amount', __('Discount Percentage:')) !!} {!! Form::number('discount_amount', null, ['class'=>'form-control', 'step'=>'any', 'placeholder'=>__('Enter discount percentage'), 'required', 'min'=>'0', 'max'=>'100']) !!}
{!! 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::submit(__('Update Discount'), ['class'=>'btn btn-primary btn-block', 'name'=>'submit_button']) !!}
{!! Form::close() !!}