An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
Fix wire:dirty indicator appearing on readonly fields without wire:model binding
Andras Bacsaia5c6f53b583c
diff --git a/resources/views/components/forms/input.blade.php b/resources/views/components/forms/input.blade.phpindex ecddc364b8..6b88c7b446 100644--- a/resources/views/components/forms/input.blade.php+++ b/resources/views/components/forms/input.blade.php@@ -27,8 +27,8 @@@endif<input autocomplete="{{ $autocomplete }}" value="{{ $value }}"{{ $attributes->merge(['class' => $defaultClass]) }} @required($required)- @if ($modelBinding !== 'null') wire:model={{ $modelBinding }} @endif- wire:dirty.class="dark:border-l-warning border-l-coollabs border-l-4" wire:loading.attr="disabled"+ @if ($modelBinding !== 'null') wire:model={{ $modelBinding }} wire:dirty.class="dark:border-l-warning border-l-coollabs border-l-4" @endif+ wire:loading.attr="disabled"type="{{ $type }}" @readonly($readonly) @disabled($disabled) id="{{ $htmlId }}"name="{{ $name }}" placeholder="{{ $attributes->get('placeholder') }}"aria-placeholder="{{ $attributes->get('placeholder') }}"@@ -38,8 +38,8 @@@else<input autocomplete="{{ $autocomplete }}" @if ($value) value="{{ $value }}" @endif{{ $attributes->merge(['class' => $defaultClass]) }} @required($required) @readonly($readonly)- @if ($modelBinding !== 'null') wire:model={{ $modelBinding }} @endif- wire:dirty.class="dark:border-l-warning border-l-coollabs border-l-4" wire:loading.attr="disabled"+ @if ($modelBinding !== 'null') wire:model={{ $modelBinding }} wire:dirty.class="dark:border-l-warning border-l-coollabs border-l-4" @endif+ wire:loading.attr="disabled"type="{{ $type }}" @disabled($disabled) min="{{ $attributes->get('min') }}"max="{{ $attributes->get('max') }}" minlength="{{ $attributes->get('minlength') }}"maxlength="{{ $attributes->get('maxlength') }}"diff --git a/resources/views/components/forms/select.blade.php b/resources/views/components/forms/select.blade.phpindex 1f75ff9e0e..aac924f0d0 100644--- a/resources/views/components/forms/select.blade.php+++ b/resources/views/components/forms/select.blade.php@@ -11,8 +11,8 @@</label>@endif<select {{ $attributes->merge(['class' => $defaultClass]) }} @disabled($disabled) @required($required)- wire:dirty.class="dark:border-l-warning border-l-coollabs border-l-4" wire:loading.attr="disabled" name={{ $modelBinding }} id="{{ $htmlId }}"- @if ($attributes->whereStartsWith('wire:model')->first()) {{ $attributes->whereStartsWith('wire:model')->first() }} @else wire:model={{ $modelBinding }} @endif>+ wire:loading.attr="disabled" name={{ $modelBinding }} id="{{ $htmlId }}"+ @if ($attributes->whereStartsWith('wire:model')->first()) {{ $attributes->whereStartsWith('wire:model')->first() }} wire:dirty.class="dark:border-l-warning border-l-coollabs border-l-4" @else wire:model={{ $modelBinding }} wire:dirty.class="dark:border-l-warning border-l-coollabs border-l-4" @endif>{{ $slot }}</select>@error($modelBinding)diff --git a/resources/views/components/forms/textarea.blade.php b/resources/views/components/forms/textarea.blade.phpindex 9c4860da86..cee5faeda9 100644--- a/resources/views/components/forms/textarea.blade.php+++ b/resources/views/components/forms/textarea.blade.php@@ -45,17 +45,16 @@@endif<input x-cloak x-show="type === 'password'" value="{{ $value }}"{{ $attributes->merge(['class' => $defaultClassInput]) }} @required($required)- @if ($modelBinding !== 'null') wire:model={{ $modelBinding }} @endif- wire:dirty.class="dark:border-l-warning border-l-coollabs border-l-4" wire:loading.attr="disabled"+ @if ($modelBinding !== 'null') wire:model={{ $modelBinding }} wire:dirty.class="dark:border-l-warning border-l-coollabs border-l-4" @endif+ wire:loading.attr="disabled"type="{{ $type }}" @readonly($readonly) @disabled($disabled) id="{{ $htmlId }}"name="{{ $name }}" placeholder="{{ $attributes->get('placeholder') }}"aria-placeholder="{{ $attributes->get('placeholder') }}"><textarea minlength="{{ $minlength }}" maxlength="{{ $maxlength }}" x-cloak x-show="type !== 'password'"placeholder="{{ $placeholder }}" {{ $attributes->merge(['class' => $defaultClass]) }}- @if ($realtimeValidation) wire:model.debounce.200ms="{{ $modelBinding }}"+ @if ($realtimeValidation) wire:model.debounce.200ms="{{ $modelBinding }}" wire:dirty.class="dark:border-l-warning border-l-coollabs border-l-4"@else- wire:model={{ $value ?? $modelBinding }}- wire:dirty.class="dark:border-l-warning border-l-coollabs border-l-4" @endif+ wire:model={{ $value ?? $modelBinding }} wire:dirty.class="dark:border-l-warning border-l-coollabs border-l-4" @endif@disabled($disabled) @readonly($readonly) @required($required) id="{{ $htmlId }}"name="{{ $name }}" name={{ $modelBinding }}@if ($autofocus) x-ref="autofocusInput" @endif></textarea>@@ -65,10 +64,9 @@<textarea minlength="{{ $minlength }}" maxlength="{{ $maxlength }}"{{ $allowTab ? '@keydown.tab=handleKeydown' : '' }} placeholder="{{ $placeholder }}"{{ !$spellcheck ? 'spellcheck=false' : '' }} {{ $attributes->merge(['class' => $defaultClass]) }}- @if ($realtimeValidation) wire:model.debounce.200ms="{{ $modelBinding }}"+ @if ($realtimeValidation) wire:model.debounce.200ms="{{ $modelBinding }}" wire:dirty.class="dark:border-l-warning border-l-coollabs border-l-4"@else- wire:model={{ $value ?? $modelBinding }}- wire:dirty.class="dark:border-l-warning border-l-coollabs border-l-4" @endif+ wire:model={{ $value ?? $modelBinding }} wire:dirty.class="dark:border-l-warning border-l-coollabs border-l-4" @endif@disabled($disabled) @readonly($readonly) @required($required) id="{{ $htmlId }}"name="{{ $name }}" name={{ $modelBinding }}@if ($autofocus) x-ref="autofocusInput" @endif></textarea>