#@ucenter_layout()

#define script()
<script>

    $(document).ready(function () {
        $("[name='paytype']:first").attr("checked", "checked");
    });

    function ok(data) {
        if (isMobileBrowser()) {
            location.href = data.gotoUrl;
        } else {
            window.open(data.gotoUrl, '_blank')
        }
    }

</script>
#end


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

    <section class="content-header">
        <h1>
            充值
            <small>Recharge</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>
                    <!-- /.box-header -->
                    <!-- form start -->
                    <form class="form-horizontal autoAjaxSubmit" autocomplete="off"
                          action="#(CPATH)/ucenter/finance/amount/recharging"
                          method="post"
                          data-ok-function="ok"
                    >
                        <div class="box-body ">

                            <div class="form-group">
                                <label class="col-sm-2 control-label">充值账号</label>
                                <div class="col-sm-7">
                                    <input type="input" class="form-control" value="#(USER.username ??)" readonly>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">充值金额</label>
                                <div class="col-sm-7">
                                    <input type="input" class="form-control" placeholder="请输入充值金额...."
                                           value="" name="recharge_amount">
                                    <p class="help-block">
                                        单位：元，最低充值不能低于 10 元。
                                    </p>
                                </div>
                            </div>


                            <h4 class="page-header">充值方式</h4>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">支付类型</label>

                                <div class="col-sm-7">

                                    #if(wechatxConfig.isEnable())
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="paytype" value="wechatx">
                                            微信转账
                                        </label>
                                    </div>
                                    #end

                                    #if(alipayxConfig.isEnable())
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="paytype" value="alipayx">
                                            支付宝转账
                                        </label>
                                    </div>
                                    #end

                                    #if(wechatConfig.isEnable())
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="paytype" value="wechat">
                                            微信支付
                                        </label>
                                    </div>
                                    #end

                                    #if(alipayConfig.isEnable())
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="paytype" value="alipay">
                                            支付宝支付
                                        </label>
                                    </div>
                                    #end

                                    #if(paypalConfig.isEnable())
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="paytype" value="paypal">
                                            Paypal支付
                                        </label>
                                    </div>
                                    #end

                                </div>
                            </div>


                        </div>

                        <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>
                    </form>
                </div>
            </div>

        </div>

    </section>

</div>
#end
