@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.lang.store', 'class'=>'form-horizontal  form-detail']) !!}
	<div class="tab-content">
		<div class="form-group form-item-required">
			<label class="col-sm-2 control-label label-width">名称：</label>
			<div class="col-sm-5">
				{!! Form::text('name', '', ['class'=>'form-control']) !!}
			</div>
		</div>
		<div class="form-group form-item-required">
			<label class="col-sm-2 control-label label-width">别名：</label>
			<div class="col-sm-5">
				{!! Form::text('slug', '', ['class'=>'form-control']) !!}
			</div>
		</div>
		<div class="form-group form-item-required">
			<label class="col-sm-2 control-label label-width">标题：</label>
			<div class="col-sm-5">
				{!! Form::text('title', '', ['class'=>'form-control']) !!}
			</div>
		</div>
    <div class="form-group">
      <label class="col-sm-2 control-label label-width">域名：</label>
      <div class="col-sm-5">
        {!! Form::text('domain', '', ['class'=>'form-control']) !!}
      </div>
    </div>
		<div class="form-group">
			<label class="col-sm-2 control-label label-width">图片：</label>
			<div class="col-sm-5">
				<div class="upload-wrap" data-name="img">
					<div class="upload-wrap-btn">
						<span class="btn btn-default" data-toggle="modal" data-target="#media-dialog-modal">媒体上传</span>
						<span class="text-muted pl-10">(允许上传的媒体类型：jpg、gif、png)</span>
					</div>
					<ul id="picfram" class="upload-wrap-lists attachments clearfix"></ul>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label label-width">排序：</label>
			<div class="col-sm-5">
				{!! Form::number('orders', maxValue('lang'), ['class'=>'form-control len100']) !!}
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label label-width">是否启用：</label>
			<div class="col-sm-5">
				<div class="pretty-box">
					<div class="pretty p-default p-round p-smooth">
						{!! Form::radio('enabled', 1, true) !!}
						<div class="state p-success-o"><label>启用</label></div>
					</div>
					<div class="pretty p-default p-round p-smooth">
						{!! Form::radio('enabled', 0, false) !!}
						<div class="state p-success-o"><label>不启用</label></div>
					</div>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label label-width">发布状态：</label>
			<div class="col-sm-5">
				<div class="pretty-box">
					<div class="pretty p-default p-round p-smooth">
						{!! Form::radio('flag', 1, true) !!}
						<div class="state p-success-o"><label>发布</label></div>
					</div>
					<div class="pretty p-default p-round p-smooth">
						{!! Form::radio('flag', 0, false) !!}
						<div class="state p-success-o"><label>不发布</label></div>
					</div>
				</div>
			</div>
		</div>
		<div class="form-group">
	        <label class="col-sm-3 control-label label-width"></label>
	        <div class="col-sm-5">
	            {!! Form::submit('提交', ['class'=>'btn btn-primary']) !!}
	        </div>
	    </div>
	</div>
{!! Form::close() !!}
@endsection

@section('foot')
{{--媒体库 start--}}
@include('admin.common.media', ['type' => 'jpg,gif,png'])
{{--媒体库 end--}}
@endsection