Skip to content

A free open source IT asset/license management system

more partials and includes

Godfrey M367f02af8642
diff --git a/resources/views/modals/category.blade.php b/resources/views/modals/category.blade.php
index c07b092ace..4dfe26d026 100644
--- a/resources/views/modals/category.blade.php
+++ b/resources/views/modals/category.blade.php
@@ -11,19 +11,10 @@
{{ csrf_field() }}
<div class="alert alert-danger" id="modal_error_msg" style="display:none">
</div>
- <div class="dynamic-form-row">
- <div class="col-md-4 col-xs-12"><label for="modal-name">{{ trans('general.name') }}:
- </label></div>
- <div class="col-md-8 col-xs-12 required">
- <input type='text' name='name' id='modal-name' class="form-control">
- </div>
- </div>
+ @include('modals.partials.name')
<input type="hidden" name='category_type' id="modal-category_type" value="{{ request('category_type') }}" />
</form>
</div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
- <button type="button" class="btn btn-primary" id="modal-save">{{ trans('general.save') }}</button>
- </div>
+ @include('modals.partials.footer')
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
diff --git a/resources/views/modals/location.blade.php b/resources/views/modals/location.blade.php
index d705f5500e..9817e1ddd7 100644
--- a/resources/views/modals/location.blade.php
+++ b/resources/views/modals/location.blade.php
@@ -9,11 +9,7 @@
<form action="{{ route('api.locations.store') }}" onsubmit="return false">
<div class="alert alert-danger" id="modal_error_msg" style="display:none">
</div>
- <div class="dynamic-form-row">
- <div class="col-md-4 col-xs-12"><label for="modal-name">{{ trans('general.name') }}:
- </label></div>
- <div class="col-md-8 col-xs-12 required"><input type='text' name="name" id='modal-name' class="form-control"></div>
- </div>
+ @include('modals.partials.name')
<div class="dynamic-form-row">
<div class="col-md-4 col-xs-12"><label for="modal-city">{{ trans('general.city') }}:</label></div>
@@ -26,10 +22,6 @@
</div>
</form>
</div>
-
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
- <button type="button" class="btn btn-primary" id="modal-save">{{ trans('general.save') }}</button>
- </div>
+ @include('modals.partials.footer')
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
diff --git a/resources/views/modals/model.blade.php b/resources/views/modals/model.blade.php
index 92823c8b99..3b6bd47e5f 100644
--- a/resources/views/modals/model.blade.php
+++ b/resources/views/modals/model.blade.php
@@ -9,20 +9,8 @@
<form action="{{ route('api.models.store') }}" onsubmit="return false">
<div class="alert alert-danger" id="modal_error_msg" style="display:none">
</div>
- <div class="dynamic-form-row">
- <div class="col-md-4 col-xs-12"><label for="modal-name">{{ trans('general.name') }}:
- </label></div>
- <div class="col-md-8 col-xs-12 required"><input type='text' name="name" id='modal-name' class="form-control"></div>
- </div>
-
- <div class="dynamic-form-row">
- <div class="col-md-4 col-xs-12"><label for="modal-category_id">{{ trans('general.category') }}:</label></div>
- <div class="col-md-8 col-xs-12 required">
- <select class="js-data-ajax" data-endpoint="categories/asset" name="category_id" style="width: 100%" id="modal-category_id"></select>
- </div>
- </div>
-
-
+ @include('modals.partials.name')
+ @include('modals.partials.categories-select')
@include('modals.partials.manufacturer-select')
@include('modals.partials.model-number')
@include('modals.partials.fieldset-select')
diff --git a/resources/views/modals/partials/categories-select.blade.php b/resources/views/modals/partials/categories-select.blade.php
new file mode 100644
index 0000000000..9cbc721748
--- /dev/null
+++ b/resources/views/modals/partials/categories-select.blade.php
@@ -0,0 +1,8 @@
+<!-- modals/partials/categories-select.blade.php -->
+<div class="dynamic-form-row">
+ <div class="col-md-4 col-xs-12"><label for="modal-category_id">{{ trans('general.category') }}:</label></div>
+ <div class="col-md-8 col-xs-12 required">
+ <select class="js-data-ajax" data-endpoint="categories/asset" name="category_id" style="width: 100%" id="modal-category_id"></select>
+ </div>
+</div>
+<!-- modals/partials/categories-select.blade.php -->
\ No newline at end of file
diff --git a/resources/views/modals/partials/name.blade.php b/resources/views/modals/partials/name.blade.php
new file mode 100644
index 0000000000..92bd7a62b7
--- /dev/null
+++ b/resources/views/modals/partials/name.blade.php
@@ -0,0 +1,7 @@
+<!-- modals/partials/name.blade.php -->
+<div class="dynamic-form-row">
+ <div class="col-md-4 col-xs-12"><label for="modal-name">{{ trans('general.name') }}:
+ </label></div>
+ <div class="col-md-8 col-xs-12 required"><input type='text' name="name" id='modal-name' class="form-control"></div>
+</div>
+<!-- modals/partials/name.blade.php -->
\ No newline at end of file
diff --git a/resources/views/modals/user.blade.php b/resources/views/modals/user.blade.php
index 01c6093331..321b6b03ab 100644
--- a/resources/views/modals/user.blade.php
+++ b/resources/views/modals/user.blade.php
@@ -95,10 +95,7 @@
</form>
</div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default pull-left" data-dismiss="modal">{{ trans('button.cancel') }}</button>
- <button type="button" class="btn btn-primary pull-right" id="modal-save">{{ trans('general.save') }}</button>
- </div>
+ @include('modals.partials.footer')
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->