@extends('backend.layouts.app') @section('title', __('labels.backend.coupons.title').' | '.app_name()) @push('after-styles') @endpush @section('content') {{ html()->modelForm($coupon, 'PATCH', route('admin.coupons.update', $coupon->id))->class('form-horizontal')->acceptsFiles()->id('slider-create')->open() }}

@lang('labels.backend.coupons.edit')

{{ html()->label(__('labels.backend.coupons.fields.name'))->class('col-md-2 form-control-label')->for('first_name') }}
{{ html()->text('name') ->class('form-control') ->placeholder(__('labels.backend.coupons.fields.name')) ->autofocus() }}
{{ html()->label(__('labels.backend.coupons.fields.description'))->class('col-md-2 form-control-label')->for('description') }}
{{ html()->textarea('description') ->class('form-control') ->placeholder(__('labels.backend.coupons.fields.description')) ->autofocus() }}
{{ html()->label(__('labels.backend.coupons.fields.code'))->class('col-md-2 form-control-label')->for('first_name') }}
{{ html()->text('code') ->class('form-control') ->placeholder('Ex: MyShopping50') }}
{{ html()->label(__('labels.backend.coupons.fields.type'))->class('col-md-2 form-control-label')->for('first_name') }}
{{ html()->select('type',[1=>__('labels.backend.coupons.discount_rate').' (in %)',2=>__('labels.backend.coupons.flat_rate')]) ->class('form-control') }}

@lang('labels.backend.coupons.type_note')

{{ html()->label(__('labels.backend.coupons.fields.amount'))->class('col-md-2 form-control-label')->for('amount') }}
{{ html()->input('number','amount') ->placeholder(__('labels.backend.coupons.fields.amount')) ->class('form-control') }}

@lang('labels.backend.coupons.amount_note')

{{ html()->label( trans('labels.backend.coupons.fields.expires_at'))->class('col-md-2 form-control-label')->for('expires_at') }}
{!! Form::text('expires_at', $coupon->expires_at, ['class' => 'form-control date','pattern' => '(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))','id'=>'expires_at', 'placeholder' => 'yyyy-mm-dd | Ex . 2019-01-01', 'autocomplete' => 'off']) !!}
{{ html()->label(__('labels.backend.coupons.fields.min_price'))->class('col-md-2 form-control-label')->for('amount') }}
{{ html()->input('number','min_price') ->placeholder(__('labels.backend.coupons.fields.min_price')) ->class('form-control') }}
{{ html()->label(__('labels.backend.coupons.fields.per_user_limit'))->class('col-md-2 form-control-label')->for('per_user_limit') }}
{{ html()->input('number','per_user_limit') ->placeholder(__('labels.backend.coupons.fields.per_user_limit')) ->class('form-control') }}
{{ form_cancel(route('admin.coupons.index'), __('buttons.general.cancel')) }}
{{ html()->form()->close() }} @endsection @push('after-scripts') @endpush