@extends('admin.master')

@section('top')
	<div class="top-breadcrumb pull-left">
	    <h5>添加标签</h5>
	    <a class="btn btn-xs btn-default goback" onclick="javascript:history.go(-1);">
	        <i class="iconfont icon-back-copy"></i><span>返回</span>
	    </a>
	</div>
@endsection

@section('content')
{!! Form::open(['route' => 'admin.tag.store', 'class'=>'form-horizontal form-detail']) !!}
	<div class="tab-content">
		@foreach (inject('lang')->lists() as $key => $value)
	        <div class="form-group {{ $value->slug == 'en' ? 'form-item-required' : ''}}">
				<label class="col-sm-2 control-label label-width"><img src="{{ url($value->img) }}"> {{ $value->name }}：</label>
				<div class="col-sm-10">
          {!! Form::textarea("description[{$value->slug}][name]", '', ['class'=>'form-control', 'rows'=>5, 'id' => 'tag-'.$value->slug]) !!}
          <span class="pl-10 mt-5 text-muted inline-block">( 多标签用英文,或者回车符分割 )</span>
				</div>
			</div>
		@endforeach
		<div class="form-group">
	        <label class="col-sm-3 control-label label-width"></label>
	        <div class="col-sm-5">
            {!! Form::submit(inject('setting')->config('auto_translate') == 1 ? '提交并翻译' : '提交', ['class'=>'btn btn-primary']) !!}
	        </div>
	    </div>
	</div>
{!! Form::close() !!}
@endsection

@section('foot')
	{{--录入助手 start--}}
	@include('admin.common.input_assistant', ['model' => 'tag', 'title'=> ''])
	{{--录入助手 end--}}
@endsection