Moving css and js stacks outside the component. Making field and label name dynamic

parent 6aebb0fa
@if ($editor->getEditorCssPartial() !== null)
@include($editor->getEditorCssPartial())
@endif
<div class='{{ $errors->has("{$lang}.body") ? ' has-error' : '' }}'>
{!! Form::label("{$lang}[body]", trans('page::pages.form.body')) !!}
<textarea class="{{ $editor->getEditorClass() }}" name="{{$lang}}[body]" rows="10" cols="80">{{ $slot }}</textarea>
{!! $errors->first("{$lang}.body", '<span class="help-block">:message</span>') !!}
<div class='{{ $errors->has("{$lang}.{$fieldName}") ? ' has-error' : '' }}'>
{!! Form::label("{$lang}[{$fieldName}]", $labelName) !!}
<textarea class="{{ $editor->getEditorClass() }}" name="{{$lang}}[{$fieldName}]" rows="10" cols="80">{{ $slot }}</textarea>
{!! $errors->first("{$lang}.{$fieldName}", '<span class="help-block">:message</span>') !!}
</div>
@if ($editor->getEditorJsPartial() !== null)
@include($editor->getEditorJsPartial())
@endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment