addupd.blade.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. @extends('admin.frame_form')
  2. @if (!isset($advertise))
  3. @section('action', '添加')
  4. @else
  5. @section('action', '编辑')
  6. @endif
  7. @section('who', '广告位')
  8. @section('enctype', 'multipart/form-data')
  9. @section('form_menu')
  10. <div class="btn-add">
  11. <a href="{{ route('adv', ['tpid' => $advertiseType->id]) }}">返回</a>
  12. <a>种类:{{ $advertiseType->name }}</a>
  13. </div>
  14. @stop
  15. @section('form_content')
  16. <tr>
  17. <td class="txt-right width-30p"><i>*</i>广告位中文名称:</td>
  18. <td class="txt-left">
  19. <input type="text" maxlength="50" placeholder="请输入小于50个字符" name="name" value="{{ old('name') ? old('name') : (isset($advertise->name) ? $advertise->name : '') }}" required="required" />
  20. &nbsp;&nbsp;&nbsp;
  21. <span class="red">{{ $errors->first('name') }}</span>
  22. </td>
  23. </tr>
  24. <tr>
  25. <td class="txt-right"><i>*</i>排序:</td>
  26. <td class="txt-left">
  27. <input type="number" min="1" max="50" name="sort" value="{{ old('sort') ? old('sort') : (isset($advertise->sort) ? $advertise->sort : '') }}" required="required" />
  28. &nbsp;&nbsp;&nbsp;
  29. <span class="red">{{ $errors->first('sort') }}</span>
  30. </td>
  31. </tr>
  32. <tr>
  33. <td class="txt-right">
  34. <i>*</i>广告位图片:
  35. @if ($advertiseType->width && $advertiseType->height)
  36. <p class="red">({{ $advertiseType->width }} x {{ $advertiseType->height }})&nbsp;</p>
  37. @endif
  38. </td>
  39. <td class="txt-left">
  40. @if (isset($advertise))
  41. <img src="{{ asset($advertise->image) }}" style="width: 500px;" />
  42. </br></br>
  43. @include('admin.upload_image', ['action' => '更换', 'name' => 'image'])
  44. @else
  45. @include('admin.upload_image', ['action' => '上传', 'name' => 'image'])
  46. @endif
  47. </td>
  48. </tr>
  49. <tr>
  50. <td class="txt-right">图片链接:</td>
  51. <td class="txt-left">
  52. <textarea rows="2" cols="60" maxlength="255" placeholder="请输入小于255个字符" name="href" >{{ old('href') ? old('href') : (isset($advertise->href) ? $advertise->href : '') }}</textarea>
  53. &nbsp;&nbsp;&nbsp;
  54. <span class="red">{{ $errors->first('href') }}</span>
  55. </td>
  56. </tr>
  57. @stop