Skip to content
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

Readonly attribute not supported #10

Open
s6carlo opened this issue Nov 25, 2015 · 0 comments
Open

Readonly attribute not supported #10

s6carlo opened this issue Nov 25, 2015 · 0 comments

Comments

@s6carlo
Copy link

s6carlo commented Nov 25, 2015

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant