View file resources/views/photos/create.blade.php

File size: 1.87Kb
  1. @extends('layout')
  2.  
  3. @section('title', __('photos.create_photo'))
  4.  
  5. @section('breadcrumb')
  6. <nav>
  7. <ol class="breadcrumb">
  8. <li class="breadcrumb-item"><a href="/"><i class="fas fa-home"></i></a></li>
  9. <li class="breadcrumb-item"><a href="/photos">{{ __('index.photos') }}</a></li>
  10. <li class="breadcrumb-item active">{{ __('photos.create_photo') }}</li>
  11. </ol>
  12. </nav>
  13. @stop
  14.  
  15. @section('content')
  16. <div class="section-form mb-3 shadow">
  17. <form action="/photos/create" method="post" enctype="multipart/form-data">
  18. @csrf
  19. <div class="mb-3{{ hasError('title') }}">
  20. <label for="inputTitle" class="form-label">{{ __('photos.name') }}:</label>
  21. <input type="text" class="form-control" id="inputTitle" name="title" maxlength="50" value="{{ getInput('title') }}" required>
  22. <div class="invalid-feedback">{{ textError('title') }}</div>
  23. </div>
  24.  
  25. <div class="mb-3{{ hasError('text') }}">
  26. <label for="text" class="form-label">{{ __('photos.description') }}:</label>
  27. <textarea class="form-control markItUp" id="text" rows="5" name="text">{{ getInput('text') }}</textarea>
  28. <div class="invalid-feedback">{{ textError('text') }}</div>
  29. </div>
  30.  
  31. @include('app/_upload_image', ['files' => $files, 'type' => App\Models\Photo::$morphName])
  32.  
  33. <div class="form-check">
  34. <input type="hidden" value="0" name="closed">
  35. <input type="checkbox" class="form-check-input" value="1" name="closed" id="closed"{{ getInput('closed') ? ' checked' : '' }}>
  36. <label class="form-check-label" for="closed">{{ __('main.close_comments') }}</label>
  37. </div>
  38.  
  39. <button class="btn btn-success">{{ __('main.add') }}</button>
  40. </form>
  41. </div>
  42. @stop