Started work on SiteDetails and Setup

This commit is contained in:
Deon George
2018-07-31 14:11:00 +10:00
parent 0ce640c283
commit 1cde2a888a
24 changed files with 1373 additions and 177 deletions

View File

@@ -0,0 +1,87 @@
@extends('adminlte::layouts.app')
@section('htmlheader_title')
Setup
@endsection
@section('contentheader_title')
{{ $so->site_name }}
@endsection
@section('contentheader_description')
Setup
@endsection
@section('main-content')
<div class="col-md-9">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Setup Configuration</h3>
</div>
<form role="form" method="POST">
{{ csrf_field() }}
@if(session()->has('success'))
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="callout callout-success">
<p>{{ session()->get('success') }}</p>
</div>
</div>
</div>
@endif
@if($errors->any())
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="callout callout-danger">
<p>Some validation errors to look at.</p>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab-site" data-toggle="tab">Site Details</a></li>
<li><a href="#tab-other" data-toggle="tab">Other</a></li>
</ul>
<div class="box-body">
<div class="tab-content">
<div class="tab-pane active" id="tab-site">
@include('a.widgets.setup_site_details')
</div>
<div class="tab-pane" id="tab-other">
Other Details
</div>
</div>
</div>
<div class="box-footer">
<button type="submit" class="btn btn-info">Save</button>
</div>
</div>
</form>
</div>
</div>
@endsection
@section('page-scripts')
@js('/js/jqBootstrapValidation.js','jq-validation','jquery')
<script>
$(function () { $("input,select,textarea").not("[type=submit]").jqBootstrapValidation(); } );
</script>
<style>
span.help-block > ul {
color: #9d0000;
padding-left: 5px;
list-style-type: none;
}
</style>
@append

View File

@@ -0,0 +1,61 @@
<div class="form-group col-sm-12 {{ $errors->has('site_name') ? 'has-error' : '' }}">
<label for="site_name">Site Name</label>
<input type="text" class="form-control" id="site_name" name="site_name" placeholder="Site Name" value="{{ old('site_name',$so->site_name) }}">
<span class="help-block">{{ $errors->first('site_name') }}</span>
</div>
<div class="form-group col-sm-12 {{ $errors->has('site_description') ? 'has-error' : '' }}">
<label for="site_description">Site Description</label>
<textarea class="form-control" id="site_description" name="site_description" placeholder="Site Description" rows="3">{{ old('site_description',$so->site_description) }}</textarea>
<span class="help-block">{{ $errors->first('site_description') }}</span>
</div>
<fieldset class="form-group col-sm-12">
<label>Site Address</label>
<div class="form-group col-sm-12 {{ $errors->has('site_address1') ? 'has-error' : '' }}">
<label for="site_address">Site Address Lines</label>
<input type="text" class="form-control" id="site_address1" name="site_address1" placeholder="Address1" value="{{ old('site_address1',$so->site_address1) }}">
<input type="text" class="form-control" id="site_address2" name="site_address2" placeholder="Address2" value="{{ old('site_address2',$so->site_address2) }}">
<span class="help-block">{{ $errors->first('site_address1') }} {{ $errors->first('site_address2') }}</span>
</div>
<div class="form-group col-sm-6 {{ $errors->has('site_city') ? 'has-error' : '' }}">
<label for="site_address">Site City</label>
<input type="text" class="form-control" id="site_city" name="site_city" placeholder="City" value="{{ old('site_city',$so->site_city) }}">
<span class="help-block">{{ $errors->first('site_city') }}</span>
</div>
<div class="form-group col-sm-3 {{ $errors->has('site_state') ? 'has-error' : '' }}">
<label for="site_address">Site State</label>
<input type="text" class="form-control col-sm-3" id="site_state" name="site_state" placeholder="State" value="{{ old('site_state',$so->site_state) }}">
<span class="help-block">{{ $errors->first('site_state') }}</span>
</div>
<div class="form-group col-sm-3 {{ $errors->has('site_postcode') ? 'has-error' : '' }}">
<label for="site_address">Site Post Code</label>
<input type="text" class="form-control col-sm-3" id="site_postcode" name="site_postcode" placeholder="Post Code" value="{{ old('site_postcode',$so->site_postcode) }}">
<span class="help-block">{{ $errors->first('site_postcode') }}</span>
</div>
</fieldset>
<div class="form-group col-sm-6 {{ $errors->has('site_phone') ? 'has-error' : '' }}">
<label for="site_phone">Site Phone</label>
<input class="form-control" id="site_phone" name="site_phone" placeholder="Site Phone" value="{{ old('site_phone',$so->site_phone) }}">
<span class="help-block">{{ $errors->first('site_phone') }}</span>
</div>
<div class="form-group col-sm-6 {{ $errors->has('site_fax') ? 'has-error' : '' }}">
<label for="site_fax">Site Fax</label>
<input class="form-control" id="site_fax" name="site_fax" placeholder="Site Fax" value="{{ old('site_fax',$so->site_fax) }}">
<span class="help-block">{{ $errors->first('site_fax') }}</span>
</div>
<div class="control-group form-group col-sm-6 {{ $errors->has('site_email') ? 'has-error' : '' }}">
<label for="site_email">Site Email</label>
<input type="email" class="form-control" id="site_email" name="site_email" placeholder="Site Email" value="{{ old('site_email',$so->site_email) }}">
<span class="help-block">{{ $errors->first('site_email') }}</span>
</div>
<div class="control-group form-group col-sm-6 {{ $errors->has('site_tax') ? 'has-error' : '' }}">
<label for="site_tax">Site Tax Number</label>
<div class="input-group">
<span class="input-group-addon">ABN</span>
<input type="number" class="form-control" id="site_tax" name="site_tax" minlength="10" maxlength="10" placeholder="Site Tax" value="{{ old('site_tax',$so->site_tax) }}">
</div>
<span class="help-block">{{ $errors->first('site_tax') }}</span>
</div>