Fixed license checkin form UI
This commit is contained in:
parent
afc8133acf
commit
e26d038589
2 changed files with 26 additions and 27 deletions
|
@ -357,12 +357,12 @@ class LicensesController extends Controller
|
||||||
public function getCheckin($seatId = null, $backTo = null)
|
public function getCheckin($seatId = null, $backTo = null)
|
||||||
{
|
{
|
||||||
// Check if the asset exists
|
// Check if the asset exists
|
||||||
if (is_null($licenseseat = LicenseSeat::find($seatId))) {
|
if (is_null($licenseSeat = LicenseSeat::find($seatId))) {
|
||||||
// Redirect to the asset management page with error
|
// Redirect to the asset management page with error
|
||||||
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.not_found'));
|
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.not_found'));
|
||||||
}
|
}
|
||||||
$this->authorize('checkin', $licenseseat);
|
$this->authorize('checkin', $licenseSeat);
|
||||||
return view('licenses/checkin', compact('licenseseat'))->with('backto', $backTo);
|
return view('licenses/checkin', compact('licenseSeat'))->with('backto', $backTo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,28 +6,31 @@
|
||||||
@parent
|
@parent
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
|
|
||||||
@section('header_right')
|
@section('header_right')
|
||||||
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">{{ trans('general.back') }}</a>
|
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
|
||||||
|
{{ trans('general.back') }}</a>
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
{{-- Page content --}}
|
{{-- Page content --}}
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="row form-wrapper">
|
<div class="row">
|
||||||
<!-- left column -->
|
<!-- left column -->
|
||||||
<div class="col-md-10 column">
|
<div class="col-md-7">
|
||||||
|
<form class="form-horizontal" method="post" action="{{ route('licenses.checkin.save', $licenseSeat) }}" autocomplete="off">
|
||||||
@if ($backto=='user')
|
|
||||||
<form class="form-horizontal" method="post" action="{{ route('licenses.checkin', array('licenseeat_id'=> $licenseseat->id, 'backto'=>'user')) }}" autocomplete="off">
|
|
||||||
@else
|
|
||||||
<form class="form-horizontal" method="post" action="{{ route('licenses.checkin', $licenseseat->id) }}" autocomplete="off">
|
|
||||||
@endif
|
|
||||||
{{csrf_field()}}
|
{{csrf_field()}}
|
||||||
|
|
||||||
<!-- Asset name -->
|
<div class="box box-default">
|
||||||
|
<div class="box-header with-border">
|
||||||
|
<h3 class="box-title"> {{ $licenseSeat->license->name }}</h3>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
|
||||||
|
<!-- license name -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-2 control-label">{{ trans('admin/hardware/form.name') }}</label>
|
<label class="col-sm-2 control-label">{{ trans('admin/hardware/form.name') }}</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<p class="form-control-static">{{ $licenseseat->license->name }}</p>
|
<p class="form-control-static">{{ $licenseSeat->license->name }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -35,7 +38,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-2 control-label">{{ trans('admin/hardware/form.serial') }}</label>
|
<label class="col-sm-2 control-label">{{ trans('admin/hardware/form.serial') }}</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<p class="form-control-static">{{ $licenseseat->license->serial }}</p>
|
<p class="form-control-static">{{ $licenseSeat->license->serial }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -43,20 +46,16 @@
|
||||||
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
||||||
<label for="note" class="col-md-2 control-label">{{ trans('admin/hardware/form.notes') }}</label>
|
<label for="note" class="col-md-2 control-label">{{ trans('admin/hardware/form.notes') }}</label>
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<textarea class="col-md-6 form-control" id="note" name="note">{{ Input::old('note', $licenseseat->note) }}</textarea>
|
<textarea class="col-md-6 form-control" id="note" name="note">{{ Input::old('note', $licenseSeat->note) }}</textarea>
|
||||||
{!! $errors->first('note', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
{!! $errors->first('note', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Form actions -->
|
<div class="box-footer">
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-md-2 control-label"></label>
|
|
||||||
<div class="col-md-7">
|
|
||||||
<a class="btn btn-link" href="{{ route('licenses.index') }}">{{ trans('button.cancel') }}</a>
|
<a class="btn btn-link" href="{{ route('licenses.index') }}">{{ trans('button.cancel') }}</a>
|
||||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.checkin') }}</button>
|
<button type="submit" class="btn btn-success pull-right"><i class="fa fa-check icon-white"></i> {{ trans('general.checkin') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> <!-- /.box-->
|
||||||
</form>
|
</div> <!-- /.col-->
|
||||||
</div> <!-- .col-md-10-->
|
</div> <!-- /.row-->
|
||||||
</div>
|
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
|
Loading…
Add table
Reference in a new issue