Skip to content

A free open source IT asset/license management system

Added blade component to checkin/checkout pages

snipe5dea3f44956b
diff --git a/resources/views/accessories/checkin.blade.php b/resources/views/accessories/checkin.blade.php
index 7d1ef13262..cceb8b895b 100755
--- a/resources/views/accessories/checkin.blade.php
+++ b/resources/views/accessories/checkin.blade.php
@@ -71,11 +71,15 @@
</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>
+ <x-redirect_submit_options
+ index_route="accessories.index"
+ :button_label="trans('general.checkin')"
+ :options="[
+ 'index' => trans('admin/hardware/form.redirect_to_all', ['type' => trans('general.accessories')]),
+ 'item' => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.accessory')]),
+
+ ]"
+ />
</div> <!-- .box.box-default -->
diff --git a/resources/views/accessories/checkout.blade.php b/resources/views/accessories/checkout.blade.php
index 71035a87c1..6c96e1bfa3 100755
--- a/resources/views/accessories/checkout.blade.php
+++ b/resources/views/accessories/checkout.blade.php
@@ -114,10 +114,16 @@
</div>
</div>
</div>
- <div class="box-footer">
- <a class="btn btn-link" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
- <button type="submit" id="submit_button" class="btn btn-primary pull-right"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.checkout') }}</button>
- </div>
+ <x-redirect_submit_options
+ index_route="accessories.index"
+ :button_label="trans('general.checkout')"
+ :options="[
+ 'index' => trans('admin/hardware/form.redirect_to_all', ['type' => trans('general.accessories')]),
+ 'item' => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.accessory')]),
+ 'target' => trans('admin/hardware/form.redirect_to_checked_out_to'),
+
+ ]"
+ />
</div> <!-- .box.box-default -->
</form>
</div> <!-- .col-md-9-->
diff --git a/resources/views/components/checkin.blade.php b/resources/views/components/checkin.blade.php
index e195685d2a..d838744ffb 100644
--- a/resources/views/components/checkin.blade.php
+++ b/resources/views/components/checkin.blade.php
@@ -56,10 +56,14 @@
{!! $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="{{ route('components.index') }}">{{ 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>
+ <x-redirect_submit_options
+ index_route="components.index"
+ :button_label="trans('general.checkin')"
+ :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')]),
+ ]"
+ />
</div> <!-- /.box-->
</form>
</div> <!-- /.col-md-7-->
diff --git a/resources/views/components/checkout.blade.php b/resources/views/components/checkout.blade.php
index f6befa2736..39890a1938 100644
--- a/resources/views/components/checkout.blade.php
+++ b/resources/views/components/checkout.blade.php
@@ -54,10 +54,16 @@
</div> <!-- .BOX-BODY-->
- <div class="box-footer">
- <a class="btn btn-link" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
- <button type="submit" id="submit_button" class="btn btn-primary pull-right"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.checkout') }}</button>
- </div>
+ <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'),
+
+ ]"
+ />
</div> <!-- .box-default-->
</form>
</div> <!-- .col-md-9-->
diff --git a/resources/views/consumables/checkout.blade.php b/resources/views/consumables/checkout.blade.php
index 29b68b6ce7..bb3023290f 100644
--- a/resources/views/consumables/checkout.blade.php
+++ b/resources/views/consumables/checkout.blade.php
@@ -106,10 +106,14 @@
</div>
</div>
</div> <!-- .box-body -->
- <div class="box-footer">
- <a class="btn btn-link" href="{{ route('consumables.show', ['consumable'=> $consumable->id]) }}">{{ trans('button.cancel') }}</a>
- <button type="submit" id="submit_button" class="btn btn-primary pull-right"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.checkout') }}</button>
- </div>
+ <x-redirect_submit_options
+ index_route="consumables.index"
+ :button_label="trans('general.checkout')"
+ :options="[
+ 'index' => trans('admin/hardware/form.redirect_to_all', ['type' => trans('general.consumables')]),
+ 'item' => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.consumable')]),
+ 'target' => trans('admin/hardware/form.redirect_to_checked_out_to'),
+ ]"/>
</div>
</form>
diff --git a/resources/views/licenses/checkin.blade.php b/resources/views/licenses/checkin.blade.php
index 8eeea6f9c4..5ef9159549 100755
--- a/resources/views/licenses/checkin.blade.php
+++ b/resources/views/licenses/checkin.blade.php
@@ -56,10 +56,14 @@
{!! $errors->first('notes', '<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="{{ route('licenses.index') }}">{{ 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>
+ <x-redirect_submit_options
+ index_route="licenses.index"
+ :button_label="trans('general.checkin')"
+ :options="[
+ 'index' => trans('admin/hardware/form.redirect_to_all', ['type' => trans('general.licenses')]),
+ 'item' => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.license')]),
+ ]"
+ />
</div> <!-- /.box-->
</form>
</div> <!-- /.col-md-7-->
diff --git a/resources/views/licenses/checkout.blade.php b/resources/views/licenses/checkout.blade.php
index e85c677420..bfd4773099 100755
--- a/resources/views/licenses/checkout.blade.php
+++ b/resources/views/licenses/checkout.blade.php
@@ -105,10 +105,15 @@
</div>
@endif
- <div class="box-footer">
- <a class="btn btn-link" href="{{ route('licenses.index') }}">{{ 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>
+ <x-redirect_submit_options
+ index_route="licenses.index"
+ :button_label="trans('general.checkout')"
+ :options="[
+ 'index' => trans('admin/hardware/form.redirect_to_all', ['type' => trans('general.licenses')]),
+ 'item' => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.license')]),
+ 'target' => trans('admin/hardware/form.redirect_to_checked_out_to'),
+ ]"
+ />
</div> <!-- /.box-->
</form>
</div> <!-- /.col-md-7-->