AsgardCms/Menu

View on GitHub
Resources/views/admin/menus/partials/edit-trans-fields.blade.php

Summary

Maintainability
A
0 mins
Test Coverage
<div class='form-group{{ $errors->has("{$lang}[title]") ? ' has-error' : '' }}'>
    {!! Form::label("{$lang}[title]", trans('menu::menu.form.title')) !!}
    <?php $old = $menu->hasTranslation($lang) ? $menu->translate($lang)->title : '' ?>
    {!! Form::text("{$lang}[title]", Input::old("{$lang}[title]", $old), ['class' => 'form-control', 'placeholder' => trans('menu::menu.form.title')]) !!}
    {!! $errors->first("{$lang}[title]", '<span class="help-block">:message</span>') !!}
</div>
<div class="checkbox">
    <?php $old = $menu->hasTranslation($lang) ? $menu->translate($lang)->status : false ?>
    <label for="{{$lang}}[status]">
        <input id="{{$lang}}[status]"
                name="{{$lang}}[status]"
                type="checkbox"
                class="flat-blue"
                {{ ((bool) $old) ? 'checked' : '' }}
                value="1" />
        {{ trans('menu::menu.form.status') }}
    </label>
</div>