edit.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <form id="form" action="{:url('citys/cate/edit')}">
  2. <input type="hidden" name="id" value="{$info.id}"/>
  3. <input type="hidden" name="picture" value="{$info.picture}" id="picture" />
  4. <table class="formtable">
  5. <tr><th>分类名称:</th><td><input class="input" datatype="*" type="text" name="title" value="{$info.title}" /></td></tr>
  6. <tr><th>分类别名:</th><td><input class="input" datatype="*" type="text" name="name" value="{$info.name}" /></td></tr>
  7. <tr><th>拨打电话:</th><td><input class="input" datatype="npot" type="text" name="phone" value="{$info.phone}" /><span class="gray">拨打电话费用</span></td></tr>
  8. <tr><th>发布价格:</th><td><input class="input" datatype="npot" type="text" name="price" value="{$info.price}" /><span class="gray">发布信息费用</span></td></tr>
  9. <tr>
  10. <th>服务模板</th>
  11. <td class="input-group">
  12. <select class="select" name="tpl_id" datatype="n">
  13. <option value="0" {$!info.tpl_id?'selected':''}>默认模板</option>
  14. {foreach $tpl as $vo}<option value="{$vo.id}" {$vo.id == $info.tpl_id?'selected':''}>{$vo.name}</option>{/foreach}
  15. </select>
  16. </td>
  17. </tr>
  18. <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>
  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").win();
  35. })
  36. //添加图片
  37. function setImg(show_src){
  38. $("#picture").val(show_src);
  39. $(".img-review").html('<img src="'+show_src+'">');
  40. }
  41. </script>