-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Converted Form::select and Form::textarea to blade components #15983
Closed
marcusmoore
wants to merge
29
commits into
snipe:develop
from
marcusmoore:chore/migrate-blade-helpers
Closed
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
2d9a5b9
Add textarea component
marcusmoore 6ba467b
Replace branding and eula textareas with new component
marcusmoore 8020527
Convert a couple more templates
marcusmoore c35f70b
Convert textarea in ldap settings
marcusmoore 6af8412
Convert textarea in saml settings
marcusmoore 07b5544
Convert textarea in upload modal
marcusmoore b6f8ac4
Convert some selects
marcusmoore 447bb40
Convert selects on branding settings page
marcusmoore f80b271
Convert selects on general settings page
marcusmoore 8ad3ec5
Convert additional selects
marcusmoore 8c37c33
Convert additional selects
marcusmoore 26ee4d7
Convert additional selects
marcusmoore 657ea10
Convert additional selects
marcusmoore 2a8790c
Convert additional selects
marcusmoore ca30f4e
Convert additional selects
marcusmoore 26ee8e3
Allow passing options via a slot
marcusmoore 8622448
Convert select in importer
marcusmoore 5d4eb36
Add comments
marcusmoore 286293a
Delete unused partials
marcusmoore e8e22b4
Add required indicator to listbox
marcusmoore 1726dfa
Merge branch 'develop' into chore/migrate-blade-helpers
marcusmoore 4b77d6d
Convert the selects in the label settings
marcusmoore b0a6a3d
Use "options" instead of "items"
marcusmoore cef196f
Move name to first attribute
marcusmoore b557ca6
Standardize attribute order
marcusmoore f9dc650
Remove unneeded attribute
marcusmoore 496cf93
Improve comment
marcusmoore 848cd62
Formatting
marcusmoore 9c67776
Use attribute spreading in text area
marcusmoore 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@props([ | ||
// <options> can either be provided as key => value pairs | ||
// or passed in via the default $slot | ||
'options', | ||
'selected' => null, | ||
'includeEmpty' => false, | ||
'forLivewire' => false, | ||
]) | ||
|
||
<select | ||
{{ $attributes->class(['select2', 'livewire-select2' => $forLivewire]) }} | ||
@if($forLivewire) data-livewire-component="{{ $this->getId() }}" @endif | ||
> | ||
@if($includeEmpty) | ||
<option value=""></option> | ||
@endif | ||
{{-- map the simple key => value pairs when nothing is passed in via the slot --}} | ||
@if($slot->isEmpty()) | ||
@foreach($options as $key => $value) | ||
<option value="{{ $key }}" @selected($selected === $key)>{{ $value }}</option> | ||
@endforeach | ||
@else | ||
{{ $slot }} | ||
@endif | ||
</select> |
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 @@ | ||
@props([ | ||
'value' => '', | ||
'cols' => 50, | ||
'rows' => 10, | ||
]) | ||
|
||
<textarea | ||
{{ $attributes->merge(['class' => 'form-control']) }} | ||
cols="{{ $cols }}" | ||
rows="{{ $rows }}" | ||
>{{ $value }}</textarea> |
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
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
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
Oops, something went wrong.
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.
FYI: these are the defaults that
Form::textarea
would give you.