<extend name="Public:base" />
<block name="content">
<div class="page-header">
		<h1>
			{$breadcrumb2}
			<small>
				<i class="icon-double-angle-right"></i>
				{$crumbs}
			</small>
		</h1>
	</div>
<div class="row">
	<div class="col-xs-12">	
		<form class="form-horizontal"  id="validation-form" method="post" action='{$action}'>
			
			
			<input name="payment_id" type="hidden" value="{$config_array.id}" />
		
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left"> * 支付宝账号 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input type="hidden" name="config_name" value="alipay_service,alipay_account,alipay_key,alipay_partner" />
          			<input type="hidden" name="alipay_service" value="create_direct_pay_by_user" />

					<input name="alipay_account" id="alipay_account" value="{$config_array.config.alipay_account|default=''}" class="col-xs-10 col-sm-5" type="text">
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left"> * 交易安全校验码（key） </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input name="alipay_key" id="alipay_key" class="col-xs-10 col-sm-5"  value="{$config_array.config.alipay_key|default=''}" type="text">
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left"> * 合作者身份（partner ID） </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input  name="alipay_partner" id="alipay_partner" class="col-xs-10 col-sm-5"  value="{$config_array.config.alipay_partner|default=''}" type="text">
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left"> 站点状态</label>
			<div class="col-sm-10">
				<div class="clearfix">					
						<label class="radio-inline"><input <?php if($config_array['payment_state'] == '1'){echo ' checked="checked"';} ?> type="radio" value="1" name="payment_state">开启</label>	
						<label class="radio-inline"><input <?php if($config_array['payment_state'] == '0'){echo ' checked="checked"';} ?> type="radio" value="0" name="payment_state">关闭</label>				
				</div>
			</div>
			</div>
			
			
			
			<div class="form-group">
				<label class="col-sm-1 control-label no-padding-left"> </label>	
				<div class="col-sm-11">
					<input name="send" type="submit" value="提交" class="btn btn-primary" />
				</div>
			</div>
		</form>
	</div>
</div>
</block>
<block name="javascript">
<script src="__JS__/jquery.validate.min.js"></script>	
<script>
$(function(){
	
	$('#validation-form').validate({
			errorElement: 'div',
			errorClass: 'help-block',
			focusInvalid: false,
			rules: {				
				name: {
					required: true,
					minlength: 2
				}				
			},
	
			messages: {
				
				name: {
					required: "必填",
					minlength: "不得少于2个字"
				}
				
			},
	
			invalidHandler: function (event, validator) { //display error alert on form submit   
				$('.alert-danger', $('.login-form')).show();
			},
	
			highlight: function (e) {
				$(e).closest('.form-group').removeClass('has-info').addClass('has-error');
			},
	
			success: function (e) {
				$(e).closest('.form-group').removeClass('has-error').addClass('has-info');
				$(e).remove();
			},
	
			errorPlacement: function (error, element) {
				 error.insertAfter(element.parent());
			},

		});
			
});
</script>							
</block>