mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-23 12:44:12 -08:00
Merge pull request #23 from Godmartinz/Modal_fix_p3
replace duplicate code with partials
This commit is contained in:
commit
96953aa2ed
|
@ -8,20 +8,13 @@
|
|||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="{{ route('api.manufacturers.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>
|
||||
@include('partials.forms.edit.name', ['item' => new \App\Models\Manufacturer(), 'translated_name' => trans('admin/manufacturers/table.name')])
|
||||
</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 class="dynamic-form-row">
|
||||
@include('modals.partials.footer')
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!-- partials/modals/partials/fieldset-select.blade.php -->
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-fieldset_id">{{ trans('admin/models/general.fieldset') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12">{{ Form::select('fieldset_id', Helper::customFieldsetList(),old('fieldset_id'), array('class'=>'select2', 'id'=>'modal-fieldset_id', 'style'=>'width:350px')) }}</div>
|
||||
<div class="col-md-8 col-xs-12">{{ Form::select('fieldset_id', Helper::customFieldsetList(),old('fieldset_id'), array('class'=>'select2', 'id'=>'modal-fieldset_id', 'style'=>'width:100%;')) }}</div>
|
||||
</div>
|
||||
<!-- partials/modals/partials/fieldset-select.blade.php -->
|
|
@ -1,7 +1,6 @@
|
|||
<!-- partials/modals/partials/model-number.blade.php -->
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-manufacturer_id">{{ trans('general.manufacturer') }}:
|
||||
</label></div>
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-manufacturer_id">{{ trans('general.manufacturer') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12">
|
||||
<select class="js-data-ajax" data-endpoint="manufacturers" name="manufacturer_id" style="width: 100%" id="modal-manufacturer_id"></select>
|
||||
</div>
|
||||
|
|
|
@ -10,21 +10,18 @@
|
|||
<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>
|
||||
@include('partials.forms.edit.name', ['item' => new \App\Models\Statuslabel(),'translated_name' => trans('admin/statuslabels/table.name') ])
|
||||
</div>
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-type">{{ trans('admin/statuslabels/table.status_type') }}:
|
||||
<div class="col-md-3 col-xs-12"><label for="modal-type">{{ trans('admin/statuslabels/table.status_type') }}:
|
||||
</label></div>
|
||||
<div class="col-md-8 col-xs-12 required">{{ Form::select('type', $statuslabel_types, '', array('class'=>'select2', 'style'=>'width:90%','id' =>'modal-type')) }}</div>
|
||||
<div class="col-md-8 col-xs-12 required">{{ Form::select('type', $statuslabel_types, '', array('class'=>'select2', 'style'=>'width:100%','id' =>'modal-type')) }}</div>
|
||||
</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 class="dynamic-form-row">
|
||||
@include('modals.partials.footer')
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
|
|
|
@ -10,15 +10,12 @@
|
|||
<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>
|
||||
@include('partials.forms.edit.name', [ 'item' => new \App\Models\Supplier(), 'translated_name' => trans('admin/suppliers/table.name')])
|
||||
</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 class="dynamic-form-row">
|
||||
@include('modals.partials.footer')
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<!-- Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<label for="name" class="col-md-3 control-label">{{ $translated_name }}</label>
|
||||
<div class="col-md-7 col-sm-12{{ (Helper::checkIfRequired($item, 'name')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="name" aria-label="name" id="name" value="{{ old('name', $item->name) }}"{!! (Helper::checkIfRequired($item, 'name')) ? ' required' : '' !!} />
|
||||
<div class="col-md-8 col-sm-12{{ (Helper::checkIfRequired($item, 'name')) ? ' required' : '' }}">
|
||||
<input class="form-control" style="width:100%;" type="text" name="name" aria-label="name" id="name" value="{{ old('name', $item->name) }}"{!! (Helper::checkIfRequired($item, 'name')) ? ' required' : '' !!} />
|
||||
{!! $errors->first('name', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue