Commit 04599355 authored by Nicolas Widart's avatar Nicolas Widart

Adding translatable fields

parent c928b193
......@@ -24,6 +24,7 @@ return [
'form' => [
'title' => 'Title',
'name' => 'Name',
'status' => 'Status',
'status' => 'Online',
'uri' => 'URI',
]
];
......@@ -24,6 +24,7 @@ return [
'form' => [
'title' => 'Titre',
'name' => 'Nom',
'status' => 'Status',
'status' => 'En ligne',
'uri' => 'URI'
]
];
......@@ -11,12 +11,53 @@
</ol>
@stop
@section('styles')
<link href="{!! Module::asset('core', 'css/vendor/iCheck/flat/blue.css') !!}" rel="stylesheet" type="text/css" />
@stop
@section('content')
{!! Form::open(['route' => ['dashboard.menuitem.store', $menu->id], 'method' => 'post']) !!}
<div class="row">
<div class="col-md-12">
<div class="box box-info">
<div class="box-header">
<h3 class="box-title">{{ trans('core::core.title.translatable fields') }}</h3>
</div>
<div class="box-body">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<?php $i = 0; ?>
<?php foreach(LaravelLocalization::getSupportedLocales() as $locale => $language): ?>
<?php $i++; ?>
<li class="{{ App::getLocale() == $locale ? 'active' : '' }}">
<a href="#tab_{{ $i }}" data-toggle="tab">{{ trans('core::core.tab.'. strtolower($language['name'])) }}</a>
</li>
<?php endforeach; ?>
</ul>
<div class="tab-content">
<?php $i = 0; ?>
<?php foreach(LaravelLocalization::getSupportedLocales() as $locale => $language): ?>
<?php $i++; ?>
<div class="tab-pane {{ App::getLocale() == $locale ? 'active' : '' }}" id="tab_{{ $i }}">
@include('menu::admin.menuitems.partials.create-trans-fields', ['lang' => $locale])
</div>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
</div>
</div>
{!! Form::close() !!}
@stop
@section('scripts')
<script>
$( document ).ready(function() {
$('input[type="checkbox"].flat-blue, input[type="radio"].flat-blue').iCheck({
checkboxClass: 'icheckbox_flat-blue',
radioClass: 'iradio_flat-blue'
});
});
</script>
@stop
<div class='form-group{{ $errors->has("title[{$lang}]") ? ' has-error' : '' }}'>
{!! Form::label("title[{$lang}]", trans('menu::menu.form.title')) !!}
{!! Form::text("title[{$lang}]", Input::old("title[{$lang}]"), ['class' => 'form-control', 'placeholder' => trans('menu::menu.form.title')]) !!}
{!! $errors->first("title[{$lang}]", '<span class="help-block">:message</span>') !!}
</div>
<div class="form-group">
{!! Form::label("uri[{$lang}]", trans('menu::menu.form.uri')) !!}
<div class='input-group{{ $errors->has("uri[{$lang}]") ? ' has-error' : '' }}'>
<span class="input-group-addon">/{{ $lang }}/</span>
{!! Form::text("uri[{$lang}]", Input::old("uri[{$lang}]"), ['class' => 'form-control', 'placeholder' => trans('menu::menu.form.uri')]) !!}
{!! $errors->first("uri[{$lang}]", '<span class="help-block">:message</span>') !!}
</div>
</div>
<div class="checkbox">
<label for="status[{{$lang}}]">
<input id="status[{{$lang}}]"
name="status[{{$lang}}]"
type="checkbox"
class="flat-blue"
value="1" />
{{ trans('menu::menu.form.status') }}
</label>
</div>
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