Start of ordering
This commit is contained in:
@@ -23,7 +23,15 @@
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<!-- Your Page Content Here -->
|
||||
@yield('main-content')
|
||||
<div class="main">
|
||||
<div class="container">
|
||||
@yield('breadcrumb')
|
||||
|
||||
<div class="row margin-bottom-40">
|
||||
@yield('main-content')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section><!-- /.content -->
|
||||
</div><!-- /.content-wrapper -->
|
||||
|
||||
@@ -33,19 +41,21 @@
|
||||
|
||||
</div><!-- ./wrapper -->
|
||||
|
||||
{{-- BEGIN CORE PLUGINS (REQUIRED FOR ALL PAGES) --}}
|
||||
@js('/site/js/jquery/1.11.2/js/jquery.min.js','jquery')
|
||||
@js('/site/js/bootstrap/3.3.5/js/bootstrap.min.js','bootstrap-js','jquery')
|
||||
@js('/site/js/jquery/plugins/migrate/1.2.1/js/jquery-migrate.min.js','jq-migrate','jquery')
|
||||
@js('/site/js/jquery/plugins/back-to-top/back-to-top.js','back-to-top','jquery')
|
||||
{{-- END CORE PLUGINS --}}
|
||||
@section('scripts')
|
||||
{{-- BEGIN CORE PLUGINS (REQUIRED FOR ALL PAGES) --}}
|
||||
@js('/site/js/jquery/1.11.2/js/jquery.min.js','jquery')
|
||||
@js('/site/js/bootstrap/3.3.5/js/bootstrap.min.js','bootstrap-js','jquery')
|
||||
@js('/site/js/jquery/plugins/migrate/1.2.1/js/jquery-migrate.min.js','jq-migrate','jquery')
|
||||
@js('/site/js/jquery/plugins/back-to-top/back-to-top.js','back-to-top','jquery')
|
||||
{{-- END CORE PLUGINS --}}
|
||||
|
||||
{{-- Scripts --}}
|
||||
{!! Asset::scripts() !!}
|
||||
@include('layouts.partials.scripts')
|
||||
|
||||
@section('scripts')
|
||||
@include('layouts.partials.scripts')
|
||||
@show
|
||||
{{-- Scripts --}}
|
||||
{!! Asset::scripts() !!}
|
||||
|
||||
@yield('page-scripts')
|
||||
@show
|
||||
|
||||
</body>
|
||||
<!-- BODY End-->
|
||||
|
246
resources/theme/frontend/metronic/order.blade.php
Normal file
246
resources/theme/frontend/metronic/order.blade.php
Normal file
@@ -0,0 +1,246 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
{{ trans('message.home') }}
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
<div class="col-md-12">
|
||||
<h1>Order Service</h1>
|
||||
|
||||
<div class="order-page" id="order-page">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<ul class="tabbable faq-tabbable">
|
||||
<li class="active">
|
||||
<a href="#order_1" data-toggle="tab" aria-expanded="true">Order Service</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="tab-content" style="padding:0; background: #fff;">
|
||||
<div class="tab-pane active" id="order_1">
|
||||
<div class="panel-group" id="accordion1">
|
||||
<form role="form" method="POST" enctype="multipart/form-data">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div id="accordion">
|
||||
<!-- User -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">Register or Sign In</h4>
|
||||
</div>
|
||||
|
||||
<div class="panel-collapse">
|
||||
<div class="panel-body">
|
||||
<div class="col-md-12">
|
||||
@if (Auth::user())
|
||||
{{ Auth::user()->name }}
|
||||
@else
|
||||
<a href="{{ url('login') }}">Login</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2"><button class="btn btn-block btn-primary next">Next</button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Reseller Choose Client -->
|
||||
@if ($user->isReseller())
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
Client
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="panel-collapse">
|
||||
<div class="panel-body">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a href="#tab_1" data-toggle="tab">New Client</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#tab_2" data-toggle="tab">Existing Client</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane row fade in active" id="tab_1">
|
||||
<div class="control-group form-group col-sm-12 {{ $errors->has('order_email') ? 'has-error' : '' }}">
|
||||
<label for="order_email">New Client Email</label>
|
||||
<input type="email" class="form-control" id="order_email" name="order_email" placeholder="New Client Email" value="{{ old('order_email') }}">
|
||||
<span class="help-block">{{ $errors->first('order_email') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane row fade" id="tab_2">
|
||||
<div class="control-group form-group col-sm-12 {{ $errors->has('order_email') ? 'has-error' : '' }}">
|
||||
<label for="order_email">Client Account</label>
|
||||
<select class="form-control" id="order_email" name="order_email" value="{{ old('order_email') }}">
|
||||
<option value=""> </option>
|
||||
@foreach ($user->all_clients()->sortBy('sur_first_name') as $o)
|
||||
<option value="{{ $o->email }}">{{ $o->sur_first_name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span class="help-block">{{ $errors->first('order_email') }}</span>
|
||||
</div>
|
||||
|
||||
<!-- Account -->
|
||||
@if (FALSE AND Auth::user()->isBusiness())
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a href="#accordion1_2" data-parent="#accordion1" class="accordion-toggle">
|
||||
Account
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="panel-collapse collapse" id="accordion1_2">
|
||||
<div class="panel-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2"><button class="btn btn-block btn-primary">Previous</button></div>
|
||||
<div class="col-sm-2"><button class="btn btn-block btn-primary next">Next</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Product -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">Product</h4>
|
||||
</div>
|
||||
|
||||
<div class="panel-collapse margin-bottom-20">
|
||||
<div class="panel-body">
|
||||
<div class="col-md-12">
|
||||
<div class="control-group form-group col-sm-6 {{ $errors->has('product_id') ? 'has-error' : '' }}">
|
||||
<label for="order_email">Product</label>
|
||||
<select class="form-control" id="product_id" name="product_id" value="{{ old('product_id') }}">
|
||||
<option value=""> </option>
|
||||
@foreach (\App\Models\Product::active()->get()->sortBy('name') as $o)
|
||||
<option value="{{ $o->id }}">{{ $o->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span class="help-block">{{ $errors->first('product_id') }}</span>
|
||||
</div>
|
||||
<div class="col-sm-6" id="product_info"></div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" id="product_order"></div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2"><button class="btn btn-block btn-primary">Previous</button></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2"><input type="submit" class="btn btn-block btn-primary" value="Submit Order"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tab-2">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
@js('/js/jqBootstrapValidation.js','jq-validation','jquery')
|
||||
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
|
||||
<script>
|
||||
$(function () { $("input,select,textarea").not("[type=submit]").jqBootstrapValidation(); } );
|
||||
|
||||
$(document).ready(function () {
|
||||
$('#accordion').accordion({
|
||||
header: "> div > div",
|
||||
collapsible: false,
|
||||
heightStyle: 'content',
|
||||
disabled: true
|
||||
});
|
||||
|
||||
$('#accordion button').click(function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
var delta = ($(this).is('.next') ? 2 : -2);
|
||||
$('#accordion').accordion('option', 'active', ($('#accordion').accordion('option', 'active') + delta));
|
||||
});
|
||||
|
||||
$("select[name=product_id]").change(function() {
|
||||
// If we select a blank, then dont continue
|
||||
if (this.value == 0)
|
||||
return false;
|
||||
|
||||
// Send the request and update sub category dropdown
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
//data: "key="+$(this).val(),
|
||||
dataType: "html",
|
||||
cache: true,
|
||||
url: '{{ url('product_info') }}'+'/'+$(this).val(),
|
||||
timeout: 3000,
|
||||
error: function(x) {
|
||||
alert("Failed to submit");
|
||||
},
|
||||
success: function(data) {
|
||||
$("div[id=product_info]").empty().append(data);
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
//data: "key="+$(this).val(),
|
||||
dataType: "html",
|
||||
cache: true,
|
||||
url: '{{ url('product_order') }}'+'/'+$(this).val(),
|
||||
timeout: 3000,
|
||||
error: function(x) {
|
||||
alert("Failed to submit");
|
||||
},
|
||||
success: function(data) {
|
||||
$("div[id=product_order]").empty().append(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
span.help-block > ul {
|
||||
color: #9d0000;
|
||||
padding-left: 5px;
|
||||
list-style-type: none;
|
||||
}
|
||||
</style>
|
||||
@append
|
@@ -0,0 +1,9 @@
|
||||
<fieldset class="form-group col-sm-12">
|
||||
<label>ADSL</label>
|
||||
|
||||
<div class="form-group col-sm-12 {{ $errors->has('product_options.address') ? 'has-error' : '' }}">
|
||||
<label for="product_options.address">Site Address</label>
|
||||
<input type="text" class="form-control" id="product_options.address" name="product_options[address]" placeholder="Site Address" value="{{ old('product_options.address') }}">
|
||||
<span class="help-block">{{ $errors->first('product_options.address') }} {{ $errors->first('product_options.address') }}</span>
|
||||
</div>
|
||||
</fieldset>
|
@@ -0,0 +1,21 @@
|
||||
<fieldset class="form-group">
|
||||
<label class="col-md-12">VOIP</label>
|
||||
|
||||
<div class="form-group col-sm-6 {{ $errors->has('product_options.phonenumber') ? 'has-error' : '' }}">
|
||||
<label for="product_options.phonenumber">Phone Number</label>
|
||||
<input type="text" class="form-control" id="product_options.phonenumber" name="product_options[phonenumber]" placeholder="Phone Number with Area Code" value="{{ old('product_options.phonenumber') }}">
|
||||
<span class="help-block">{{ $errors->first('product_options.phonenumber') }} {{ $errors->first('product_options.phonenumber') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 {{ $errors->has('product_options.supplier') ? 'has-error' : '' }}">
|
||||
<label for="product_order.supplier">Existing Supplier</label>
|
||||
<input type="text" class="form-control" id="product_options.supplier" name="product_options[supplier]" placeholder="eg: Telstra" value="{{ old('product_options.supplier') }}">
|
||||
<span class="help-block">{{ $errors->first('product_options.supplier') }} {{ $errors->first('product_options.supplier') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 {{ $errors->has('product_options.supplieraccnum') ? 'has-error' : '' }}">
|
||||
<label for="product_options.supplieraccnum">Suppliers Account Number</label>
|
||||
<input type="text" class="form-control" id="product_options.supplieraccnum" name="product_options[supplieraccnum]" placeholder="Refer to Bill" value="{{ old('product_options.supplieraccnum') }}">
|
||||
<span class="help-block">{{ $errors->first('product_options.supplieraccnum') }} {{ $errors->first('product_options.supplieraccnum') }}</span>
|
||||
</div>
|
||||
</fieldset>
|
@@ -0,0 +1,30 @@
|
||||
<div class="col-md-12">
|
||||
<p>{{ $o->description }}</p>
|
||||
</div>
|
||||
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<td class="text-right">ADSL</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Setup Cost</th>
|
||||
<td class="text-right">TBA</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Monthly Cost</th>
|
||||
<td class="text-right">TBA</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Default Billing</th>
|
||||
<td class="text-right">TBA</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Contract Term</th>
|
||||
<td class="text-right">TBA</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Minimum Costs</th>
|
||||
<td class="text-right">TBA</td>
|
||||
</tr>
|
||||
</table>
|
@@ -0,0 +1,30 @@
|
||||
<div class="col-md-12">
|
||||
<p>{{ $o->description }}</p>
|
||||
</div>
|
||||
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<td class="text-right">VOIP</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Setup Cost</th>
|
||||
<td class="text-right">TBA</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Monthly Cost</th>
|
||||
<td class="text-right">TBA</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Default Billing</th>
|
||||
<td class="text-right">TBA</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Contract Term</th>
|
||||
<td class="text-right">TBA</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Minimum Costs</th>
|
||||
<td class="text-right">TBA</td>
|
||||
</tr>
|
||||
</table>
|
@@ -0,0 +1,13 @@
|
||||
@if(View::exists('widgets.product.'.$o->category))
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
{{-- Return Category Requirements --}}
|
||||
@include('widgets.product.'.$o->category)
|
||||
|
||||
{{-- Return Supplier Requirements --}}
|
||||
{{-- Return Product Requirements --}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
@@ -0,0 +1,18 @@
|
||||
@if(View::exists('widgets.order.'.$o->category))
|
||||
<div class="col-md-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Order Configuration</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
{{-- Return Category Requirements --}}
|
||||
@include('widgets.order.'.$o->category)
|
||||
|
||||
{{-- Return Supplier Requirements --}}
|
||||
{{-- Return Product Requirements --}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
Reference in New Issue
Block a user