Skip to content

A free open source IT asset/license management system

fixed partial up

Godfrey M4d6f4303f5ad
diff --git a/resources/views/hardware/checkin.blade.php b/resources/views/hardware/checkin.blade.php
index 7651f22e2b..a4556f70c2 100755
--- a/resources/views/hardware/checkin.blade.php
+++ b/resources/views/hardware/checkin.blade.php
@@ -101,16 +101,7 @@
{!! $errors->first('note', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
- <div class="box-footer">
- <a class="btn btn-link" href="{{ URL::previous() }}"> {{ trans('button.cancel') }}</a>
- <button type="submit" class="btn btn-primary pull-right"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.checkin') }}</button>
- <div class="btn-group pull-right">
- <select class="redirect-options form-control" name="redirect_option">
- <option {{Session::get('redirect_option')=="0" ? 'selected' : ''}} value="0">{{trans('admin/hardware/form.redirect_to_all', ['type' => $table_name])}}</option>
- <option {{Session::get('redirect_option')=="1" ? 'selected' : ''}} value="1">{{trans('admin/hardware/form.redirect_to_type', ['type' => $asset->model->name])}}</option>
- </select>
- </div>
- </div>
+ @include ('partials.forms.redirect_submit_options', ['route' => 'hardware.index', 'table_name' => $table_name, 'type'=> $asset->model->name, 'hidden' => true])
</form>
</div> <!--/.col-md-12-->
</div> <!--/.box-body-->
diff --git a/resources/views/hardware/checkout.blade.php b/resources/views/hardware/checkout.blade.php
index a67c19b473..db0dbb03be 100755
--- a/resources/views/hardware/checkout.blade.php
+++ b/resources/views/hardware/checkout.blade.php
@@ -141,17 +141,7 @@
@endif
</div> <!--/.box-body-->
- <div class="box-footer">
- <a class="btn btn-link" href="{{ URL::previous() }}"> {{ trans('button.cancel') }}</a>
- <button type="submit" class="btn btn-primary pull-right"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.checkout') }}</button>
- <div class="btn-group pull-right">
- <select class="redirect-options form-control" name="redirect_option">
- <option {{Session::get('redirect_option')=="0" ? 'selected' : ''}} value="0">{{trans('admin/hardware/form.redirect_to_all', ['type' => $table_name])}}</option>
- <option {{Session::get('redirect_option')=="1" ? 'selected' : ''}} value="1">{{trans('admin/hardware/form.redirect_to_type', ['type' => $asset->model->name])}}</option>
- <option {{Session::get('redirect_option')=="2" ? 'selected' : ''}} value="2">{{trans('admin/hardware/form.redirect_to_checked_out_to')}}</option>
- </select>
- </div>
- </div>
+ @include ('partials.forms.redirect_submit_options', ['route' => 'hardware.index', 'table_name' => $table_name, 'type'=> $asset->model->name, 'hidden' => false])
</form>
</div>
</div> <!--/.col-md-7-->
diff --git a/resources/views/partials/forms/redirect_submit_options.blade.php b/resources/views/partials/forms/redirect_submit_options.blade.php
index 0b98933254..f817c54849 100644
--- a/resources/views/partials/forms/redirect_submit_options.blade.php
+++ b/resources/views/partials/forms/redirect_submit_options.blade.php
@@ -1,12 +1,11 @@
<div class="box-footer">
- <a class="btn btn-link" href="{{ route('licenses.index') }}">{{ trans('button.cancel') }}</a>
+ <a class="btn btn-link" href="{{ route($route) }}">{{ trans('button.cancel') }}</a>
<button type="submit" class="btn btn-primary pull-right"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.checkout') }}</button>
- <div class="btn-group pull-right">
+ <div class="btn-group pull-right" style="margin-right:5px;">
<select class="redirect-options form-control" name="redirect_option">
<option {{Session::get('redirect_option')=="0" ? 'selected' : ''}} value="0">{{trans('admin/hardware/form.redirect_to_all', ['type' => $table_name])}}</option>
<option {{Session::get('redirect_option')=="1" ? 'selected' : ''}} value="1">{{trans('admin/hardware/form.redirect_to_type', ['type' => $type])}}</option>
- <option {{Session::get('redirect_option')=="2" ? 'selected' : ''}} value="2">{{trans('admin/hardware/form.redirect_to_checked_out_to')}}</option>
- <option value="11">{{Session::get('redirect_option')}}</option>
+ <option {{Session::get('redirect_option')=="2" ? 'selected' : ''}} value="2" {{$hidden ? 'hidden' : ''}}>{{trans('admin/hardware/form.redirect_to_checked_out_to')}}</option>
</select>
</div>
</div>