more partials and includes

This commit is contained in:
Godfrey M 2024-09-09 16:34:04 -07:00
parent 7a1c721eca
commit 367f02af86
6 changed files with 22 additions and 39 deletions

View file

@ -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 -->

View file

@ -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 -->

View file

@ -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')

View file

@ -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 -->

View file

@ -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 -->

View file

@ -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 -->