alipay.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <div class="page-header">
  4. <h1>
  5. {$breadcrumb2}
  6. <small>
  7. <i class="icon-double-angle-right"></i>
  8. {$crumbs}
  9. </small>
  10. </h1>
  11. </div>
  12. <div class="row">
  13. <div class="col-xs-12">
  14. <form class="form-horizontal" id="validation-form" method="post" action='{$action}'>
  15. <input name="payment_id" type="hidden" value="{$config_array.id}" />
  16. <div class="form-group">
  17. <label class="col-sm-2 control-label no-padding-left"> * 支付宝账号 </label>
  18. <div class="col-sm-10">
  19. <div class="clearfix">
  20. <input type="hidden" name="config_name" value="alipay_service,alipay_account,alipay_key,alipay_partner" />
  21. <input type="hidden" name="alipay_service" value="create_direct_pay_by_user" />
  22. <input name="alipay_account" id="alipay_account" value="{$config_array.config.alipay_account|default=''}" class="col-xs-10 col-sm-5" type="text">
  23. </div>
  24. </div>
  25. </div>
  26. <div class="form-group">
  27. <label class="col-sm-2 control-label no-padding-left"> * 交易安全校验码(key) </label>
  28. <div class="col-sm-10">
  29. <div class="clearfix">
  30. <input name="alipay_key" id="alipay_key" class="col-xs-10 col-sm-5" value="{$config_array.config.alipay_key|default=''}" type="text">
  31. </div>
  32. </div>
  33. </div>
  34. <div class="form-group">
  35. <label class="col-sm-2 control-label no-padding-left"> * 合作者身份(partner ID) </label>
  36. <div class="col-sm-10">
  37. <div class="clearfix">
  38. <input name="alipay_partner" id="alipay_partner" class="col-xs-10 col-sm-5" value="{$config_array.config.alipay_partner|default=''}" type="text">
  39. </div>
  40. </div>
  41. </div>
  42. <div class="form-group">
  43. <label class="col-sm-2 control-label no-padding-left"> 站点状态</label>
  44. <div class="col-sm-10">
  45. <div class="clearfix">
  46. <label class="radio-inline"><input <?php if($config_array['payment_state'] == '1'){echo ' checked="checked"';} ?> type="radio" value="1" name="payment_state">开启</label>
  47. <label class="radio-inline"><input <?php if($config_array['payment_state'] == '0'){echo ' checked="checked"';} ?> type="radio" value="0" name="payment_state">关闭</label>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="form-group">
  52. <label class="col-sm-1 control-label no-padding-left"> </label>
  53. <div class="col-sm-11">
  54. <input name="send" type="submit" value="提交" class="btn btn-primary" />
  55. </div>
  56. </div>
  57. </form>
  58. </div>
  59. </div>
  60. </block>
  61. <block name="javascript">
  62. <script src="__JS__/jquery.validate.min.js"></script>
  63. <script>
  64. $(function(){
  65. $('#validation-form').validate({
  66. errorElement: 'div',
  67. errorClass: 'help-block',
  68. focusInvalid: false,
  69. rules: {
  70. name: {
  71. required: true,
  72. minlength: 2
  73. }
  74. },
  75. messages: {
  76. name: {
  77. required: "必填",
  78. minlength: "不得少于2个字"
  79. }
  80. },
  81. invalidHandler: function (event, validator) { //display error alert on form submit
  82. $('.alert-danger', $('.login-form')).show();
  83. },
  84. highlight: function (e) {
  85. $(e).closest('.form-group').removeClass('has-info').addClass('has-error');
  86. },
  87. success: function (e) {
  88. $(e).closest('.form-group').removeClass('has-error').addClass('has-info');
  89. $(e).remove();
  90. },
  91. errorPlacement: function (error, element) {
  92. error.insertAfter(element.parent());
  93. },
  94. });
  95. });
  96. </script>
  97. </block>