-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added additional model fields to model modal screen #15941
Draft
Godmartinz
wants to merge
6
commits into
snipe:develop
Choose a base branch
from
Godmartinz:sync-model-modal-with-models
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
977f9b0
other fields appear in modal of model
Godmartinz 5c34fb1
modal partials made and inputs align
Godmartinz a3e6bd2
adds eol months and a hidden field for who created the model
Godmartinz 4c5d48b
revert some styling
Godmartinz 030674d
more styling changes
Godmartinz 282ff1d
remove created_by fillability
Godmartinz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- partials/modals/partials/depreciation.blade.php --> | ||
<div class="dynamic-form-row"> | ||
<div class="col-md-4 col-xs-12"> | ||
<label for="modal-depreciation_id">{{ trans('general.depreciation') }}</label> | ||
</div> | ||
<div class="col-md-8 col-xs-12"> | ||
{{ Form::select('depreciation_id', $depreciation_list , old('depreciation_id', $item->depreciation_id), array('class'=>'select2', 'style'=>'width:100%;', 'aria-label'=>'depreciation_id')) }} | ||
{!! $errors->first('depreciation_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!} | ||
</div> | ||
</div> | ||
<!-- partials/modals/partials/depreciation.blade.php --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- partials/modals/partials/eol_months.blade.php --> | ||
<div class="dynamic-form-row"> | ||
<div class="col-md-4 col-xs-12"> | ||
<label for="eol">{{ trans('general.eol') }}</label> | ||
</div> | ||
<div class="col-md-5 col-xs-12"> | ||
<div class="input-group" style="width: 100%;"> | ||
<input | ||
class="form-control" | ||
type="text" | ||
name="eol" | ||
id="eol" | ||
value="{{ old('eol', isset($item->eol) ? $item->eol : '') }}" | ||
/> | ||
<span class="input-group-addon"> | ||
{{ trans('general.months') }} | ||
</span> | ||
</div> | ||
{!! $errors->first('eol', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times"></i> :message</span>') !!} | ||
</div> | ||
</div> | ||
<!-- partials/modals/partials/eol_months.blade.php --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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-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:100%;')) }}</div> | ||
</div> | ||
<!-- partials/modals/partials/fieldset-select.blade.php --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
resources/views/modals/partials/minimum_quantity.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!-- partials/modals/partials/minimum-quantity.blade.php --> | ||
<div class="dynamic-form-row"> | ||
<div class="col-md-4 col-xs-12"> | ||
<label for="modal-min_amt">{{ trans('general.min_amt') }}</label> | ||
</div> | ||
<div class="col-md-3 col-xs-12"> | ||
<div class="dynamic-input-group" style="display: flex; align-items: center;"> | ||
<input | ||
class="form-control" | ||
maxlength="5" | ||
type="text" | ||
name="min_amt" | ||
id="modal-min_amt" | ||
aria-label="min_amt" | ||
value="{{ old('min_amt', $item->min_amt) }}" | ||
style="flex: 1; margin-right: 10px;" | ||
{{ Helper::checkIfRequired($item, 'min_amt') ? 'required' : '' }} | ||
/> | ||
<a href="#" data-tooltip="true" title="{{ trans('general.min_amt_help') }}" class="info-icon"> | ||
<x-icon type="info-circle" /> | ||
<span class="sr-only">{{ trans('general.min_amt_help') }}</span> | ||
</a> | ||
</div> | ||
{!! $errors->first('min_amt', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!} | ||
</div> | ||
</div> | ||
<!-- partials/modals/partials/minimum-quantity.blade.php --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +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-modelno">{{ trans('general.model_no') }}:</label></div> | ||
<div class="col-md-4 col-xs-12"><label for="modal-modelno">{{ trans('general.model_no') }}</label></div> | ||
<div class="col-md-8 col-xs-12"><input type='text' name="model_number" id='modal-model_number' class="form-control"></div> | ||
</div> | ||
<!-- partials/modals/partials/model-number.blade.php --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- partials/modals/partials/notes.blade.php --> | ||
<div class="dynamic-form-row"> | ||
<div class="col-md-4 col-xs-12"> | ||
<label for="modal-notes">{{ trans('admin/hardware/form.notes') }}</label> | ||
</div> | ||
<div class="col-md-8 col-xs-12"> | ||
<textarea | ||
class="form-control" | ||
id="modal-notes" | ||
aria-label="notes" | ||
name="notes" | ||
style="width: 100%; min-height: 100px;" | ||
>{{ old('notes', $item->notes) }}</textarea> | ||
{!! $errors->first('notes', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!} | ||
</div> | ||
</div> | ||
<!-- partials/modals/partials/notes.blade.php --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- partials/modals/partials/requestable.blade.php --> | ||
<div class="dynamic-form-row" > | ||
<div class="col-md-offset-4 col-xs-12" style="margin-top:5px;"> | ||
<div style="display: flex; align-items: center;"> | ||
<input | ||
type="checkbox" | ||
value="1" | ||
name="requestable" | ||
id="requestable" | ||
{{ old('requestable', $item->requestable) == '1' ? 'checked="checked"' : '' }} | ||
style="margin-right: 10px;" | ||
> | ||
{{ $requestable_text }} | ||
</div> | ||
</div> | ||
</div> | ||
<!-- partials/modals/partials/requestable.blade.php --> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An improvement would be wrapping the input in a
label
so clicking the text checks/unchecks the box.Here's an example of what I mean from the regular "Create Asset Model" page: