|
| 1 | +@extends('layouts.layout') |
| 2 | + |
| 3 | +@section('content') |
| 4 | + <div class="page-header clearfix"> |
| 5 | + <h2>Create Order</h2> |
| 6 | + </div> |
| 7 | + |
| 8 | + <form role="form" action="" method="post"> |
| 9 | + <input type="hidden" name="_token" value="<?= csrf_token(); ?>"> |
| 10 | + |
| 11 | + <div class="form-group"> |
| 12 | + <label for="customer_id">Customer:</label> |
| 13 | + <select class="form-control" name="customer[id]" id="customer_id"> |
| 14 | + <option value=""></option> |
| 15 | + <?php foreach ($customers as $customer): ?> |
| 16 | + <option value="{{{ $customer->getId() }}}"<?= |
| 17 | + !is_null($order->getCustomer()) && |
| 18 | + $order->getCustomer()->getId() == $customer->getId() ? |
| 19 | + ' selected="selected"' : '' ?>> |
| 20 | + {{{ $customer->getName() }}} |
| 21 | + </option> |
| 22 | + <?php endforeach; ?> |
| 23 | + </select> |
| 24 | + @include('validation-errors', ['name' => 'customer.id', 'errors' => isset($error) ? $error : []]) |
| 25 | + </div> |
| 26 | + <div class="form-group"> |
| 27 | + <label for="orderNumber">Order Number:</label> |
| 28 | + <input type="text" class="form-control" name="orderNumber" |
| 29 | + id="order_number" placeholder="Enter Order Number" |
| 30 | + value="{{{ $order->getOrderNumber() }}}"> |
| 31 | + @include('validation-errors', ['name' => 'orderNumber', 'errors' => isset($error) ? $error : []]) |
| 32 | + </div> |
| 33 | + <div class="form-group"> |
| 34 | + <label for="description">Description:</label> |
| 35 | + <input type="text" class="form-control" name="description" |
| 36 | + id="description" placeholder="Enter Description" |
| 37 | + value="{{{ $order->getDescription() }}}"> |
| 38 | + @include('validation-errors', ['name' => 'description', 'errors' => isset($error) ? $error : []]) |
| 39 | + </div> |
| 40 | + <div class="form-group"> |
| 41 | + <label for="total">Total:</label> |
| 42 | + <input type="text" class="form-control" name="total" |
| 43 | + id="total" placeholder="Enter Total" |
| 44 | + value="{{{ $order->getTotal() }}}"> |
| 45 | + @include('validation-errors', ['name' => 'total', 'errors' => isset($error) ? $error : []]) |
| 46 | + </div> |
| 47 | + <button type="submit" class="btn btn-primary">Save</button> |
| 48 | + </form> |
| 49 | +@stop |
0 commit comments