edit.html 1.8 KB

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