Checkin/checkout fixes
This commit is contained in:
parent
cff2a65f62
commit
05e9861b71
2 changed files with 218 additions and 252 deletions
|
@ -2,21 +2,21 @@
|
|||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/hardware/general.checkin') }}
|
||||
@parent
|
||||
{{ trans('admin/hardware/general.checkin') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<style>
|
||||
<style>
|
||||
|
||||
.input-group {
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
|
@ -55,25 +55,14 @@
|
|||
|
||||
|
||||
<!-- Asset Name -->
|
||||
<!-- Only allow an asset name to be changed if the checker-outer has permission to edit the asset -->
|
||||
@can('update', $asset)
|
||||
<div class="form-group {{ $errors->has('name') ? 'error' : '' }}">
|
||||
{{ Form::label('name', trans('admin/hardware/form.name'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="name" aria-label="name" id="name"
|
||||
value="{{ old('name', $asset->name) }}"/>
|
||||
{!! $errors->first('name', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
@if ($asset->name!='')
|
||||
<div class="form-group {{ $errors->has('name') ? 'error' : '' }}">
|
||||
{{ Form::label('name', trans('admin/hardware/form.name'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<p class="form-control-static">{{ $asset->name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endcan
|
||||
|
||||
<!-- Status -->
|
||||
<div class="form-group {{ $errors->has('status_id') ? 'error' : '' }}">
|
||||
|
@ -122,6 +111,6 @@
|
|||
|
||||
</div> <!--/.box.box-default-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
|
@ -3,20 +3,20 @@
|
|||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/hardware/general.checkout') }}
|
||||
@parent
|
||||
@parent
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<style>
|
||||
<style>
|
||||
|
||||
.input-group {
|
||||
.input-group {
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-7">
|
||||
<div class="box box-default">
|
||||
|
@ -51,29 +51,6 @@
|
|||
{!! $errors->first('name', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Asset Name -->
|
||||
<!-- Only allow an asset name to be changed if the checker-outer has permission to edit the asset -->
|
||||
@can('update', $asset)
|
||||
<div class="form-group {{ $errors->has('name') ? 'error' : '' }}">
|
||||
{{ Form::label('name', trans('admin/hardware/form.name'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Request::old('name', $asset->name) }}" tabindex="1">
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
@if ($asset->name!='')
|
||||
<div class="form-group {{ $errors->has('name') ? 'error' : '' }}">
|
||||
{{ Form::label('name', trans('admin/hardware/form.name'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<p class="form-control-static">{{ $asset->name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endcan
|
||||
|
||||
@include ('partials.forms.checkout-selector', ['user_select' => 'true','asset_select' => 'true', 'location_select' => 'true'])
|
||||
|
||||
@include ('partials.forms.edit.user-select', ['translated_name' => trans('general.user'), 'fieldname' => 'assigned_user', 'required'=>'true'])
|
||||
|
@ -165,19 +142,19 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
@include('partials/assets-assigned')
|
||||
|
||||
<script>
|
||||
// $('#checkout_at').datepicker({
|
||||
// clearBtn: true,
|
||||
// todayHighlight: true,
|
||||
// endDate: '0d',
|
||||
// format: 'yyyy-mm-dd'
|
||||
// });
|
||||
// $('#checkout_at').datepicker({
|
||||
// clearBtn: true,
|
||||
// todayHighlight: true,
|
||||
// endDate: '0d',
|
||||
// format: 'yyyy-mm-dd'
|
||||
// });
|
||||
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Reference in a new issue