Using new blade directives

parent f296c292
......@@ -10,9 +10,8 @@
{!! Form::text("{$lang}[slug]", old("{$lang}.slug"), ['class' => 'form-control slug', 'data-slug' => 'target', 'placeholder' => trans('page::pages.form.slug')]) !!}
{!! $errors->first("{$lang}.slug", '<span class="help-block">:message</span>') !!}
</div>
@component($editor->getI18nComponentName(), compact('lang'))
{{ old("{$lang}.body") }}
@endcomponent
@editor('body', trans('page::pages.form.body'), old("{$lang}.body"), $lang)
<?php if (config('asgard.page.config.partials.translatable.create') !== []): ?>
<?php foreach (config('asgard.page.config.partials.translatable.create') as $partial): ?>
......
......@@ -13,10 +13,7 @@
{!! $errors->first("{$lang}.slug", '<span class="help-block">:message</span>') !!}
</div>
@component($editor->getI18nComponentName(), compact('lang'))
<?php $old = $page->hasTranslation($lang) ? $page->translate($lang)->body : '' ?>
{!! old("$lang.body", $old) !!}
@endcomponent
@editor('body', trans('page::pages.form.body'), old("$lang.body", $old), $lang)
<?php if (config('asgard.page.config.partials.translatable.edit') !== []): ?>
<?php foreach (config('asgard.page.config.partials.translatable.edit') as $partial): ?>
......
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