%form.form-modal(method="POST" action="#{absoluteUrl('service/startManual')}")
  .modal-header
    %button.close(type="button" data-dismiss="modal" aria-hidden="true")
      &times;
    %h3= t("Start a task manually")

  .modal-body
    %label=t('End time')
    %select#service-stop-time(name='stopTime')
      - $stopTime = new DateTime()
      - DateHelper::roundToNearestMinutes($stopTime, 30)
      - DateHelper::removeSeconds($stopTime)
      - for($i=1; $i<=48; $i++)
        - $stopTime->modify("+30 minutes")
        - $label = DateHelper::format($stopTime, "EEEE, HH:mm")
        %option(value="#{$stopTime->getTimestamp()}" selected=$i==24)= $label
      %option(value='-1')= t('Unlimited')
  .modal-footer
    %button.btn(type="button" data-dismiss="modal" aria-hidden="true")=Yii::t('app', 'Close')
    %input(type="hidden" name="gateGroupId" value="#{$gateGroup->ID}")
    %button.btn.btn-primary(type="submit")= t('Start task')
