{{-- Bulk-assign modal: template × staff × date range. --}}
<div class="modal-dialog" role="document">
  <div class="modal-content">
    <form class="medwf-form" action="{{ route('medwf.roster.bulk.store') }}" method="POST">
      {{ csrf_field() }}
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">@lang('medworkforce::lang.bulk_assign')</h4>
      </div>
      <div class="modal-body">
        <div class="form-group">
          <label>@lang('medworkforce::lang.shift_template') *</label>
          <select name="shift_template_id" class="form-control" required>
            @foreach($templates as $tmpl)
              <option value="{{ $tmpl->id }}">{{ $tmpl->name }} ({{ $tmpl->timeLabel() }})</option>
            @endforeach
          </select>
        </div>

        <div class="form-group">
          <label>@lang('medworkforce::lang.select_staff') *</label>
          <select name="user_ids[]" class="form-control" multiple size="6" required>
            @foreach($staff as $id => $name)
              <option value="{{ $id }}">{{ $name }}</option>
            @endforeach
          </select>
        </div>

        <div class="row">
          <div class="col-md-6 form-group">
            <label>@lang('medworkforce::lang.bulk_from') *</label>
            <input type="date" name="from" class="form-control" required value="{{ now()->toDateString() }}">
          </div>
          <div class="col-md-6 form-group">
            <label>@lang('medworkforce::lang.bulk_to') *</label>
            <input type="date" name="to" class="form-control" required value="{{ now()->addDays(6)->toDateString() }}">
          </div>
        </div>

        <div class="row">
          <div class="col-md-6 form-group">
            <label>@lang('medworkforce::lang.department')</label>
            <select name="department_id" class="form-control">
              <option value="">@lang('medworkforce::lang.none')</option>
              @foreach($departments as $id => $name)
                <option value="{{ $id }}">{{ $name }}</option>
              @endforeach
            </select>
          </div>
          <div class="col-md-6 form-group">
            <label>@lang('medworkforce::lang.location')</label>
            <select name="business_location_id" class="form-control">
              <option value="">@lang('medworkforce::lang.none')</option>
              @foreach($locations as $id => $name)
                <option value="{{ $id }}">{{ $name }}</option>
              @endforeach
            </select>
          </div>
        </div>

        <div class="checkbox">
          <label><input type="checkbox" name="skip_weekends" value="1"> @lang('medworkforce::lang.skip_weekends')</label>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">@lang('medworkforce::lang.cancel')</button>
        <button type="submit" class="btn btn-primary"><i class="fa fa-magic"></i> @lang('medworkforce::lang.bulk_assign')</button>
      </div>
    </form>
  </div>
</div>
