2016-03-25 01:18:05 -07:00
|
|
|
@extends('layouts/default')
|
|
|
|
|
|
|
|
{{-- Page title --}}
|
|
|
|
@section('title')
|
2016-12-27 12:03:47 -08:00
|
|
|
{{ trans('admin/components/general.checkout') }}
|
2016-03-25 01:18:05 -07:00
|
|
|
@parent
|
|
|
|
@stop
|
|
|
|
|
|
|
|
{{-- Page content --}}
|
|
|
|
@section('content')
|
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
<div class="row">
|
2023-04-06 22:03:15 -07:00
|
|
|
<div class="col-md-8">
|
2024-01-10 11:35:32 -08:00
|
|
|
<form class="form-horizontal" id="checkout_form" method="post" action="" autocomplete="off">
|
2016-03-25 01:18:05 -07:00
|
|
|
<!-- CSRF Token -->
|
2016-12-27 12:03:47 -08:00
|
|
|
{{ csrf_field() }}
|
2016-03-25 01:18:05 -07:00
|
|
|
|
|
|
|
<div class="box box-default">
|
2016-12-27 12:03:47 -08:00
|
|
|
@if ($component->id)
|
|
|
|
<div class="box-header with-border">
|
|
|
|
<div class="box-heading">
|
2020-03-31 23:36:56 -07:00
|
|
|
<h2 class="box-title">{{ $component->name }} ({{ $component->numRemaining() }} {{ trans('admin/components/general.remaining') }})</h2>
|
2016-12-27 12:03:47 -08:00
|
|
|
</div>
|
|
|
|
</div><!-- /.box-header -->
|
|
|
|
@endif
|
2016-03-25 01:18:05 -07:00
|
|
|
|
|
|
|
<div class="box-body">
|
|
|
|
<!-- Asset -->
|
2017-10-26 03:43:28 -07:00
|
|
|
@include ('partials.forms.edit.asset-select', ['translated_name' => trans('general.select_asset'), 'fieldname' => 'asset_id'])
|
|
|
|
|
|
|
|
<div class="form-group {{ $errors->has('assigned_qty') ? ' has-error' : '' }}">
|
2023-04-06 22:03:15 -07:00
|
|
|
<label for="assigned_qty" class="col-md-3 control-label">
|
|
|
|
{{ trans('general.qty') }}
|
|
|
|
</label>
|
|
|
|
<div class="col-md-2 col-sm-5 col-xs-5">
|
|
|
|
<input class="form-control required col-md-12" type="text" name="assigned_qty" id="assigned_qty" value="{{ old('assigned_qty') ?? 1 }}" />
|
2017-10-26 03:43:28 -07:00
|
|
|
</div>
|
2023-04-06 22:03:15 -07:00
|
|
|
@if ($errors->first('assigned_qty'))
|
|
|
|
<div class="col-md-9 col-md-offset-3">
|
|
|
|
{!! $errors->first('assigned_qty', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
|
|
|
</div>
|
|
|
|
@endif
|
2016-12-27 12:03:47 -08:00
|
|
|
</div>
|
2016-03-25 01:18:05 -07:00
|
|
|
|
2023-04-06 22:03:15 -07:00
|
|
|
|
2022-08-10 15:03:12 -07:00
|
|
|
<!-- Note -->
|
2023-04-06 22:03:15 -07:00
|
|
|
<div class="form-group{{ $errors->has('note') ? ' error' : '' }}">
|
2022-08-10 15:03:12 -07:00
|
|
|
<label for="note" class="col-md-3 control-label">{{ trans('admin/hardware/form.notes') }}</label>
|
|
|
|
<div class="col-md-7">
|
|
|
|
<textarea class="col-md-6 form-control" id="note" name="note">{{ old('note', $component->note) }}</textarea>
|
|
|
|
{!! $errors->first('note', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
</div> <!-- .BOX-BODY-->
|
2024-07-26 04:47:33 -07:00
|
|
|
<x-redirect_submit_options
|
|
|
|
index_route="components.index"
|
|
|
|
:button_label="trans('general.checkout')"
|
|
|
|
:options="[
|
|
|
|
'index' => trans('admin/hardware/form.redirect_to_all', ['type' => trans('general.components')]),
|
|
|
|
'item' => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.component')]),
|
|
|
|
'target' => trans('admin/hardware/form.redirect_to_checked_out_to'),
|
|
|
|
|
|
|
|
]"
|
|
|
|
/>
|
2016-12-27 12:03:47 -08:00
|
|
|
</div> <!-- .box-default-->
|
|
|
|
</form>
|
|
|
|
</div> <!-- .col-md-9-->
|
|
|
|
</div> <!-- .row -->
|
2016-03-25 01:18:05 -07:00
|
|
|
|
|
|
|
@stop
|