<!-- 继承公共的 form -->
{{extend name="public/module/user_form" /}}

<!-- 表单顶部操作栏 -->
{{block name="form_operate_top"}}
    <a href="javascript:;" type="button" class="am-btn am-btn-success am-radius am-btn-xs am-icon-plus" data-am-modal="{target: '#plugins-answers-popup-ask'}"> 新增</a>
    <!-- 父级内容 -->
    {__block__}
{{/block}}

<!-- 扩展 -->
{{block name="form_extend"}}
    <!-- 新增问答弹窗 -->
    <div class="am-popup" id="plugins-answers-popup-ask">
        <div class="am-popup-inner">
            <div class="am-popup-hd">
                <h4 class="am-popup-title">提问/留言</h4>
                <span data-am-modal-close class="am-close">&times;</span></div>
            <div class="am-popup-bd">
                <form class="am-form form-validation-plugins-answer-ask view-save" action="{{:MyUrl('index/answer/save')}}" method="POST" request-type="ajax-reload">
                    <div class="am-form-group">
                        <label>昵称<span class="am-form-group-label-tips-must">必填</span></label>
                        <input type="text" name="name" placeholder="昵称" minlength="1" maxlength="30" data-validation-message="昵称格式 1~30 个字符之间" class="am-radius" required /></div>
                    <div class="am-form-group">
                        <label>电话<span class="am-form-group-label-tips">选填</span></label>
                        <input type="text" name="tel" placeholder="电话" data-validation-message="请填写电话" class="am-radius" /></div>
                    <div class="am-form-group">
                        <label>标题<span class="am-form-group-label-tips-must">必填</span></label>
                        <input type="text" name="title" placeholder="标题" minlength="1" maxlength="60" data-validation-message="标题格式 1~60 个字符之间" class="am-radius" required /></div>
                    <div class="am-form-group">
                        <label>内容<span class="am-form-group-label-tips-must">必填</span></label>
                        <textarea class="am-radius am-validate" name="content" rows="5" minlength="5" maxlength="1000" placeholder="内容至少5个字" data-validation-message="内容格式 5~1000 个字符之间" required></textarea>
                    </div>
                    <div class="am-form-group am-form-group-refreshing">
                        <button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">提交</button></div>
                </form>
            </div>
        </div>
    </div>
{{/block}}