-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/fil001 132 templates update #9
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
712f4da
Update and cleanup form, fieldset, fields, form group and rows
Katrienvh eb415e6
Add collClas and buttonIcon to the config
Katrienvh 4769522
Update some last class settings
Katrienvh 8047e31
Update read me
Katrienvh fa7c100
Fix styling
Katrienvh 10bd410
Remove placeholder from date field
Katrienvh 9f6dae0
Merge branch 'feature/FIL001-132-templates-update' of github.com:code…
Katrienvh 1c6b651
Add some extra config classes
Katrienvh 552505c
Add gap and gutter config classes
Katrienvh e1711b9
Add check gap class in config
Katrienvh 26ed35e
Add form check div class in config
Katrienvh fee0ad9
Add checkbox group and rename radio to radio group
Katrienvh 60277f5
Fix wrong variable name
Katrienvh 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,11 +1,19 @@ | ||
<div class="{{ $field->divClass ?? 'col-6' }}"> | ||
<input | ||
<div @class([ | ||
$field->divClass ?? config('livewire-forms.defaults.divClass'), | ||
$field->colClass ?? config('livewire-forms.defaults.colClass')]) | ||
> | ||
<button | ||
@if ($field->action) | ||
wire:click.prevent="{{ $field->action }}" | ||
@endif | ||
type="submit" | ||
name="{{ $field->getName() }}" | ||
value="{{ $field->getName() }}" | ||
@class([$field->class ?? config('livewire-forms.defaults.buttonClass')]) | ||
@if ($field->dusk) dusk={{ $field->dusk }} @endif | ||
> | ||
{{ $field->getName() }} | ||
@if(config('livewire-forms.defaults.buttonIcon')) | ||
<x-dynamic-component component="{{ $field->buttonIcon ?? config('livewire-forms.defaults.buttonIcon') }}" /> | ||
@endif | ||
</button> | ||
</div> |
This file contains hidden or 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,45 @@ | ||
<div | ||
@class([ | ||
$field->divClass ?? config('livewire-forms.defaults.divClass'), | ||
$field->colClass ?? config('livewire-forms.defaults.colClass') | ||
]) | ||
> | ||
@include('livewire-forms::fields.label') | ||
|
||
<div @class([ | ||
'd-flex flex-column', | ||
$field->checkGapClass ?? config('livewire-forms.defaults.checkGapClass') | ||
])> | ||
@foreach ($field->options as $key => $value) | ||
<div | ||
@class([ | ||
$field->checkDivClass ?? config('livewire-forms.defaults.checkDivClass'), | ||
'is-invalid' => $errors->first(($field->containsFile ? 'files.' : 'fields.') . $field->getName()), | ||
]) | ||
> | ||
<input | ||
type="checkbox" | ||
@class([ | ||
$field->class ?? config('livewire-forms.defaults.checkInputClass'), | ||
'is-invalid' => $errors->first(($field->containsFile ? 'files.' : 'fields.') . $field->getName()), | ||
]) | ||
id="{{ $field->getName() . '.' . $loop->index }}" | ||
name="{{ $field->getName() }}" | ||
wire:model.{{ $field->getDebounce() }}="fields.{{ $field->getName() }}.{{ $key }}" | ||
> | ||
<label | ||
@class([ | ||
'select-none', | ||
$field->checkOptionLabelClass ?? config('livewire-forms.defaults.checkLabelClass'), | ||
]) | ||
for="{{ $field->getName() . '.' . $loop->index }}" | ||
> | ||
{{ $value }} | ||
</label> | ||
</div> | ||
@endforeach | ||
</div> | ||
|
||
@include('livewire-forms::fields.gdpr') | ||
@include('livewire-forms::fields.error') | ||
</div> |
This file contains hidden or 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 hidden or 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 hidden or 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,3 +1,5 @@ | ||
@error(($field->containsFile ? 'files.' : 'fields.') . $field->getName()) | ||
<span class="form-error">{{ $message }}</span> | ||
<span class="invalid-feedback"> | ||
{{ $message }} | ||
</span> | ||
@enderror |
This file contains hidden or 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 hidden or 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,3 +1,16 @@ | ||
@foreach ($field->getNestedFields() as $_field) | ||
{{ $_field->render() }} | ||
@endforeach | ||
<fieldset | ||
@class([ | ||
$field->groupClass ?? config('livewire-forms.defaults.groupClass'), | ||
$field->colClass ?? config('livewire-forms.defaults.colClass'), | ||
$field->gapClass ?? config('livewire-forms.defaults.gapClass') | ||
]) | ||
> | ||
@if($field->legendTitle) | ||
<legend>{{ $field->legendTitle }}</legend> | ||
@endif | ||
|
||
@foreach ($field->getNestedFields() as $_field) | ||
{{ $_field->render() }} | ||
@endforeach | ||
</fieldset> | ||
i |
This file contains hidden or 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 hidden or 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,9 @@ | ||
<label | ||
for="{{ $field->getName() }}" | ||
class="{{ $field->labelClass }} {{ ($field->getValue() ? 'changed' : '') }}" | ||
@class([ | ||
$field->labelClass ?? config('livewire-forms.defaults.labelClass'), | ||
$field->getValue() ? 'changed' : '' | ||
]) | ||
> | ||
{{ $field->getLabel() }} | ||
</label> |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,43 @@ | ||
<div | ||
@class([ | ||
$field->divClass ?? config('livewire-forms.defaults.divClass'), | ||
$field->colClass ?? config('livewire-forms.defaults.colClass') | ||
]) | ||
> | ||
@include('livewire-forms::fields.label') | ||
|
||
<div @class([ | ||
'd-flex flex-column', | ||
$field->checkGapClass ?? config('livewire-forms.defaults.checkGapClass') | ||
])> | ||
@foreach ($field->options as $key => $value) | ||
<div | ||
@class([ | ||
$field->checkDivClass ?? config('livewire-forms.defaults.checkDivClass') | ||
]) | ||
> | ||
<input | ||
@include('livewire-forms::fields.binding') | ||
type="radio" | ||
@class([ | ||
$field->class ?? config('livewire-forms.defaults.checkInputClass'), | ||
'is-invalid' => $errors->has('fields.' . $field->getName()), | ||
]) | ||
id="{{ $field->getName() . '.' . $loop->index }}" | ||
name="{{ $field->getName() }}" | ||
value="{{ $field->useValueAsKeys ? $value : $key }}" | ||
@if ($field->dusk) dusk={{ $field->dusk }} @endif | ||
> | ||
<label | ||
@class([config('livewire-forms.defaults.checkLabelClass')]) | ||
for="{{ $field->getName() . '.' . $loop->index }}" | ||
> | ||
{{ $value }} | ||
</label> | ||
</div> | ||
@endforeach | ||
</div> | ||
|
||
@include('livewire-forms::fields.gdpr') | ||
@include('livewire-forms::fields.error') | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.