@extends('layouts.production') @section('addCss') @endsection @section('content')

{{Trans("mortgages.menu")}} {{ $mortgage->exists ? trans('mortgages.edit') : trans('mortgages.add_new') }}

@include('layouts.includes.message')

{{ $mortgage->exists ? trans("mortgages.form_edit") : trans("mortgages.form") }}

@if($mortgage->exists) {{ trans("dashboard.others.show") }} @endif
{{ Form::model($mortgage, [ 'method' => $mortgage->exists ? 'put' : 'post', 'route' => $mortgage->exists ? ['mortgages.update', $mortgage->id] : 'mortgages.store', 'files' => true ]) }}
{{ trans("mortgages.customer_info") }}
{{ Form::label("fullname", trans("mortgages.fullname")) }} * {{ Form::text("fullname", null, [ 'class' => 'form-control', 'placeholder' => trans("mortgages.fullname") ]) }} @if(isset($errors)) {{ $errors->first('fullname') }} @endif
{{ Form::label("tel", trans("mortgages.tel")) }} * {{ Form::text("tel", null, [ 'class' => 'form-control', 'placeholder' => trans("mortgages.tel") ]) }} @if(isset($errors)) {{ $errors->first('tel') }} @endif
{{ Form::label("id_card", trans("mortgages.id_card")) }} * {{ Form::text("id_card", null, [ 'class' => 'form-control', 'placeholder' => trans("mortgages.id_card") ]) }} @if(isset($errors)) {{ $errors->first('id_card') }} @endif
{{ Form::label("address", trans("mortgages.address")) }} {{ Form::textarea("address", null, [ 'class' => 'form-control', 'placeholder' => trans('mortgages.address'), 'rows' => 2 ]) }}
{{ trans("mortgages.product_info") }}
{{ Form::label("product_name", trans("mortgages.product_name")) }} * {{ Form::text("product_name", null, [ 'class' => 'form-control', 'placeholder' => trans("mortgages.product_name") ]) }} @if(isset($errors)) {{ $errors->first('product_name') }} @endif
{{ Form::label("product_id", trans("mortgages.product_id")) }} * {{ Form::text("product_id", null, [ 'class' => 'form-control', 'placeholder' => trans("mortgages.product_id") ]) }} @if(isset($errors)) {{ $errors->first('product_id') }} @endif
@if ($mortgage->exists == false)
{{ Form::label("photo", trans("mortgages.photo")) }} {{ Form::file("photo[]", ['accept'=>"image/*",'capture'=>'camera', 'class' => "form-control", 'multiple' => true ]) }}
@endif
{{ Form::label("price", trans("mortgages.price")) }} * {{ Form::text("price", null, [ 'class' => 'form-control', 'placeholder' => trans("mortgages.price") ]) }} @if(isset($errors)) {{ $errors->first('price') }} @endif
{{ Form::label("price_out", trans("mortgages.price_out")) }} * {{ Form::text("price_out", null, [ 'class' => 'form-control', 'placeholder' => trans("mortgages.price_out") ]) }} @if(isset($errors)) {{ $errors->first('price_out') }} @endif
{{ Form::label("rate", trans("mortgages.rate")) }} *