-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added spa-layout to config Added default traits to stubs Fix array field icon did not show New Range slider Fix error icon text color Fix styling horizontal alignment of array icons New min, max, step, option to inputs of type number, range, date, datetime-local, month, time, week Fix background color in notification trait Fix background color of delete button in array fields New Honeypot field support New fields_updated() method in Form Component New Laravel 7 Blade component for range input sliders Fix default path for mime_type icons
- Loading branch information
1 parent
c7e8e24
commit 8ac6d79
Showing
17 changed files
with
131 additions
and
23 deletions.
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 |
---|---|---|
@@ -1,32 +1,53 @@ | ||
<?php | ||
|
||
return [ | ||
//note that the word dummymodel is auto replaced with the lower case value of --model option in the make command | ||
'form-title' => "trans('global.create').' '.trans('crud.dummymodel.title_singular')", | ||
|
||
//A Laravel 7 blade component to wrap your form if $spaMode = true, see documentation | ||
'spa-layout' => 'tall-forms::spa-layout', | ||
|
||
|
||
//form buttons translations | ||
'saved' => 'global.saved', | ||
'delete' => 'global.delete', | ||
'save-and-stay' =>'global.save', | ||
'save-go-back' => 'global.save_go_back', | ||
'message-updated-success' => 'messages.updated_success', | ||
|
||
|
||
//notification trait popup bg colors | ||
'positive' => 'bg-green-500', | ||
'negative' => 'bg-red-500', | ||
'info' => 'bg-blue-500', | ||
'warning' => 'bg-orange-500', | ||
'default' => 'bg-teal-500', | ||
|
||
//text colors | ||
'text-positive' => 'text-aurora-green', | ||
'text-negative' => 'text-aurora-red', | ||
'text-info' => 'text-frost-dimmed', | ||
'text-warning' => 'text-orange-800', | ||
'text-primary' => 'text-teal-800', | ||
|
||
|
||
//button component classes | ||
'button-info' => 'text-white bg-frost-dimmed hover:bg-frost-blue focus:border-blue-700 focus:shadow-outline-blue active:bg-frost-dimmed', | ||
'button-positive' => 'text-white bg-aurora-green hover:bg-green-500 focus:border-green-600 focus:shadow-outline-green active:bg-aurora-green', | ||
'button-negative' => 'text-red-100 bg-aurora-red hover:bg-red-500 focus:border-red-600 focus:shadow-outline-red active:bg-aurora-red', | ||
'button-warning' => 'text-orange-100 bg-aurora-orange hover:bg-orange-600 focus:border-orange-700 focus:shadow-outline-orange active:bg-orange-700', | ||
'button-primary' => 'text-blue-100 bg-night-lighter hover:bg-night-dark focus:border-night-light focus:shadow-outline-blue active:bg-night-dark', | ||
|
||
|
||
//file uploads | ||
'storage_disk' => env('FORM_STORAGE_DISK', 'public'), | ||
'storage_path' => env('FORM_STORAGE_PATH', 'uploads'), | ||
|
||
|
||
//icons | ||
'arrow-up-icon' => 'light/arrow-up', //used as @svg('light/arrow-up', 'classes') | ||
'arrow-down-icon' => 'light/arrow-down', | ||
'trash-icon' => 'light/trash-alt', | ||
'plus-icon' => 'light/plus-circle', | ||
'file-icon' => 'light/' //used as light/{$mime_type} | ||
'file-icon' => 'light/' //used as @svg('light/{$mime_type}', 'classes') | ||
]; |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<x-tall-input :field="$bind" :colspan="$array_field->colspan ?? 6" :type="$array_field->input_type" | ||
:prefix="$array_field->prefix ?? null" :prefix="$array_field->icon ?? null" :autocomplete="$array_field->autocomplete" :fieldClass="$array_field->class" | ||
:prefix="$array_field->prefix ?? null" :icon="$array_field->icon ?? null" :autocomplete="$array_field->autocomplete" :fieldClass="$array_field->class" | ||
:placeholder="$array_field->placeholder" :help="$array_field->help" | ||
:label="($array_field->show_label) ? $array_field->label : null" :errorMsg="$array_field->errorMsg" /> | ||
:label="($array_field->show_label) ? $array_field->label : null" :errorMsg="$array_field->errorMsg" | ||
:step="$array_field->step" :min="$array_field->min" :max="$array_field->max"/> |
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,5 @@ | ||
<x-tall-range :field="$bind" :colspan="$array_field->colspan ?? 6" | ||
:fieldClass="$array_field->class" | ||
:help="$array_field->help" | ||
:label="($array_field->show_label) ? $array_field->label : null" :errorMsg="$array_field->errorMsg" | ||
:step="$array_field->step" :min="$array_field->min" :max="$array_field->max" /> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@props([ | ||
'colspan' => 6, | ||
'field' => "", | ||
'label' => "", | ||
'id' => null, | ||
'type' => 'range', | ||
'help' => null, | ||
'errorMsg' => null, | ||
'fieldClass' => null, | ||
'step' => null, | ||
'min' => null, | ||
'max' => null, | ||
]) | ||
<div {{ $attributes->merge(['class' => "sm:col-span-{$colspan}"]) }}> | ||
|
||
<label for="{{ $id ?? $field }}"> | ||
<span class="block text-sm font-medium leading-5 text-gray-500">{{ $label ?? ''}}</span> | ||
<div class="flex space-x-2 py-2 {{$fieldClass}}"> | ||
<div class="rounded border px-2 font-bold">{{ data_get($this, $field) ?? $min }}</div> | ||
<div>{{$min}}</div> | ||
<input x-ref="{{ $field }}" wire:model="{{ $field }}" | ||
value="{{ old($field) }}" | ||
name="{{ $id ?? $field }}" | ||
type="range" | ||
min="{{ $min }}" max="{{ $max }}" step="{{ $step }}" | ||
class="form-range mt-1 block w-full" /> | ||
<div>{{$max}}</div> | ||
</div> | ||
|
||
</label> | ||
@if($help)<p class="help">{{ $help }}</p>@endif | ||
@error($field)<p class="error">{{ $errorMsg ?? $message }}</p>@enderror | ||
</div> |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
@if($field->input_type === 'hidden') | ||
<input x-ref="{{ $field->key }}" wire:model.lazy="{{ $field->key }}" name="{{ $field->key }}" type="hidden"/> | ||
<input x-ref="{{ $field->key }}" wire:model="{{ $field->key }}" name="{{ $field->key }}" type="hidden" autocomplete="{{ $field->autocomplete }}" class="nosy" /> | ||
@else | ||
<x-tall-field-wrapper :inline="$field->inline" :colspan="$field->colspan" :field="$field->name" :label="$field->label" :labelW="$field->labelW" :fieldW="$field->fieldW"> | ||
<x-tall-input :field="$field->key" :id="$field->name" :type="$field->input_type" :prefix="$field->prefix" :icon="$field->icon" :fieldClass="$field->class" :autocomplete="$field->autocomplete" :placeholder="$field->placeholder" :help="$field->help" :errorMsg="$field->errorMsg" /> | ||
</x-tall-field-wrapper> | ||
<x-tall-field-wrapper :inline="$field->inline" :colspan="$field->colspan" :field="$field->name" :label="$field->label" :labelW="$field->labelW" :fieldW="$field->fieldW"> | ||
<x-tall-input :field="$field->key" :id="$field->name" :type="$field->input_type" :prefix="$field->prefix" :icon="$field->icon" :fieldClass="$field->class" :autocomplete="$field->autocomplete" :placeholder="$field->placeholder" :help="$field->help" :errorMsg="$field->errorMsg" :step="$field->step" :min="$field->min" :max="$field->max"/> | ||
</x-tall-field-wrapper> | ||
@endif |
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,3 @@ | ||
<x-tall-field-wrapper :inline="$field->inline" :colspan="$field->colspan" :field="$field->name" :label="$field->label" :labelW="$field->labelW" :fieldW="$field->fieldW"> | ||
<x-tall-range :field="$field->key" :id="$field->name" :fieldClass="$field->class" :help="$field->help" :errorMsg="$field->errorMsg" :step="$field->step" :min="$field->min" :max="$field->max"/> | ||
</x-tall-field-wrapper> |
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