admin-lte-template icon indicating copy to clipboard operation
admin-lte-template copied to clipboard

Readonly attribute not supported

Open s6carlo opened this issue 9 years ago • 0 comments

Using this template the "readonly" attribute is not supported.

FormItem::text('id', 'USER Id')->readonly(true),

For example text.blade.php from

<div class="form-group {{ $errors->has($name) ? 'has-error' : '' }}">
    <label for="{{ $name }}">{{ $label }}</label>
    <input class="form-control" name="{{ $name }}" type="text" id="{{ $name }}" value="{{ $value }}">
    @include(AdminTemplate::view('formitem.errors'))
</div>

should be changed in

<div class="form-group {{ $errors->has($name) ? 'has-error' : '' }}">
    <label for="{{ $name }}">{{ $label }}</label>
    <input class="form-control" name="{{ $name }}" type="text" id="{{ $name }}" value="{{ $value }}" @if(isset($readonly))readonly="{{ $readonly }}" @endif>
    @include(AdminTemplate::view('formitem.errors'))
</div>

s6carlo avatar Nov 25 '15 17:11 s6carlo