ap_form.html 3.5 KB

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