{Overview} {UnlockLock} {SerialUnlock}
#IF(#OBJECT_EXISTS)

{InputError}

{ObjectExists}
#ELSIF(#FormError)

{InputError}

#IF(#FormErrors.Reason.TIME_OVERLAY) {TimeOverlay} #ELSE #LOOP(#FormErrors.Errors) #IF(#Reason EQ "INVALIDE_OCCURRENCE" OR (#Reason EQ "INTEGER_TOO_LARGE" AND #Name EQ "Occurrence")) {MaxOccurenceIs30}
#ELSIF(#FormErrors.Reason.TIME_OVERLAY) {TimeOverlay} #ELSIF(#Reason EQ "OCCURRENCE_LESS") {OccurenceTooSmall}
#REM #ENDREM #ENDIF #ENDLOOP {PleaseCorrectErrors} #ENDIF
#ENDIF #IF(#PERIODICAL_ADJUSTMENT)

{PeriodicalAdjustment}

{PeriodicalAdjustmentDescription}
#ENDIF #IF(#SERIAL_LOCK_SET)

{SerialLockSetOk}


#ENDIF #IF(NOT #BusinessHours.HasBookingPeriods AND NOT #Shop.Child.BusinessHours.HasBookingPeriods)

{Notification}

{NoBusinessHoursOrLockAvailable}

{EditBusinessHours}
{EditLocks}
#ENDIF #IF(#DELETE)

{Warning}

{AcceptAction}
#ENDIF
{NewAppointment} {SearchCancelledAppointment}
#Now[date]
#IF(NOT #FormError)

{Notification}

{UnlockLockInfo}

{ChangeBusinessHours}
#ENDIF
#WITH_ERROR(#FormError) #LOCAL("SiteLocale", #SITELOCALE(#INPUT.Locale)) #LOCAL("DayNames", #SiteLocale.Locale.DayNames) #ENDLOCAL #ENDLOCAL
{IsTwoWeeks}  
#LOOP(#DayNames) #ENDLOOP #LOOP(#FUNCTION("BusinessHourWeek", #Child.BusinessHours.Object, 0)) #ENDLOOP
#IF(#Child.BusinessHours.IsTwoWeeks){EvenWeek}#ENDIF#Abbreviation

{Morning}: {TimeFrom}

{TimeTo}

{Afternoon}: {TimeFrom}

{TimeTo}

#WITH_ERROR(#FormError) #WITH_ERROR(#FormError)

#ENDWITH_ERROR #ENDWITH_ERROR
#ENDWITH_ERROR
#IF(#Child.BusinessHours.HasOwnBookingPeriod) #ENDIF
#IF(NOT #FormError AND NOT #SERIAL_LOCK_SET)

{Notification}

{SerialUnlockInfo}

#ENDIF
#WITH_ERROR(#FormError) #LOCAL("StartDate", #StartDate) #IF(NOT #DEFINED(#StartDate))#SET("StartDate", #INPUT.StartDate)#ENDIF #IF(NOT #DEFINED(#StartDate))#SET("StartDate", #Now)#ENDIF #ENDLOCAL
{StartDate}
{End} #LOCAL("EndChoice", #EndChoice) #IF(NOT #DEFINED(#EndChoice))#SET("EndChoice", #INPUT.EndChoice)#ENDIF #IF(NOT #DEFINED(#EndChoice))#SET("EndChoice", "Occurence")#ENDIF #LOCAL("EndDate", #EndDate) #IF(NOT #DEFINED(#EndDate))#SET("EndDate", #INPUT.EndDate)#ENDIF #IF(NOT #DEFINED(#EndDate))#SET("EndDate", #Now)#ENDIF #ENDLOCAL #LOCAL("Occurrence", #Occurrence) #IF(NOT #DEFINED(#Occurrence))#SET("Occurrence", #INPUT.Occurrence)#ENDIF #IF(NOT #DEFINED(#Occurrence) OR #Occurrence == 0)#SET("Occurrence", 5)#ENDIF #ENDLOCAL #ENDLOCAL

{Interval} #LOCAL("Interval", #Interval) #IF(NOT #DEFINED(#Interval))#SET("Interval", #INPUT.Interval)#ENDIF #IF(NOT #DEFINED(#Interval))#SET("Interval", "Weekly")#ENDIF #ENDLOCAL #LOCAL("OpenMorning", #OpenMorning) #ENDLOCAL #LOCAL("CloseMorning", #CloseMorning) #ENDLOCAL #LOCAL("OpenAfternoon", #OpenAfternoon) #ENDLOCAL #LOCAL("CloseAfternoon", #CloseAfternoon) #ENDLOCAL
{Morning}: {TimeFrom}
{TimeTo}
{Afternoon}: {TimeFrom}
{TimeTo}
#ENDWITH_ERROR