<form action="" name="addScheduleForm" ng-submit="doNext()" novalidate>
  <h4 class="bg-primary">Set your {{addMacro.button.name}} schedule</h4>
  <p>Select when this Entertainment event will happen.</p>

  <div class="radio">
    <label>
      <input type="radio" name="option" ng-model="scheduledEvent.option" value="0" checked>
      When manually selected by the user
    </label>
  </div>

  <div class="radio">
    <label>
      <input type="radio" name="option" ng-model="scheduledEvent.option" value="1">
      At a specific time and day
    </label>
  </div>

  <div class="margin-left-md" ng-if="scheduledEvent.option == 1">
    <div class="form-group">
      <label>Time:</label>

      <div>
        <select class="btn btn-default" name="hour" ng-model="scheduledEvent.hour" ng-options="value for value in scheduledEvent.hours" >  </select> :
        <select class="btn btn-default" name="minute" ng-model="scheduledEvent.minute" ng-options="value for value in scheduledEvent.minutes" >  </select>
        <select class="btn btn-default" name="ampm" ng-model="scheduledEvent.ampm" ng-options="value for value in ['AM', 'PM']" >  </select>
      </div>
    </div>

    <div class="form-group">
      <label>Day:</label>

      <div>
        <div class="checkbox schedule-event-day display-inline-block">
          <label>
            <input type="checkbox" ng-disabled="scheduledEvent.everyday" ng-model="scheduledEvent.day.sun" ng-true-value="1" ng-false-value="0"> Sunday
          </label>
        </div>
        <div class="checkbox schedule-event-day display-inline-block">
          <label>
            <input type="checkbox" ng-disabled="scheduledEvent.everyday" ng-model="scheduledEvent.day.mon" ng-true-value="2" ng-false-value="0"> Monday
          </label>
        </div>
        <div class="checkbox schedule-event-day display-inline-block">
          <label>
            <input type="checkbox" ng-disabled="scheduledEvent.everyday" ng-model="scheduledEvent.day.tue" ng-true-value="4" ng-false-value="0"> Tuesday
          </label>
        </div>
        <div class="checkbox schedule-event-day display-inline-block">
          <label>
            <input type="checkbox" ng-disabled="scheduledEvent.everyday" ng-model="scheduledEvent.day.wed" ng-true-value="8" ng-false-value="0"> Wednesday
          </label>
        </div>
        <div class="checkbox schedule-event-day display-inline-block">
          <label>
            <input type="checkbox" ng-disabled="scheduledEvent.everyday" ng-model="scheduledEvent.day.thu" ng-true-value="16" ng-false-value="0"> Thursday
          </label>
        </div>
        <div class="checkbox schedule-event-day display-inline-block">
          <label>
            <input type="checkbox" ng-disabled="scheduledEvent.everyday" ng-model="scheduledEvent.day.fri" ng-true-value="32" ng-false-value="0"> Friday
          </label>
        </div>
        <div class="checkbox schedule-event-day display-inline-block">
          <label>
            <input type="checkbox" ng-disabled="scheduledEvent.everyday" ng-model="scheduledEvent.day.sat" ng-true-value="64" ng-false-value="0"> Saturday
          </label>
        </div>
        <div>Or</div>
        <div class="checkbox schedule-event-day display-inline-block">
          <label>
            <input type="checkbox" ng-model="scheduledEvent.everyday"> Every day
          </label>
        </div>
      </div>
    </div>
  </div>

  <div class="left-and-right">
    <button class="btn btn-primary btn-previous" ng-click="goBack()">Back</button>
    <button class="btn btn-primary btn-next" type="submit" ng-disabled="scheduledEvent.option == 1 && (scheduledEvent.day.sun == 0 && scheduledEvent.day.mon == 0 && scheduledEvent.day.tue == 0 && scheduledEvent.day.wed == 0 && scheduledEvent.day.thu == 0 && scheduledEvent.day.fri == 0 && scheduledEvent.day.sat == 0 && !scheduledEvent.everyday)">Next</button>
  </div>
</form>