{{-- Accounting-period create modal form. --}}
<div class="modal-dialog" role="document">
  <div class="modal-content">
    <form class="medacc-form" action="{{ route('medacc.periods.store') }}" method="POST">
      {{ csrf_field() }}
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">@lang('medaccounting::lang.add_period')</h4>
      </div>
      <div class="modal-body">
        <div class="form-group">
          <label>@lang('medaccounting::lang.period_name') *</label>
          <input type="text" name="name" class="form-control" required value="{{ $period->name }}" placeholder="2026-07">
        </div>
        <div class="row">
          <div class="col-md-6 form-group">
            <label>@lang('medaccounting::lang.start_date') *</label>
            <input type="date" name="start_date" class="form-control" required value="{{ $period->start_date }}">
          </div>
          <div class="col-md-6 form-group">
            <label>@lang('medaccounting::lang.end_date') *</label>
            <input type="date" name="end_date" class="form-control" required value="{{ $period->end_date }}">
          </div>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">@lang('medaccounting::lang.cancel')</button>
        <button type="submit" class="btn btn-primary">@lang('medaccounting::lang.save')</button>
      </div>
    </form>
  </div>
</div>
