72 lines
3.8 KiB
PHP
72 lines
3.8 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', __('assetexchange::lang.edit') . ' — ' . $listing->title)
|
|
|
|
@section('content')
|
|
@include('assetexchange::layouts.nav')
|
|
|
|
<section class="content no-print mt-page">
|
|
<div class="mt-page-header">
|
|
<h1><i class="fas fa-edit" style="color:#3b82f6;margin-left:8px;"></i> @lang('assetexchange::lang.edit') — {{ $listing->title }}</h1>
|
|
<a href="{{ action([\Modules\AssetExchange\Http\Controllers\ListingController::class, 'show'], [$listing->id]) }}" class="btn btn-default">
|
|
<i class="fa fa-arrow-right"></i> @lang('assetexchange::lang.back')
|
|
</a>
|
|
</div>
|
|
|
|
<div class="mt-card">
|
|
<div class="mt-card-body">
|
|
{!! Form::open(['url' => action([\Modules\AssetExchange\Http\Controllers\ListingController::class, 'update'], [$listing->id]), 'method' => 'PUT']) !!}
|
|
<div class="row">
|
|
<div class="col-md-8">
|
|
<div class="form-group">
|
|
{!! Form::label('title', __('assetexchange::lang.listing_title') . ':') !!}
|
|
{!! Form::text('title', $listing->title, ['class' => 'form-control', 'required']) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
{!! Form::label('listing_type', __('assetexchange::lang.listing_type') . ':') !!}
|
|
{!! Form::select('listing_type', $listing_types, $listing->listing_type, ['class' => 'form-control select2', 'style' => 'width:100%']) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
{!! Form::label('seller_contact_id', __('assetexchange::lang.seller') . ':') !!}
|
|
{!! Form::select('seller_contact_id', $contacts, $listing->seller_contact_id, ['class' => 'form-control select2', 'placeholder' => __('assetexchange::lang.select'), 'style' => 'width:100%']) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
{!! Form::label('asking_price', __('assetexchange::lang.asking_price') . ':') !!}
|
|
{!! Form::text('asking_price', $listing->asking_price, ['class' => 'form-control input_number']) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="form-group">
|
|
{!! Form::label('year_manufactured', __('assetexchange::lang.year_manufactured') . ':') !!}
|
|
{!! Form::number('year_manufactured', $listing->year_manufactured, ['class' => 'form-control']) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="form-group">
|
|
{!! Form::label('description', __('assetexchange::lang.description') . ':') !!}
|
|
{!! Form::textarea('description', $listing->description, ['class' => 'form-control', 'rows' => 4]) !!}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<div class="checkbox">
|
|
<label>{!! Form::checkbox('price_negotiable', 1, $listing->price_negotiable, ['class' => 'input-icheck']) !!} @lang('assetexchange::lang.price_negotiable')</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary"><i class="fa fa-save"></i> @lang('assetexchange::lang.save')</button>
|
|
{!! Form::close() !!}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|
|
|
|
@section('javascript')
|
|
<script>$(function(){ $('.select2').select2(); });</script>
|
|
@endsection
|