Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mcoil.corals.io/resources/views/admin/town/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mcoil.corals.io/resources/views/admin/town/edit.blade.php
@extends('layouts.admin.app')
@section('content')
<div class="row">
    <div class="col-md-12">
        <section class="content">
        	@include('layouts.errors-and-messages')
            <div class="box">
                <div class="box-body">
                    <div class="col-md-12">
                        <h3 class="bold">Edit Town <small>- used for the oil quotations</small></h3>
                        {!! Form::open(['method' => 'POST','route' => ['admin.town.update', $town->id], 'id' => 'frm_add', 'class'=>'form']) !!}
                        <div class="row">
                            <div class="col-md-12">
                                <label for="title">Please edit a town. This name will be used for the oil quotations. If the county is not available in the drop down, please click <a href="{{ route('admin.county.create') }}">Add County</a> link to update that list.</label>
                            </div>
                            <div class="col-md-6">
        	                    <div class="form-group">
        	                        <label for="title">Town <span class="text-danger">*</span></label>
        	                        <div class="input-group">
        	                            <span class="input-group-addon"><i class="fa fa-map-marker"></i></span>
        	                            <input type="text" name="name" id="name" placeholder="Town" class="form-control input-lg" value="{{ $town->name }}" required="">
        	                        </div>
        	                    </div>
        	                </div>
                            <div class="col-md-6">
        	                    <div class="form-group">
        	                        <label for="title">County <span class="text-danger">*</span></label>
        	                        <select name="county_id" id="county_id" class="form-control custom-select input-lg" required="">
        	                           	<option value="">Select County</option>
        	                           	@foreach($county_list as $county)
        	                        		<option value="{{ $county->id }}" <?php if($county->id == $town->county_id){ echo "selected"; } ?> >{{ $county->name }}</option>
        	                           	@endforeach
        	                        </select>
                                </div>
                            </div>
        	            </div>
        	            <div class="row">
                            <div class="col-md-6">
                                <button type="submit" class="btn btn-lg btn-block btn-success">Update</button>
                            </div>
                            <div class="col-md-6">
                                <a href="{{ route('admin.town.index') }}" class="btn btn-lg btn-block btn-danger">Back</a>
                            </div>
                        </div> 
                        {!! Form::close() !!}
                    </div>
                </div>
            </div>
        </section>
    </div>
</div>
@endsection
@section('js')
<script src="{{ asset('https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.1/jquery.validate.min.js') }}"></script>
<script type="text/javascript">
$(document).ready(function () {
    $('#frm_add').validate({
        errorPlacement: function(error, element) {
            if (element.parent('.input-group').length) {
                error.insertAfter(element.parent());
            } else {
                error.insertAfter(element);
            }
        },
        rules: {
			name: { required: true },
			county_id: { required: true }
		},
		messages: {
			name: { required: 'Please enter a town name' },
			county_id: { required: 'Please choose a county' }
		}
    });
});
</script>
@endsection

Spamworldpro Mini