@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::model($data, ['route' => ['admin.manufacturer.update', $data->manufacturer_id], 'method'=>'put', 'class'=>'form-horizontal form-detail']) !!}
<div class="tab-content">
    <div role="tabpanel" class="tab-pane active" id="home">
    	<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", null, ['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', null, ['class'=>'form-control']) !!}
				<span class="pl-10 mt-5 text-muted inline-block">( 请输入英文别名，用来做品牌链接 )</span>
			</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="image">
					<div class="upload-wrap-btn {{$data->image ? 'display-none' : ''}}">
						<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">
						@if($data->image)
						<li class="thumbnail thumb-imgs" data-img="{{ $data->image }}">
							<input name="imgs[]" value="{{ $data->image }}" type="hidden" class="uploadfiles-input">
							<a class="thumbnail-img"><img src="{{ url($data->image) }}"></a>
							<a class="thumbnail-remove" href="javascript:;">删除</a>
						</li>
					@endif
					</ul>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label label-width">品牌官网：</label>
			<div class="col-sm-5">
				{!! Form::text('linkurl', null, ['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::number('orders', null, ['class'=>'form-control']) !!}
			</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