edit.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <form id="form" action="{:url('popupshop/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>
  7. <th>分类属性:</th>
  8. <td>
  9. <select datatype="*" class="select w100 fn-left" name="types">
  10. <option value="0"{if $info.types == 0} selected{/if}>默认属性</option>
  11. <option value="1"{if $info.types == 1} selected{/if}>首页推荐</option>
  12. </select>
  13. </td>
  14. </tr>
  15. <tr><th>分类名称:</th><td><input class="input" datatype="*" type="text" name="title" value="{$info.title}" /></td></tr>
  16. <tr><th>分类别名:</th><td><input class="input" datatype="*" type="text" name="name" value="{$info.name}" /></td></tr>
  17. <tr><th>图片样式</th><td><div class="img-review fn-cp">{if $info.picture}<img src="{$info.picture}">{else /}<img src="__PUBLIC__/admin/review.png">{/if}</div></td></tr>
  18. <tr><th>栏目排序:</th><td><input class="input" datatype="n" type="text" name="sort" value="{$info.sort}" /> <span class="gray fn-f12">数字越大越靠前</span></td>
  19. </tr>
  20. <tr>
  21. <th></th>
  22. <td>
  23. <input type="submit" value="确定" class="button button-blue submit" />
  24. <input type="reset" value="重置" class="button"/>
  25. </td>
  26. </tr>
  27. </table>
  28. </div>
  29. </form>
  30. <script type="text/javascript">
  31. Do('base','layer','form',function(){
  32. $('#form').isForm();
  33. $(".img-review").click(function(){openwin('{:url("system/passport.common/upload")}')});
  34. })
  35. //添加图片
  36. function setImg(show_src){
  37. $("#picture").val(show_src);
  38. $(".img-review").html('<img src="'+show_src+'">');
  39. }
  40. </script>