#@layout()
#define css()
<style type="text/css">
    .switchery-item {
        padding-bottom: 10px;
    }

    .switchery-item .switchery-small {
        margin-top: -2px;
        margin-right: 10px;
    }
</style>
#end

#define content()
<div class="content-wrapper">

    <section class="content-header">
        <h1>
            页面设置
            <small>Page Setting</small>
        </h1>
    </section>

    <section class="content">

        <div class="row">
            <div class="col-xs-12">
                <div class="box box-primary">
                    <div class="box-header ">
                        <h3 class="box-title"></h3>
                    </div>
                    <!-- form start -->
                    <form class="form-horizontal form-setting" autocomplete="off" id="optionForm">
                        <div class="box-body ">


                            <h4 class="page-first-header">评论功能</h4>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"></label>
                                <div class="col-sm-6">
                                    <div class="switchery-item">
                                        <input type="checkbox" class="switchery" data-for="page_comment_enable"
                                               #checkedIf(option("page_comment_enable","true"))>
                                        <input type="hidden" id="page_comment_enable" name="page_comment_enable">
                                        开启评论功能
                                    </div>
                                    <div class="switchery-item">
                                        <input type="checkbox" class="switchery"
                                               data-for="page_comment_unlogin_enable" #checkedIf(option("page_comment_unlogin_enable"))>
                                        <input type="hidden" id="page_comment_unlogin_enable"
                                               name="page_comment_unlogin_enable"> 允许未登录用户发表评论
                                    </div>
                                    <div class="switchery-item">
                                        <input type="checkbox" class="switchery"
                                               data-for="page_comment_review_enable" #checkedIf(option("page_comment_review_enable"))>
                                        <input type="hidden" id="page_comment_review_enable"
                                               name="page_comment_review_enable"> 评论必须经过管理员审核
                                    </div>
                                    <div class="switchery-item">
                                        <input type="checkbox" class="switchery" data-for="page_comment_vcode_enable"
                                               #checkedIf(option("page_comment_vcode_enable","true"))>
                                        <input type="hidden" id="page_comment_vcode_enable"
                                               name="page_comment_vcode_enable"> 启用评论验证码功能
                                    </div>
                                </div>
                            </div>


                            <h4 class="page-header">评论邮件通知管理员</h4>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">启用</label>
                                <div class="col-sm-6">
                                    <input type="checkbox" class="switchery"
                                           data-for="page_comment_email_notify_enable"
                                           #checkedIf(option("page_comment_email_notify_enable"))>
                                    <input type="hidden" id="page_comment_email_notify_enable"
                                           name="page_comment_email_notify_enable">
                                    <p class="help-block"> 请先在 <a href="#(CPATH)/admin/setting">[常规设置]</a> 开填写管理员邮箱。
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">邮件标题</label>
                                <div class="col-sm-6">
                                    <input type="input" class="form-control" placeholder="例如：你的文章#('#(page.title ??)')中有人发布评论啦~~~"
                                           name="page_comment_email_notify_title"
                                           value="#option('page_comment_email_notify_title')">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">邮件内容</label>
                                <div class="col-sm-6">
                                    <textarea rows="3" class="form-control" placeholder="例如：评论的id是：#('#(comment.id)')，评论的内容是：#('#(comment.content)')"
                                              name="page_comment_email_notify_template" >#option('page_comment_email_notify_template')</textarea>
                                    <p class="help-block"> 请先在 <a href="#(CPATH)/admin/setting/connection">[通信]</a> 开启邮件功能后才能使用。
                                    </p>
                                </div>
                            </div>


                            <h4 class="page-header">评论短信通知管理员</h4>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">启用</label>
                                <div class="col-sm-6">
                                    <input type="checkbox" class="switchery"
                                           data-for="page_comment_sms_notify_enable"
                                           #checkedIf(option("page_comment_sms_notify_enable"))>
                                    <input type="hidden" id="page_comment_sms_notify_enable"
                                           name="page_comment_sms_notify_enable">
                                    <p class="help-block"> 请先在 <a href="#(CPATH)/admin/setting">[常规设置]</a> 开填写管理员的手机号。
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">通知短信模板</label>
                                <div class="col-sm-6">
                                    <textarea rows="2" class="form-control" placeholder="..."
                                              name="page_comment_sms_notify_template">#option('page_comment_sms_notify_template')</textarea>
                                    <p class="help-block"> 请先在 <a href="#(CPATH)/admin/setting/connection">[通信]</a> 开启短信功能，这里填写阿里云或腾讯云的短信模板ID。
                                    </p>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">短信签名</label>
                                <div class="col-sm-6">
                                    <input type="input" class="form-control" placeholder="只有部分服务商需要短信签名"
                                           name="page_comment_sms_notify_sign"
                                           value="#option('page_comment_sms_notify_sign')">
                                    <p class="help-block"> 请填写阿里云或腾讯云的短信签名。</p>
                                </div>
                            </div>


                        </div>
                        <!-- /.box-body -->
                        <div class="box-footer">
                            <div class="col-sm-offset-2 col-sm-10 submit-block">
                                <div class="box-submit">
                                    <button type="submit" class="btn btn-primary">提交</button>
                                </div>
                            </div>
                        </div>
                        <!-- /.box-footer -->
                    </form>
                </div>
            </div>
        </div>

    </section>

</div>
#end
