classify_add.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <include file="public@header"/>
  2. </head>
  3. <body>
  4. <div class="wrap">
  5. <ul class="nav nav-tabs">
  6. <li ><a href="{:url('Music/classify')}">音乐分类</a></li>
  7. <li class="active"><a >添加</a></li>
  8. </ul>
  9. <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('Music/classify_add_post')}">
  10. <fieldset>
  11. <div class="form-group" >
  12. <label for="input-orderno" class="col-sm-2 control-label"><span class="form-required">*</span>排序号</label>
  13. <div class="col-md-6 col-sm-10">
  14. <input type="text"class="form-control" id="input-orderno" name="orderno" value=""><p class="help-block">填写正整数</p>
  15. </div>
  16. </div>
  17. <div class="form-group" >
  18. <label for="input-title" class="col-sm-2 control-label"><span class="form-required">*</span>分类标题</label>
  19. <div class="col-md-6 col-sm-10">
  20. <input type="text"class="form-control" id="input-title" name="title" value="" maxlength="7"> <p class="help-block">简洁明了</p>
  21. </div>
  22. </div>
  23. <div class="form-group">
  24. <label for="input-user_login" class="col-sm-2 control-label"><span class="form-required">*</span>分类图标</label>
  25. <div class="col-md-6 col-sm-10">
  26. <input type="hidden" name="img_url" id="thumbewm" value="">
  27. <a href="javascript:uploadOneImage('图片上传','#thumbewm');">
  28. <img src="__TMPL__/public/assets/images/default-thumbnail.png" id="thumbewm-preview" style="cursor: pointer;max-width:150px;max-height:150px;"/>
  29. </a>
  30. <input type="button" class="btn btn-sm btn-cancel-thumbewm" value="取消图片">
  31. <p class="help-block">建议尺寸100px*100px</p>
  32. </div>
  33. </div>
  34. </fieldset>
  35. <div class="form-group">
  36. <div class="col-sm-offset-2 col-sm-10">
  37. <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
  38. <a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
  39. </div>
  40. </div>
  41. </form>
  42. </div>
  43. <script src="__STATIC__/js/admin.js"></script>
  44. <script type="text/javascript">
  45. (function(){
  46. $('.btn-cancel-thumbewm').click(function () {
  47. $('#thumbewm-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
  48. $('#thumbewm').val('');
  49. });
  50. })()
  51. </script>
  52. </body>
  53. </html>