<div class="card">
  <div class="card-header">
    <h3 class="card-title">{{ trans('admin.notifications.send.title') }}</h3>
  </div>
  <form method="post" action="{{ url('/admin/notifications/send') }}">
    {{ csrf_field() }}
    <div class="card-body">
      {% if errors.any %}
        <div class="callout callout-danger">{{ errors.first }}</div>
      {% endif %}
      {% set sent_result = session_pull('sentResult') %}
      {% if sent_result %}
        <div class="callout callout-success">{{ sent_result }}</div>
      {% endif %}
      <div class="form-group">
        <label>{{ trans('admin.notifications.receiver.title') }}</label>
        <div class="radio">
        <label>
          <input type="radio" name="receiver" value="all" required>
          {{ trans('admin.notifications.receiver.all') }}
        </label>
        </div>
        <div class="radio">
          <label>
            <input type="radio" name="receiver" value="normal" required>
            {{ trans('admin.notifications.receiver.normal') }}
          </label>
        </div>
        <div class="radio">
          <label>
            <input type="radio" name="receiver" value="uid" required>
            {{ trans('admin.notifications.receiver.uid') }} &nbsp;
            <input type="number" name="uid" class="form-control">
          </label>
        </div>
        <div class="radio">
          <label>
            <input type="radio" name="receiver" value="email" required>
            {{ trans('admin.notifications.receiver.email') }} &nbsp;
            <input type="email" name="email" class="form-control">
          </label>
        </div>
      </div>
      <div class="form-group">
        <label>{{ trans('admin.notifications.title') }}</label>
        <input type="text" name="title" class="form-control" required>
      </div>
      <div class="form-group">
        <label>{{ trans('admin.notifications.content') }}</label>
        <textarea name="content" class="form-control" rows="3"></textarea>
      </div>
    </div>
    <div class="card-footer">
      <input
        type="submit"
        value="{{ trans('general.submit') }}"
        class="btn btn-primary"
      >
    </div>
  </form>
</div>
