<div class="header_menu">
    <div class="container">
        <div class="header-nav clearfix">
            <?php echo $this->partial('shop/layout/headerMenu'); ?>
        </div>
    </div>
</div>
</div>
<div class="container breadcrumbs">
    <a href="<?php echo $this->url('shop'); ?>"><?php echo $this->translate('首页'); ?></a>
    <span class="sep">/</span><span><?php echo $this->translate('充值码充值'); ?></span>
</div>
<div class="container">
    <div class="uc-full-box">
        <div class="row">
            <div class="span4">
                <?php echo $this->partial('shop/partial/home/leftMenu'); ?>
            </div>
            <div class="span16">
                <div class="xm-line-box uc-box uc-order-detail-box">
                    <div class="box-hd">
                        <h3 class="title">
                            <?php echo $this->translate('充值码充值'); ?>
                        </h3>
                        <?php echo $this->partial('shop/partial/home/rechargeMenu'); ?>
                    </div>
                    <div class="box-bd">
                        <?php
                        $form = $this->form;
                        $form->prepare();

                        $form->setAttributes(['class' => 'form-horizontal']);
                        $form->get('rechargeCode')->setAttributes(['class' => 'form-control']);
                        ?>
                        <?php echo $this->form()->openTag($form); ?>
                        <?php echo $this->formElement($form->get('shopCsrf')); ?>
                        <?php echo $this->formElementErrors($form->get('shopCsrf'), ['class'=>'error-message']); ?>
                        <div class="control-group">
                            <label class="control-label"><?php echo $this->translate('充值码'); ?>：</label>
                            <div class="controls">
                                <?php echo $this->formElement($form->get('rechargeCode')); ?>
                                <?php echo $this->formElementErrors($form->get('rechargeCode'), ['class'=>'error-message']); ?>
                            </div>
                        </div>
                        <div class="offset3">
                            <button class="btn btn-primary" type="submit"><?php echo $this->translate('点击充值'); ?></button>
                        </div>
                        <?php echo $this->form()->closeTag(); ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function() {
        $("#<?php echo $form->getName(); ?>").validate({
            rules: {
                rechargeCode: {
                    required: true
                }
            },
            messages: {
                rechargeCode: {
                    required: "<?php echo $this->translate('请输入充值码!'); ?>"
                }
            }
        });
    });
</script>
