{{$product->title}} / {{trans('admin/product.product_features.title')}}
{{ html()->form()->method('POST')->class("form modulForm")->id("modulForm")->autocomplete("off")->attribute('enctype','multipart/form-data')->open() }}
@foreach($productFeatureList as $productFeature)
@php
$productFeatureType=$productFeature->type;
$val="";
if(array_key_exists($productFeature->id,$productFeatureRel)){
$val=$productFeatureRel[$productFeature->id];
}
@endphp
@endforeach
{{trans("admin/product.product_features.form.lang")}}
: {{html()->span()->style(['font-weight'=>'bold'])->text($product->language!==null ? $product->language->title: $product->lang_code)}}
{{html()->label()->for("html-".$productFeature->id)->html($productFeature->title) }}
@if($productFeatureType==="text")
{{html()->textarea()->value($val)->name("html[".$productFeature->id."]")->style(['max-height'=>'150px','min-height'=>'150px'])->id("html-".$productFeature->id."-".$productFeatureType)->class("form-control")}}
@elseif($productFeatureType==="date")
@php
if(!empty($val)){
$val=\Carbon\Carbon::parse($val)->format("Y-m-d");
}
@endphp
{{html()->date()->value($val)->attribute('pattern','\d{2}/\d{2}/\d{4}')->name("html[".$productFeature->id."]")->id("html-".$productFeature->id."-".$productFeatureType)->class("form-control")}}
@elseif($productFeatureType==="input")
{{html()->input()->value($val)->name("html[".$productFeature->id."]")->id("html-".$productFeature->id."-".$productFeatureType)->class("form-control")}}
@elseif($productFeatureType==="select")
@php
$valDecode=json_decode($productFeature->select_options,true);
$select=[];
$select[""]="Seçiniz";
if (is_array($valDecode)){
foreach ($valDecode as $v){
$select[$v]=$v;
}
}
@endphp
{{html()->select()->value($val)->options($select)->name("html[".$productFeature->id."]")->id("html-".$productFeature->id."-".$productFeatureType)->class("form-control")}}
@endif
{{html()->p()->style(['font-size'=>'12px'])->text($productFeature->description)}}
{{ html()->button()->type("submit")->class("btn btn-info btn-sm")->id("btnAction")->html(' '.trans("admin/product.product_features.detail.form.action")) }}
{{ html()->form()->close() }}