Payment_edit.html 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <style>#nav{display:none;}</style>
  2. <form name="myform" id="myform" action="<if condition="$action_name=='add'">{:U($module_name.'/insert')}<else />{:U($module_name.'/update')}</if>" method="post">
  3. <fieldset><legend>{:L(basic_config)}</legend>
  4. <table cellpadding=0 cellspacing=0 class="table_form" width="100%">
  5. <tr>
  6. <td width="100">{:L(payment_mode)}:</td>
  7. <td>{$vo.pay_name}</td>
  8. </tr>
  9. <tr>
  10. <td width="120">{:L(name)}:</td>
  11. <td><input type="text" name="pay_name" value="{$vo.pay_name}" class="input-text" id="pay_name" validate="required:true,cn_username:true, minlength:2, maxlength:20" /></td>
  12. </tr>
  13. <tr>
  14. <td>{:L(description)}:</td>
  15. <td>
  16. {:$Form->editor(array('field'=>'pay_desc','setup'=>array('toolbar'=>'desc','flashupload'=>'0','height'=>'150')),$vo[pay_desc])}
  17. </td>
  18. </tr>
  19. <tr>
  20. <td width="120">{:L(listorder)}:</td>
  21. <td><input type="text" name="listorder" value="{$vo[listorder]|intval}" class="input-text" id="listorder" size="3" /></td>
  22. </tr>
  23. <tr>
  24. <td width="120">{:L(online)}:</td>
  25. <td>{if $vo.is_online}{:L(yes)}{else}{:L(no)}{/if}</td>
  26. </tr>
  27. <tr>
  28. <td width="120">{:L(pay_factorage)}:</td>
  29. <td id="pay_fee"><input name="pay_fee_type" value="0" type="radio" {if !$vo[pay_fee_type]}checked{/if}> {:L(pay_method_rate)}&nbsp;&nbsp;&nbsp;<input name="pay_fee_type" value="1" type="radio" {if $vo[pay_fee_type]}checked{/if}> {:L(pay_method_fix)}&nbsp;&nbsp;&nbsp; </td>
  30. </tr>
  31. <tr><td></td>
  32. <td>
  33. <div id="rate" {if $vo[pay_fee_type]}class="hidden"{/if}>
  34. {:L(pay_rate)}<input type="text" size="3" class="input-text" value="{$vo.pay_fee}" name="pay_rate">&nbsp;%&nbsp;&nbsp;&nbsp;&nbsp;{:L(pay_method_rate_desc)}</div>
  35. <div id="fix" {if !$vo[pay_fee_type]}class="hidden"{/if}>
  36. {:L(pay_fix)}<input type="text" name="pay_fix" class="input-text" size="3" value="{$vo.pay_fee}">&nbsp;&nbsp;&nbsp;&nbsp; {:L(pay_method_fix_desc)}</div>
  37. </td>
  38. </tr>
  39. </table>
  40. </fieldset>
  41. <fieldset><legend>{:L(parameter_config)}</legend>
  42. <table width="100%" class="table_form">
  43. <volist name="vo[config]" id="r">
  44. {if $r['type']=='text'}
  45. <tr>
  46. <td>{:L($r[name])}</td>
  47. <td>
  48. <input type="text" class="input-text" name="pay_config[{$r.name}]" id="{$r.name}" value="{$r.value}" size="40" />
  49. </td>
  50. </tr>
  51. {else}
  52. <tr>
  53. <td>{:L($r[name])}</td>
  54. <td>
  55. {:Form::select(array('field'=>'pay_config['.$r[name].']','options'=>$r[option]),$r[value])}
  56. </td>
  57. </tr>
  58. {/if}
  59. </volist>
  60. </table>
  61. </fieldset>
  62. <input type="hidden" name="isajax" value="1" />
  63. <input type="hidden" name="id" value="{$vo.id}" />
  64. <input type="hidden" name="pay_code" value={$vo.pay_code} />
  65. <input type="hidden" name="is_cod" value={$vo.is_cod} />
  66. <input type="hidden" name="is_online" value={$vo.is_online} />
  67. <input name="dosubmit" type="submit" value="1" class="hidden" id="dosubmit">
  68. </form>
  69. </div></div>
  70. <script>
  71. $(document).ready(function() {
  72. $("#pay_fee input[type='radio']").click( function () {
  73. if($(this).val()== 0){
  74. $("#rate").removeClass('hidden');
  75. $("#fix").addClass('hidden');
  76. $("#rate input").val('0');
  77. } else {
  78. $("#fix").removeClass('hidden');
  79. $("#rate").addClass('hidden');
  80. $("#fix input").val('0');
  81. }
  82. });
  83. });
  84. </script>