@layout('layouts/dashboard')
@set('title', 'Create news')
@set('category', {
  1: 'News',
  2: 'Maintenance',
  3: 'Patchlist',
  4: 'Notes',
  5: 'Event'
})
@section('body')

<div class="grid-menu"> 
  @include('partials/dashboard/messages')
  <form method="POST" id="loginForm" action="{{ route('auth.admin.create.news') }}">
    {{  csrfField() }}
          <table class="table table-hover dataTable table-striped width-full" id="gaTable">
              <thead>
                  <tr>
                      <th style="text-align:center;" colspan="3">
                         <h2>News</h2>
                      </th>
                  </tr>
              </thead>
              <tbody>
                      <tr>
                          <td style="text-align:center;" colspan="3">
                              <span>
                                  <div id="emailTypeBlock">
                                      <div class="input-container">
                                          <div class="block" style="margin:10px;text-align:center;">
                                              <label style="display:block;text-align:center;margin:10px;">Category</label>
                                              <select  name="category">
                                                  <option style="color:black;" value="1">News</option>
                                                  <option style="color:black;" value="2">Maintenance</option>
                                                  <option style="color:black;" value="3">Patchlist</option>
                                                  <option style="color:black;" value="4">Notes</option>
                                                  <option style="color:black;" value="5">Event</option>
                                              </select>
                                              @if(flashMessages.has('errors.category'))
                                                <small class="text-danger">{{ flashMessages.get('errors.category') }}</small>
                                              @endif
                                          </div>
                                      </div>
                                  </div>
                              </span>
                          </td>
                      </tr>
                      <tr>
                          <td style="text-align:center;" colspan="3">
                              <span>
                                  <div id="emailTypeBlock">
                                      <div class="input-container">
                                          <label class="floating-label">Title</label>
                                          <input style="background-color: rgba(0, 0, 0, 0.4); border: none;" type="text" class="form-control empty" name="title" />
                                          @if(flashMessages.has('errors.title'))
                                            <small class="text-danger">{{ flashMessages.get('errors.title') }}</small>
                                          @endif
                                      </div>
                                  </div>
                              </span>
                          </td>
                      </tr>
                      <tr>
                          <td colspan="12">
                              <span>
                                  <div id="emailTypeBlock">
                                      <div class="input-container">
                                          <label class="floating-label">Content</label>
                                          <textarea style="background-color: rgba(0, 0, 0, 0.4); border: none;" type="text" class="form-control empty" name="content">
                                          </textarea>
                                          @if(flashMessages.has('errors.content'))
                                            <small class="text-danger">{{ flashMessages.get('errors.content') }}</small>
                                          @endif
                                      </div>
                                  </div>
                              </span>
                          </td>
                      </tr>
                      <tr>
                          <td style="text-align:center;" colspan="3">
                              <span>
                                  <div id="emailTypeBlock">
                                      <div class="input-container">
                                          <label class="floating-label">Thumb URL</label>
                                          <input style="background-color: rgba(0, 0, 0, 0.4); border: none;" type="text" class="form-control empty" name="thumbnail" />
                                          @if(flashMessages.has('errors.thumbnail'))
                                            <small class="text-danger">{{ flashMessages.get('errors.thumbnail') }}</small>
                                          @endif
                                      </div>
                                  </div>
                              </span>
                          </td>
                      </tr>


                      <tr>
                          <td colspan="3">
                              <div class="form-wrapper" style="border: none;text-align:center;">
                                  <button type="submit" class="btn-default">
                                      Publish
                                  </button>
                              </div>
                          </td>
                      </tr>
              </tbody>
          </table>
                  </form>
  </div>
@end
