<div class="content-wrapper">
    <?php
    $form = $this->form;
    $form->prepare();
    ?>
    <?php echo $this->form()->openTag($form); ?>
    <section class="content-header">
        <?php echo $this->partial('layout/breadcrumb'); ?>

        <h1 class="pull-right" id="dbshop-menu-top">
            <button type="submit" class="btn btn-primary btn-sm"><i class="fa fa-check"></i> <?php echo $this->translate('保存设置'); ?></button>
            <?php echo $this->HelpUrl('phoneMessage'); ?>
        </h1>
    </section>

    <section class="content">
        <div class="row">
            <div class="col-md-12">
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab_1" data-toggle="tab"><?php echo $this->translate('管理员提醒'); ?></a></li>
                        <li><a href="#tab_2" data-toggle="tab"><?php echo $this->translate('订单提醒'); ?></a></li>
                        <li><a href="#tab_3" data-toggle="tab"><?php echo $this->translate('其他提醒'); ?></a></li>
                    </ul>
                    <div class="tab-content">
                        <?php echo $this->partial('layout/messages'); ?>
                        <div class="tab-pane active" id="tab_1">
                            <div class="box-body">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><?php echo $this->translate('管理员手机号码'); ?></label>
                                    <?php if(count($this->phoneArea) == 1) { ?>
                                        <div class="col-sm-3">
                                            <?php echo $this->formElement($form->get('areaCode')); ?>
                                            <?php echo $this->formElementErrors($form->get('areaCode'), ['class'=>'error-message']); ?>
                                            <?php echo $this->formElement($form->get('adminPhone')); ?>
                                            <?php echo $this->formElementErrors($form->get('adminPhone'), ['class'=>'error-message']); ?>
                                        </div>
                                    <?php } else { ?>
                                        <div class="col-sm-2">
                                            <?php echo $this->formElement($form->get('areaCode')); ?>
                                            <?php echo $this->formElementErrors($form->get('areaCode'), ['class'=>'error-message']); ?>
                                        </div>
                                        <div class="col-sm-3">
                                            <?php echo $this->formElement($form->get('adminPhone')); ?>
                                            <?php echo $this->formElementErrors($form->get('adminPhone'), ['class'=>'error-message']); ?>
                                        </div>
                                    <?php } ?>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><?php echo $this->translate('接收短信'); ?></label>
                                    <div class="col-sm-6">
                                        <?php echo $this->formElement($form->get('adminPhoneSend')); ?>
                                        <?php echo $this->formElementErrors($form->get('adminPhoneSend'), ['class'=>'error-message']); ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="tab_2">
                            <div class="box-body">
                                <div class="alert alert-info alert-dismissible">
                                    <?php if($this->smsConfig['sms_service_provider'] == 'aliSms') { ?>目前官方提供的可设置标签有 ${buyName} 购买人、${orderSn} 订单编号、${orderTotal} 订单金额、${deliveryName} 快递名称、${expressNumber} 快递单号<?php } ?>
                                    <?php if($this->smsConfig['sms_service_provider'] == 'tencentSms') { ?>目前官方提供的可设置标签有 {1} 购买人、{2} 订单编号、{3} 订单金额、{4} 快递名称、{5} 快递单号<?php } ?>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><?php echo $this->translate('订单提交模板ID'); ?></label>
                                    <div class="col-sm-3">
                                        <?php echo $this->formElement($form->get('addOrderSmsTemplateId')); ?>
                                        <?php echo $this->formElementErrors($form->get('addOrderSmsTemplateId'), ['class'=>'error-message']); ?>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><?php echo $this->translate('订单付款模板ID'); ?></label>
                                    <div class="col-sm-3">
                                        <?php echo $this->formElement($form->get('paymentOrderSmsTemplateId')); ?>
                                        <?php echo $this->formElementErrors($form->get('paymentOrderSmsTemplateId'), ['class'=>'error-message']); ?>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><?php echo $this->translate('订单发货模板ID'); ?></label>
                                    <div class="col-sm-3">
                                        <?php echo $this->formElement($form->get('shipOrderSmsTemplateId')); ?>
                                        <?php echo $this->formElementErrors($form->get('shipOrderSmsTemplateId'), ['class'=>'error-message']); ?>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><?php echo $this->translate('订单收货模板ID'); ?></label>
                                    <div class="col-sm-3">
                                        <?php echo $this->formElement($form->get('receiptOrderSmsTemplateId')); ?>
                                        <?php echo $this->formElementErrors($form->get('receiptOrderSmsTemplateId'), ['class'=>'error-message']); ?>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><?php echo $this->translate('订单取消模板ID'); ?></label>
                                    <div class="col-sm-3">
                                        <?php echo $this->formElement($form->get('cancelOrderSmsTemplateId')); ?>
                                        <?php echo $this->formElementErrors($form->get('cancelOrderSmsTemplateId'), ['class'=>'error-message']); ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="tab_3">
                            <div class="box-body">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><?php echo $this->translate('验证码模板ID'); ?></label>
                                    <div class="col-sm-3">
                                        <?php echo $this->formElement($form->get('captchaSmsTemplateId')); ?>
                                        <?php echo $this->formElementErrors($form->get('captchaSmsTemplateId'), ['class'=>'error-message']); ?>
                                    </div>
                                    <p class="form-control-static">
                                        <?php if($this->smsConfig['sms_service_provider'] == 'aliSms') { ?>${code} 验证码<?php } ?>
                                        <?php if($this->smsConfig['sms_service_provider'] == 'tencentSms') { ?>{1} 验证码<?php } ?>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <?php echo $this->form()->closeTag(); ?>
</div>