Untitled
@extends('template/admin/main') @section('content') <meta name="csrf-token" content="{{ csrf_token() }}"> <style> .wrap { max-width: 980px; margin: 10px auto 0; } #steps { margin: 80px 0 0 0 } .commands { overflow: hidden; margin-top: 30px; } .prev { float: left } .next, .submit { float: right } .error { color: #b33; } #progress { position: relative; height: 5px; background-color: #eee; margin-bottom: 20px; } #progress-complete { border: 0; position: absolute; height: 5px; min-width: 10px; background-color: #337ab7; transition: width .2s ease-in-out; } </style> <div class="row"> <div class="col-lg-12"> <div class="card"> <div class="card-body"> <form id="SignupForm" action="{{url('editProject'.$project->slug)}}" class="form-disable-scrol-number" method="post" enctype="multipart/form-data"> @method('PUT') @csrf <fieldset> @if($userLogin !== 'Agents') <div class="mb-3 row"> <label for="developer" class="col-sm-2 col-form-label">Developer</label> <div class="col-sm-10"> @error('developer') <small style="color: red;">{{$message}}</small> @enderror <select name="developer" id="developer" class="form-select" required> <option value="{{$project->master_developers_id}}" selected>{{$project->master_developers->name}}</option> @if(count($developers) > 0) @foreach($developers as $dev) @if(old('developer') == $dev->id) <option value="{{$dev->id}}" selected>{{$dev->name}}</option> @else <option value="{{$dev->id}}">{{$dev->name}}</option> @endif @endforeach @endif </select> </div> </div> @endif <div class="mb-3 row"> <label for="name" class="col-sm-2 col-form-label">Projek Name</label> <div class="col-sm-10"> @error('name') <small style="color: red;">{{$message}}</small> @enderror <input type="text" name="name" class="form-control" id="name" value="{{old('name')?old('name'):$project->name}}" required> </div> </div> <div class="mb-3 row"> <label class="col-sm-2 col-form-label">Province</label> <div class="col-sm-4"> @error('province') <small style="color: red;">{{$message}}</small> @enderror <select name="province" class="form-select editProvinceSelect" data-targetselect="{{$project->slug}}" id="provinceSelect" required> <option value="">Select Province</option> @foreach($provinces as $prov) @if(old('province')) @if(old('province') == $prov->lokasi_propinsi) <option value="{{$prov->lokasi_propinsi}}" selected>{{$prov->lokasi_nama}}</option> @else <option value="{{$prov->lokasi_propinsi}}">{{$prov->lokasi_nama}}</option> @endif @else @if($prov->lokasi_propinsi == $project->lokasi_propinsi) <option value="{{$prov->lokasi_propinsi}}" selected>{{$prov->lokasi_nama}}</option> @else <option value="{{$prov->lokasi_propinsi}}">{{$prov->lokasi_nama}}</option> @endif @endif @endforeach </select> </div> <label for="city" class="col-sm-2 col-form-label">Regency / City</label> <div class="col-sm-4"> @error('city') <small style="color: red;">{{$message}}</small> @enderror <select name="city" id="{{$project->slug}}" class="form-select" required> @if(old('province')) @foreach($cities as $city) @if($city->lokasi_propinsi == old('province')) @if($city->id == old('city')) <option value="{{$city->id}}" selected>{{$city->lokasi_nama}}</option> @else <option value="{{$city->id}}">{{$city->lokasi_nama}}</option> @endif @endif @endforeach @else @foreach($cities as $city) @if($city->lokasi_propinsi == $project->lokasi_propinsi) @if($city->id == $project->master_regcities_id) <option value="{{$city->id}}" selected>{{$city->lokasi_nama}}</option> @else <option value="{{$city->id}}">{{$city->lokasi_nama}}</option> @endif @endif @endforeach @endif </select> </div> </div> <div class="mb-3 row"> <label for="address" class="col-sm-2 col-form-label">Address</label> <div class="col-sm-10"> @error('address') <small style="color: red;">{{$message}}</small> @enderror <textarea name="address" id="address" rows="2" required class="form-control">{{old('address')?old('address'):$project->address}}</textarea> </div> </div> <div class="mb-3 row"> <label for="latitude" class="col-sm-2 col-form-label">Latitude</label> <div class="col-sm-4"> @error('latitude') <small style="color: red;">{{$message}}</small> @enderror <input type="text" name="latitude" class="form-control" id="latitude" value="{{old('latitude')?old('latitude'):$project->latitude}}" placeholder="Readonly Input" required readonly> </div> <label for="longitude" class="col-sm-2 col-form-label">Longitude</label> <div class="col-sm-4"> @error('longitude') <small style="color: red;">{{$message}}</small> @enderror <input type="text" name="longitude" class="form-control" id="longitude" value="{{old('longitude')?old('longitude'):$project->longitude}}" placeholder="Readonly Input" required readonly> </div> </div> <div class="form-row"> <div class="col-md-12 mb-3"> <center> <input id="pac-input" class="controls" type="text" placeholder="Find Location .." /> <div id="map-canvas" style="width: 100%; height: 300px;"></div> </center> </div> </div> </fieldset> <fieldset> <div class="mb-3 row"> <label for="area" class="col-sm-2 col-form-label">Area</label> <div class="col-sm-4"> @error('area') <small style="color: red;">{{$message}}</small> @enderror <input type="text" name="area" class="form-control" id="area" value="{{old('area')?old('area'):$project->area}}" required> </div> <label for="zip_code" class="col-sm-2 col-form-label">Zip Code</label> <div class="col-sm-4"> @error('zip_code') <small style="color: red;">{{$message}}</small> @enderror <input type="number" name="zip_code" class="form-control" id="zip_code" value="{{old('zip_code')?old('zip_code'):$project->zip_code}}" required> </div> </div> <div class="mb-3 row"> <label for="deskripsi" class="col-sm-2 col-form-label">Deskripsi</label> <div class="col-sm-10"> @error('deskripsi') <small style="color: red;">{{$message}}</small> @enderror <textarea name="deskripsi" class="summernote" id="deskripsi" required>{{old('deskripsi')?old('deskripsi'):$project->description}}</textarea> </div> </div> </fieldset> <fieldset> <div class="mb-3 row"> <label for="cover" class="col-sm-2 col-form-label">Image Promo</label> <div class="col-sm-10"> @error('cover') <small style="color: red;">{{$message}}</small> @enderror <input type="file" name="cover" id="cover" class="form-control inputWithPreview" data-targetview="coverPreview"> </div> </div> <div class="mb-3 row"> <label for="" class="col-sm-2 col-form-label">Existing Image Promo</label> <div class="col-sm-10"> <small style="color: red; margin-right:2%">max : 3Mb</small> <small style="color: red;">resolution : 350 X 400</small> <br> <img src="{{asset('assets/images/project/cover/'.$project->image_promo)}}" alt="no image" id="coverPreview" class="img-thumbnail" style="width: 20%;"> </div> </div> <div class="mb-3 row"> <label for="banner" class="col-sm-2 col-form-label">Background</label> <div class="col-sm-10"> @error('banner') <small style="color: red;">{{$message}}</small> @enderror <input type="file" name="banner" id="banner" class="form-control inputWithPreview" data-targetview="banner_view"> </div> </div> <div class="mb-3 row"> <label for="" class="col-sm-2 col-form-label">Existing Backround</label> <div class="col-sm-10"> <small style="color: red; margin-right:2%">max : 3Mb</small> <small style="color: red;">resolution : 350 X 400</small> <br> <img src="{{asset('assets/images/project/banner/'.$project->cover_banner)}}" alt="no image" id="banner_view" class="img-thumbnail" style="width: 100%; height:200px; object-fit:contain;"> </div> </div> </fieldset> <div class="modal-footer"> <!-- <button type="submit" class="btn btn-primary">Add Project</button> --> </div> </form> <button id="SaveAccount" class="btn btn-primary submit">Update Project</button> </div> </div> </div> </div> @endsection
Leave a Comment