newsadd.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xiaofeng
  5. * Date: 2018/3/6
  6. * Time: 下午5:49
  7. */
  8. use backend\assets\AppAsset;
  9. AppAsset::addScript($this,Yii::$app->request->baseUrl.'/js/newscategory.js')
  10. ?>
  11. <form class="layui-form" action="" style="margin-top: 50px">
  12. <div class="layui-form-item">
  13. <label class="layui-form-label">资讯名称</label>
  14. <div class="layui-input-block" style="width: 300px;">
  15. <input type="text" name="news_name" required lay-verify="required" placeholder="请输入资讯名称" autocomplete="off" class="layui-input">
  16. </div>
  17. </div>
  18. <!-- <div class="layui-form-item">-->
  19. <!-- <label class="layui-form-label">单选框</label>-->
  20. <!-- <div class="layui-input-block">-->
  21. <!-- <input type="radio" name="recommend" value="1" title="不推荐" checked>-->
  22. <!-- <input type="radio" name="recommend" value="2" title="推荐" >-->
  23. <!-- </div>-->
  24. <!-- </div>-->
  25. <div class="layui-form-item xm_pr">
  26. <div class="layui-inline">
  27. <label class="layui-form-label">上传图片:</label>
  28. <div class="layui-inline">
  29. <div class="layui-upload">
  30. <div class="layui-upload-list lay_p_relative"> <!--低级添加 lay_p_relative-->
  31. <img class="layui-upload-img layui_magnify" name="img" src="" id="breviary_img" style="width:300px;height:90px; solid #ccc;">
  32. <p id="demoText"></p>
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. <button type="button" class="layui-btn layui-btn-primary xm_xcxqTc_button" id="test1">选择图片</button>
  38. </div>
  39. <div class="layui-form-item">
  40. <div class="layui-input-block">
  41. <button class="layui-btn" lay-submit lay-filter="addnews">立即提交</button>
  42. <button type="reset" class="layui-btn layui-btn-primary">重置</button>
  43. </div>
  44. </div>
  45. </form>