You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
3.2 KiB

  1. @extends('admin.layouts.app')
  2. @section('title', '菜单修改')
  3. @section('content')
  4. <h5 class="sub-header"><a href="/fladmin/weixinmenu">菜单管理</a> > 菜单修改</h5>
  5. <form method="post" action="/fladmin/weixinmenu/doedit" role="form" id="addcat" class="table-responsive">{{ csrf_field() }}
  6. <table class="table table-striped table-bordered">
  7. <tbody>
  8. <tr>
  9. <td align="right">名称:</td>
  10. <td><input name="name" type="text" value="<?php echo $post["name"]; ?>" id="name" size="30" class="required"><input style="display:none;" type="text" name="id" id="id" value="<?php echo $id; ?>"></td>
  11. </tr>
  12. <tr>
  13. <td align="right">菜单的响应动作类型:</td>
  14. <td><input name="type" type="text" value="<?php echo $post["type"]; ?>" id="type" style="width:30%"> <small>(view表示网页,click表示点击,miniprogram表示小程序)</small></td>
  15. </tr>
  16. <tr>
  17. <td align="right">菜单KEY值:</td>
  18. <td><input name="key" id="key" type="text" value="<?php echo $post["key"]; ?>" size="30"> <small>(click等点击类型必须)</small></td>
  19. </tr>
  20. <tr>
  21. <td align="right">网页链接:</td>
  22. <td><input name="url" id="url" type="text" value="<?php echo $post["url"]; ?>" size="50"> <small>(view、miniprogram类型必须)</small></td>
  23. </tr>
  24. <tr>
  25. <td align="right">media_id:</td>
  26. <td><input name="media_id" type="text" style="width:70%" id="media_id" class="alltxt" value="<?php echo $post["media_id"]; ?>"></td>
  27. </tr>
  28. <tr>
  29. <td align="right">appid:</td>
  30. <td><input name="appid" type="text" style="width:50%" id="appid" class="alltxt" value="<?php echo $post["appid"]; ?>"></td>
  31. </tr>
  32. <tr>
  33. <td align="right">pagepath:</td>
  34. <td><input name="pagepath" type="text" style="width:50%" id="pagepath" class="alltxt" value="<?php echo $post["pagepath"]; ?>"></td>
  35. </tr>
  36. <tr>
  37. <td align="right">是否显示:</td>
  38. <td>
  39. <input type="radio" value='0' name="is_show" <?php if(isset($post['is_show']) && $post['is_show']==0){echo 'checked';} ?> />&nbsp;是&nbsp;&nbsp;
  40. <input type="radio" value='1' name="is_show" <?php if(isset($post['is_show']) && $post['is_show']==1){echo 'checked';} ?> />&nbsp;否
  41. </td>
  42. </tr>
  43. <tr>
  44. <td colspan="2"><input type="submit" class="btn btn-success" value="保存(Submit)">&nbsp;&nbsp;<input type="reset" class="btn btn-default" value="重置(Reset)"></td>
  45. </tr>
  46. </tbody>
  47. </table>
  48. </form><!-- 表单结束 -->
  49. <script>
  50. $(function(){
  51. $(".required").blur(function(){
  52. var $parent = $(this).parent();
  53. $parent.find(".formtips").remove();
  54. if(this.value=="")
  55. {
  56. $parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>');
  57. }
  58. else
  59. {
  60. $parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>');
  61. }
  62. });
  63. //重置
  64. $('#addcat input[type="reset"]').click(function(){
  65. $(".formtips").remove();
  66. });
  67. });
  68. $('#addcat input[type="submit"]').click(function(){
  69. $(".required").trigger('blur');
  70. var numError = $('#addcat .onError').length;
  71. if(numError){
  72. return false;
  73. }
  74. });
  75. </script>
  76. @endsection