<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-description" data-rule="required" class="form-control " rows="5" name="row[description]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Map_info')}:</label>
        <div class="col-xs-12 col-sm-8">
            <button type="button" class="btn btn-success" data-toggle="addresspicker" data-input-id="c-address" data-lat-id="c-lat" data-lng-id="c-lng">选择地图</button>
            <input id="c-map_info" data-rule="required" class="form-control" name="row[map_info]" type="text" style="display: none">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text">
        </div>
    </div>
    <div class="form-group" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('Province')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-province" data-rule="required" class="form-control" name="row[province]" type="text">
        </div>
    </div>
    <div class="form-group" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-city" data-rule="required" class="form-control" name="row[city]" type="text">
        </div>
    </div>
    <div class="form-group" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('Area')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-area" data-rule="required" class="form-control" name="row[area]" type="text">
        </div>
    </div>
    <div class="form-group" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('Lng')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lng" data-rule="required" class="form-control" name="row[lng]" type="text">
        </div>
    </div>
    <div class="form-group" style="display: none">
        <label class="control-label col-xs-12 col-sm-2">{:__('Lat')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lat" data-rule="required" class="form-control" name="row[lat]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-mobile" data-rule="required" class="form-control" name="row[mobile]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cover')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-cover" data-rule="required" class="form-control" size="1" name="row[cover]" type="text" value="" >
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-files-cover" class="btn btn-danger plupload" data-input-id="c-cover" data-mimetype="*" data-multiple="false" data-preview-id="p-files-cover"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-files-cover" class="btn btn-primary fachoose" data-input-id="c-cover" data-mimetype="*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-cover"></span>
            </div>

            <!--ul需要添加 data-template和data-name属性,并一一对应且唯一 -->
            <ul class="row list-inline plupload-preview" id="p-files-cover" data-template="introtpl-cover" data-name="row[intro]"></ul>

            <!--这里自定义图片预览的模板 开始-->
            <script type="text/html" id="introtpl-cover">
                <li class="col-xs-3">
                    <a href="<%=fullurl%>" data-url="<%=url%>" target="_blank" class="thumbnail">
                        <img src="<%=fullurl%>" class="img-responsive">
                    </a>
                    <a href="javascript:;" class="btn btn-danger btn-xs btn-trash"><i class="fa fa-trash"></i></a>
                </li>
            </script>
            <!--这里自定义图片预览的模板 结束-->
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Banner')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-banner" data-rule="required" class="form-control" size="1" name="row[banner]" type="text" value="" >
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-files" class="btn btn-danger plupload" data-input-id="c-banner" data-mimetype="*" data-multiple="true" data-preview-id="p-files"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-files" class="btn btn-primary fachoose" data-input-id="c-banner" data-mimetype="*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-banner"></span>
            </div>

            <!--ul需要添加 data-template和data-name属性,并一一对应且唯一 -->
            <ul class="row list-inline plupload-preview" id="p-files" data-template="introtpl" data-name="row[intro]"></ul>

            <!--这里自定义图片预览的模板 开始-->
            <script type="text/html" id="introtpl">
                <li class="col-xs-3">
                    <a href="<%=fullurl%>" data-url="<%=url%>" target="_blank" class="thumbnail">
                        <img src="<%=fullurl%>" class="img-responsive">
                    </a>
                    <a href="javascript:;" class="btn btn-danger btn-xs btn-trash"><i class="fa fa-trash"></i></a>
                </li>
            </script>
            <!--这里自定义图片预览的模板 结束-->
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>