@extends('layouts.master') @section('title', 'PetroERP- An ERP for Petrol Pumps') @section('content')
Pump Management

Update Pump

{!! Form::open(['action' => 'PumpsController@search', 'method' => 'GET', 'class' => 'form-horizontal']) !!} {!! Form::close() !!} {!! Form::open(['action' => ['PumpsController@update', $pump->id], 'method' => 'POST', 'class' => 'form-horizontal space-top', 'data-parsley-validate', 'enctype'=>'multipart/form-data']) !!}
Pump Owner Information
{{Form::label('name', 'Owner Name', ['class'=>'required col-md-2'])}}
{{Form::text('oName', $pump->oName, ['class'=>'form-control', 'placeholder'=>'Owner Name','required','data-parsley-pattern'=>"/^[a-zA-Z ]*$/", 'data-parsley-required data-pattern-message'=>"This value must be only alphabets."])}}
{{Form::label('image', 'Profile Photo', ['class'=>'col-md-2'])}}
@if($pump->userPhotoPath == "" || $pump->userPhotoPath == NULL) @else @endif {!! Form::file('image', array('class' => 'file-upload', 'accept'=>'image/*')) !!}
{{Form::label('oMobileNo1', 'Mobile No.1', ['class'=>'required col-md-2'])}}
{{Form::text('oMobileNo1',$pump->oMobileNo1, ['class'=>'form-control', 'placeholder'=>'Mobile No.', 'required', 'data-parsley-type'=>'number', 'data-parsley-length'=>'[10, 10]','data-parsley-pattern'=>'^[7-9][0-9]{9}$', 'data-parsley-required-message'=>'Mobile No. must start with 7, 8 or 9 and must be of atleast 10 digits', 'required'])}}
{{Form::label('oMobileNo2', 'Mobile No.2', ['class'=>'col-md-2'])}}
{{Form::text('oMobileNo2', $pump->oMobileNo2, ['class'=>'form-control', 'placeholder'=>'Mobile No.', 'data-parsley-type'=>'number', 'data-parsley-length'=>'[10, 10]','data-parsley-pattern'=>'^[7-9][0-9]{9}$', 'data-parsley-required-message'=>'Mobile No. must start with 7, 8 or 9 and must be of atleast 10 digits'])}}
{{Form::label('oEmail', 'Email Id', ['class'=>'required col-md-2'])}}
{{Form::email('oEmail', $pump->oEmail, ['class'=>'form-control', 'placeholder'=>'Owner Email Id', 'required'])}}

Pump Information
{{Form::label('name', 'Name', ['class'=>'required col-md-2'])}}
{{Form::text('name',$pump->name, ['class'=>'form-control', 'placeholder'=>'Pump Name', 'required'])}}
{{Form::label('company', 'Petroleum Company', ['class'=>'required col-md-2'])}}
{{Form::select('companyId', $companies, $pump->companyId, ['placeholder' => 'Pick a company...', 'required'])}}
{{Form::label('address', 'Address', ['class'=>'col-md-2'])}}
{{Form::text('address',$pump->address, ['class'=>'form-control', 'placeholder'=>'Pump Address'])}}
{{Form::label('countryId', 'Country', ['class'=>'required col-md-2'])}}
{{Form::select('countryId', $countries, $pump->countryId, ['placeholder' => 'Pick a country...', 'id'=>'countryId', 'required'])}}
{{Form::label('regionId', 'Region/State', ['class'=>'required col-md-2'])}}
{{Form::select('regionId', $regions, $pump->regionId, ['placeholder' => 'Pick a region...','id'=>'regionId', 'required'])}}
{{Form::label('cityId', 'City', ['class'=>'required col-md-2'])}}
{{Form::select('cityId', $cities, $pump->cityId,['placeholder' => 'Pick a city...', 'id'=>'cityId', 'required'])}}
{{Form::hidden('oldregionId', old('regionId'), ['id'=>'oldregionId'])}} {{Form::hidden('oldcityId', old('cityId'), ['id'=>'oldcityId'])}} {{Form::label('PINCode', 'PIN/Zip Code', ['class'=>'col-md-2'])}}
{{Form::text('PINCode',$pump->PINCode, ['class'=>'form-control', 'placeholder'=>'PINCode', 'data-parsley-type'=>'number', 'data-parsley-length'=>'[4, 8]'])}}

{{Form::hidden('_method', 'PUT')}} {{Form::submit('Update', ['class'=>'btn btn-primary'])}} {{Form::reset('Reset', ['class'=>'btn btn-primary'])}}
{!! Form::close() !!}
@endsection