{!! Form::open(['url' => action([\App\Http\Controllers\TaxonomyController::class, 'store']), 'method' => 'post', 'id' => $quick_add ? 'quick_add_category_form' : 'category_add_form' ]) !!}

@lang( 'messages.add' )

@php $name_label = !empty($module_category_data['taxonomy_label']) ? $module_category_data['taxonomy_label'] : __( 'category.category_name' ); $cat_code_enabled = isset($module_category_data['enable_taxonomy_code']) && !$module_category_data['enable_taxonomy_code'] ? false : true; $cat_code_label = !empty($module_category_data['taxonomy_code_label']) ? $module_category_data['taxonomy_code_label'] : __( 'category.code' ); $enable_sub_category = isset($module_category_data['enable_sub_taxonomy']) && !$module_category_data['enable_sub_taxonomy'] ? false : true; $category_code_help_text = !empty($module_category_data['taxonomy_code_help_text']) ? $module_category_data['taxonomy_code_help_text'] : __('lang_v1.category_code_help'); @endphp
{!! Form::label('name', $name_label . ':*') !!} {!! Form::text('name', null, ['class' => 'form-control', 'required', 'placeholder' => $name_label]); !!}
@if($cat_code_enabled)
{!! Form::label('short_code', $cat_code_label . ':') !!} {!! Form::text('short_code', null, ['class' => 'form-control', 'placeholder' => $cat_code_label]); !!}

{!! $category_code_help_text !!}

@endif
{!! Form::label('description', __( 'lang_v1.description' ) . ':') !!} {!! Form::textarea('description', null, ['class' => 'form-control', 'placeholder' => __( 'lang_v1.description'), 'rows' => 3]); !!}
@if(!empty($business) && !empty($business->enable_product_expiry) && empty($quick_add))
{!! Form::label('on_product_expiry', __('lang_v1.on_product_expiry') . ':') !!} {!! Form::select('on_product_expiry', ['keep_selling' => __('lang_v1.keep_selling'), 'stop_selling' => __('lang_v1.stop_selling')], 'keep_selling', ['class' => 'form-control', 'id' => 'on_product_expiry']); !!}
{!! Form::label('stop_selling_before_expiry', __('lang_v1.stop_selling_before') . ':') !!} {!! Form::number('stop_selling_before_expiry', 0, ['class' => 'form-control', 'min' => 0, 'placeholder' => 'عدد الأيام', 'id' => 'stop_selling_before_expiry', 'disabled' => true]); !!}
@endif @if(!empty($parent_categories) && $enable_sub_category)
{!! Form::label('parent_id', __( 'category.select_parent_category' ) . ':') !!} {!! Form::select('parent_id', $parent_categories, null, ['class' => 'form-control']); !!}
@endif
{!! Form::close() !!}