@extends('admin.layout')

@section('content')

<?php
    if(!isset($data)) $data = array();
    if(!$data && session("data")){
        $data = session("data");
    }
    if(!$data && session('_old_input')){
        $data = session("_old_input");
    }
?>
<div class="wrapper wrapper-content animated fadeInRight">
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>账户列表</h5>
					<div class="ibox-tools">
						<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
						</a>
					</div>
				</div>
				<div class="ibox-content">
                    @if(role('User/Banks/index'))
				    <div class="row">
    					<div class="col-sm-3 pull-right">
    					   <a href="{{ U('User/Banks/index')}}" class="btn btn-sm btn-primary pull-right">返回列表</a>
    					</div>
					</div>
                    @endif

		            <div class="row">
                        <div class="col-lg-10">
                            <form name="form_product" id="form-validation" action="" class="form-horizontal form-validation" accept-charset="UTF-8" method="post">

                                    

                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">银行名称</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_bank_name" name="data[bank_name]" class="form-control" value="{{ $data['bank_name'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">帐号</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_bank_number" name="data[bank_number]" class="form-control" value="{{ $data['bank_number'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">银行卡手机号</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_bank_phone" name="data[bank_phone]" class="form-control" value="{{ $data['bank_phone'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">银行卡用户姓名</label>
                                    
                   <div class="col-sm-9">
                     <input id="data_bank_user" name="data[bank_user]" class="form-control" value="{{ $data['bank_user'] or ''}}" required="" aria-required="true"  placeholder=""> 
                    </div>
                                
                </div>    
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">二维码类型</label>
                                    
                   <div class="col-sm-9">
                       <select class="form-control" name="data[type]" id="">
                           <option  value=""></option>
                           <option value="支付宝"  {{!empty($data) && $data['type'] == '支付宝' ? 'selected' : '' }}>支付宝</option>
                           <option  value="微信" {{!empty($data) && $data['type'] == '微信' ? 'selected' : '' }}>微信</option>
                       </select>
                    </div>
                </div>
                <div class="form-group">
                                    
                 <label class="control-label col-sm-3">二维码</label>
                                    
                   <div class="col-sm-9">
                     {{--<input id="data_qrcode" name="data[qrcode]" class="form-control" value="{{ $data['qrcode'] or ''}}" required="" aria-required="true"  placeholder="">--}}
                       <img style="width: 20px; " src="{{ $data['qrcode'] or ''}}" alt="">
                    </div>
                </div>
                                
                                <div class="form-group">
                                    <label class="control-label col-sm-3">&nbsp;</label>
                                    <div class="col-sm-9">
                                        <input type="hidden" name="_referer" value="<?php echo urlencode(request()->server('HTTP_REFERER'));?>"/>
                                        <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>"/>
                                        <input type="submit" class="btn btn-success" style="margin-right:20px;">
                                        <input type="reset" class="btn btn-default" >
                                    </div>
                                </div>
        
                            </form>
                        </div>
                        <!-- /.col-lg-10 -->
                    </div>
                    <!-- /.row -->
				</div>
			</div>
		</div>
	</div>
</div>

@endsection