ap_form.html 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. {include file="public/header" /}
  2. <div class="page">
  3. <form id="link_form" enctype="multipart/form-data" method="post">
  4. <table class="ds-default-table">
  5. <tbody>
  6. <tr class="noborder">
  7. <td class="required"><label class="validation" for="ap_name">{$Think.lang.ap_name}:</label></td>
  8. <td class="vatop rowform"><input type="text" name="ap_name" id="ap_name" class="txt" value="{$ap.ap_name|default=''}">
  9. </td>
  10. <td class="vatop tips"></td>
  11. </tr>
  12. <tr class="noborder">
  13. <td class="required w120">{$Think.lang.ap_isuse}:</td>
  14. <td class="vatop rowform">
  15. <div class="onoff">
  16. <label for="ap_isuse1" class="cb-enable {if condition="$ap.ap_isuse eq 1"}selected{/if}">{$Think.lang.ap_use_s}</label>
  17. <label for="ap_isuse0" class="cb-disable {if condition="$ap.ap_isuse eq 0"}selected{/if}">{$Think.lang.ap_not_use_s}</label>
  18. <input id="ap_isuse1" name="ap_isuse" value="1" type="radio" {if condition="$ap.ap_isuse eq 1"} checked="checked"{/if} />
  19. <input id="ap_isuse0" name="ap_isuse" value="0" type="radio" {if condition="$ap.ap_isuse eq 0"} checked="checked"{/if} />
  20. </div>
  21. </td>
  22. <td class="vatop tips"></td>
  23. </tr>
  24. <tr class="noborder">
  25. <td class="required"><label class="validation" for="ap_width">{$Think.lang.ap_width}:</label></td>
  26. <td class="vatop rowform"><input type="text" name="ap_width" class="txt" id="ap_width" value="{$ap.ap_width|default=''}"></td>
  27. <td class="vatop tips">{$Think.lang.adv_pix}</td>
  28. </tr>
  29. <tr class="noborder">
  30. <td class="required"><label class="validation" for="ap_height">{$Think.lang.ap_height}:</label></td>
  31. <td class="vatop rowform"><input type="text" name="ap_height" class="txt" id="ap_height" value="{$ap.ap_height|default=''}"></td>
  32. <td class="vatop tips">{$Think.lang.adv_pix}</td>
  33. </tr>
  34. </tbody>
  35. <tfoot>
  36. <tr class="tfoot">
  37. <td colspan="15" ><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
  38. </tr>
  39. </tfoot>
  40. </table>
  41. </form>
  42. </div>
  43. <script>
  44. $(document).ready(function () {
  45. $('#link_form').validate({
  46. errorPlacement: function (error, element) {
  47. error.appendTo(element.parent().parent().find('td:last'));
  48. },
  49. rules: {
  50. ap_name: {
  51. required: true
  52. },
  53. ap_width: {
  54. required: true,
  55. number:true
  56. },
  57. ap_height: {
  58. required: true,
  59. number:true
  60. }
  61. },
  62. messages: {
  63. ap_name: {
  64. required: '{$Think.lang.ap_can_not_null}'
  65. },
  66. ap_width: {
  67. required: '{$Think.lang.ap_input_digits_pixel}',
  68. number:'{$Think.lang.ds_sort_number}'
  69. },
  70. ap_height: {
  71. required: '{$Think.lang.ap_input_digits_pixel}',
  72. number:'{$Think.lang.ds_sort_number}'
  73. }
  74. }
  75. });
  76. });
  77. </script>