edit.html 1.7 KB

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