{{:ModuleInclude('public/header')}}

<!-- right content start  -->
<div class="content-right">
	<div class="content">
        <!-- save win start -->
        <div class="am-popup am-radius" id="data-save-win">
            <div class="am-popup-inner">
                <div class="am-popup-hd">
                    <h4 class="am-popup-title" data-add-title="{{:MyLang('brandcategory.base_nav_title')}}{{:MyLang('add_title')}}" data-edit-title="{{:MyLang('brandcategory.base_nav_title')}}{{:MyLang('edit_title')}}">{{:MyLang('brandcategory.base_nav_title')}}{{:MyLang('add_title')}}</h4>
                    <span data-am-modal-close class="am-close">&times;</span>
                </div>
                <div class="am-popup-bd">
                    <!-- form start -->
                    <form class="am-form form-validation am-form-popup-fixed" action="{{:MyUrl('admin/brandcategory/save')}}" method="POST" request-type="ajax-fun" request-value="CardFormSaveBack">
                        <div class="am-form-group row am-form-file">
                            <label class="am-block">{{:MyLang('common_service.brandcategory.form_item_icon')}}<a href="javascript:;" class="am-icon-question-circle am-margin-left-xs" data-am-popover="{content: '{{:MyLang('common_service.brandcategory.form_item_icon_tips')}}', trigger: 'hover focus', theme: 'sm'}"></a></label>
                            <div class="am-form-file-upload-container">
                                <ul class="plug-file-upload-view brand-category-icon-images-view" data-form-name="icon" data-max-number="1" data-dialog-type="images">
                                    <li class="plug-file-upload-submit" data-view-tag="ul.brand-category-icon-images-view">
                                        <i class="iconfont icon-add"></i>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="am-form-group row">
                            <label>{{:MyLang('common_service.brandcategory.form_item_name')}}<span class="am-form-group-label-tips-must">*</span></label>
                            <input type="text" placeholder="{{:MyLang('common_service.brandcategory.form_item_name_message')}}" name="name" minlength="1" maxlength="60" data-validation-message="{{:MyLang('common_service.brandcategory.form_item_name_message')}}" class="am-radius" required />
                        </div>
                        {{:ModuleInclude('lib/sort', ['is_row'=>1])}}
                        {{:ModuleInclude('lib/is_enable', ['is_row'=>1])}}
                        <div class="am-form-popup-submit">
                            <input type="hidden" name="id" />
                            <button type="button" class="am-btn am-btn-warning am-radius am-btn-xs am-margin-right-lg" data-am-modal-close>
                                <i class="am-icon-paint-brush"></i>
                                <span>{{:MyLang('cancel_title')}}</span>
                            </button>
                            <button type="submit" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example" data-am-loading="{spinner: 'circle-o-notch', loadingText:'{{:MyLang('save_title')}}'}">
                                <i class="am-icon-save"></i>
                                <span>{{:MyLang('save_title')}}</span>
                            </button>
                        </div>
                    </form>
                    <!-- form end -->
                </div>
            </div>
        </div>
        <!-- save win end -->

        <!-- list start -->
        <div id="card" data-prefix='{"field":"icon","type":"img"}' data-suffix="" data-additional='[{"field":"icon", "value":"", "type":"input"}, {"field":"icon", "value":"", "type":"annex", "tag":"ul.brand-category-icon-images-view", "style":"src"}]' data-node-url="{{:MyUrl('admin/brandcategory/getnodeson')}}" data-del-url="{{:MyUrl('admin/brandcategory/delete')}}" data-popup-tag="#data-save-win">
            {{:ModuleInclude('public/loading')}}
        </div>
        <!-- list end -->
	</div>
</div>
<!-- right content end  -->

<!-- footer start -->
{{:ModuleInclude('public/footer')}}

<script type="text/javascript">
	// 初始化
	Card(0, $('#card').data('node-url'), 0);

	// 回调处理
	function CardFormSaveBack(e)
	{
		CardFormSaveBackHandle(e);
	}
</script>