add.html 1.5 KB

123456789101112131415161718192021222324252627282930
  1. <form id="form" action="{:url('category/add')}">
  2. <input type="hidden" name="parent_id" value="{$parent_id}"/>
  3. <input type="hidden" name="picture" value="" id="picture" />
  4. <table class="formtable">
  5. <tr><th>分类名称:</th><td><input class="input" datatype="*" type="text" name="title" /></td></tr>
  6. <tr><th>分类简介:</th><td><input class="input" type="text" name="name" /></td></tr>
  7. <tr><th>图片样式</th><td><div url="{:url('system/passport.common/upload')}" class="img-review fn-cp"><img src="__PUBLIC__/admin/review.png"></div></td></tr>
  8. {if $parent_id}<tr><th>单价:</th><td><input class="input" datatype="npot" type="text" name="price" value="0" /> <span class="red fn-f12">元/公斤</span></td></tr>{/if}
  9. <tr><th>栏目排序:</th><td><input class="input" datatype="n" type="text" name="sort" value="0" /> <span class="gray fn-f12">数字越大越靠前</span></td></tr>
  10. <tr>
  11. <th></th>
  12. <td>
  13. <input type="submit" value="确定" class="button button-blue submit" />
  14. <input type="reset" value="重置" class="button button-blank"/>
  15. </td>
  16. </tr>
  17. </table>
  18. </div>
  19. </form>
  20. <script type="text/javascript">
  21. Do('base','layer','form',function(){
  22. $('#form').isForm();
  23. $(".img-review").win();
  24. })
  25. //添加图片
  26. function setImg(show_src){
  27. $("#picture").val(show_src);
  28. $(".img-review").html('<img src="'+show_src+'">');
  29. }
  30. </script>