##formatter.TextRender() ##include(Defaults) ##local.define(pageDone)0 ##if sessioncfg.SSOLOGIN.Enable ##if valueMap.Authenticated ##else ##local.define(pageDone)1 ##if request.security(on) ##local.defineByRender(SSOReturnURL)##sessioncfg.ZONES.SecureHostRoot ##else ##local.defineByRender(SSOReturnURL)##sessioncfg.ZONES.NonHTTPSHostRoot ##endif ##local.defineByRender(tmp)APS_ZONES?fn=MakeReservation&no=##valueMap.SequenceNo ##local.defineByRender(SSOHREF)##local.urlencode(tmp) ##local.defineByRender(SSORETURN)##local.urlencode(SSOReturnURL) ##local.define(Title) ##local.define(PageBodyStyle) ##local.define(PageHeaderScripts) ##local.define(Content) ##include(FrameBody) ##endif ##endif ##if local.isEqual(pageDone,0) ##formatter.TextRender() ##local.define(PageHeaderScripts) ##local.defineByRender(AllowDateChange)##sessioncfg.DB.Config.Circ.AllowSpecifyReservationExpiry ##if local.IsEqual(AllowDateChange,0) ##else ##endif ##local.define(SuppressLoginHelp)1 ##local.define(SuppressLoginForgotPin)1 ##local.define(LoginFormRowTemplate)
##local.define(SecurityOK)1 ##if sessioncfg.ZONES.SelfService.RequireSSL ##if request.Security(Off) ##local.define(SecurityOK)1 ##else ##local.define(SecurityOK)1 ##endif ##else ##local.define(SecurityOK)1 ##endif ##this.stylesetforform ##if local.IsEqual(SecurityOK,"1") ##local.FormFields ##if local.IsEqual(PinFieldOnly,1) ##else ##endif
##if request.IsEqual("IsCardLogin","1") ##request.UserCard ##else ##endif ##if local.SuppressLoginHelp   ##else ##leg.Portal3.Login.Help ##endif
##if local.SuppressLoginForgotPin ##else ##if sessioncfg.ZONES.SelfService.ForgotPIN ##leg.ZONESOPAC.ForgotPassword.Link ##else   ##endif ##endif
 
##local.Define(ButtonCaption)##leg.Portal3.Login.Submit /*##leg.ZONESOPAC.Forms.Login.LoginSubmitButton*/ ##local.Define(ButtonTip)##leg.ZONESOPAC.Forms.Login.LoginSubmitButtonTIP ##local.Define(ButtonID)buttonLoginSubmit ##local.SubmitButtonFMT     ##local.define(ButtonCaption)##leg.ZONESOPAC.Forms.Login.ClearLoginForm ##local.define(ButtonTip)##leg.ZONESOPAC.Forms.Login.ClearLoginFormTIP ##local.define(ButtonHref)javascript:resetForm() ##local.define(ButtonID)buttonLoginhClr ##local.ButtonFMT
##endif
##local.define(pageDone)0
/* TextRender */ ##if sessioncfg.SSOLOGIN.Enable ##if valueMap.Authenticated ##else ##local.define(pageDone)1 ##if request.security(on) ##local.defineByRender(SSOReturnURL)##sessioncfg.ZONES.SecureHostRoot ##else ##local.defineByRender(SSOReturnURL)##sessioncfg.ZONES.NonHTTPSHostRoot ##endif ##local.defineByRender(tmp)APS_ZONES?fn=MakeReservation&no=##valueMap.SequenceNo ##local.defineByRender(SSOHREF)##local.urlencode(tmp) ##local.defineByRender(SSORETURN)##local.urlencode(SSOReturnURL) ##local.define(Title) ##local.define(PageBodyStyle) ##local.define(Content) ##include(FrameBody) ##local.define(pageDone)1 ##endif ##endif ##if local.isEqual(pageDone,0) ##if valueMap.__ErrorResponse ##local.define(HandledError)1 ##endif ##helpcontext.addHelp(Toolbar) ##if error.Level ##if error.IsEqual(ID,"Invalid password") ##local.define(BadPasswordError)1 ##local.define(HandledError)1 ##endif ##if error.IsEqual(ID,"Patron not found") ##local.define(BadPatronError)1 ##local.define(HandledError)1 ##endif ##endif ##if valueMap.IsInvalidPin ##local.define(BadPasswordError)1 ##endif ##if valueMap.IsInvalidBrwr ##local.define(BadPatronError)1 ##endif ##if valueMap.IsEqual(VolumeCount,1) ##else ##local.define(HaveChoices)1 ##endif ##if valueMap.IsEqual(BranchCount,1) ##else ##local.define(HaveChoices)1 ##endif ##if valueMap.GotBranch ##if valueMap.GotVolume ##local.define(MadeChoices)1 ##if valueMap.IsEqual(IsReservable,0) ##local.define(BadChoices)1 ##endif ##endif ##endif ##if valueMap.Authenticated ##if valueMap.IsEqual(BranchCount,0) ##local.define(BadItem)1 ##endif ##if local.HaveChoices ##else ##if local.BadChoices ##local.define(BadItem)1 ##endif ##endif ##endif ##if sessioncfg.DB.Config.Circ.Reservation.ShowQueuePosition ##local.define(ShowQueue)1 ##endif ##local.define(Advice) ##if local.BadItem ##leg.ZONESOPAC.MakeReservation.NoReservableStock ##helpcontext.addHelp(PReservationNoStock) ##else ##if valueMap.Done ##if valueMap.IsEqual(Result.ResultKnown,1) /* this is the P7 case where we know the result of the reserver operation */ ##if valueMap.IsEqual(Result.Result,1) ##helpcontext.addHelp(PReservationCompleteResultSuccessful) ##leg.ZONESOPAC.MakeReservation.PortfolioCompleteResultSuccess ##else ##helpcontext.addHelp(PReservationCompleteResultFailed) ##leg.ZONESOPAC.MakeReservation.PortfolioCompleteResultFail ##valueMap.QualData(Result.ResultMessage) ##endif ##else ##if valueMap.Success ##leg.ZONESOPAC.MakeReservation.PortfolioComplete ##helpcontext.addHelp(PReservationComplete) ##else ##leg.ZONESOPAC.MakeReservation.Aborted ##helpcontext.addHelp(PReservationDidNotComplete) ##endif ##endif ##else ##if valueMap.Authenticated ##if valueMap.IsEqual(AccountTrapLevel,Error) ##leg.ZONESOPAC.MakeReservation.Title.Advice ##else ##if local.MadeChoices ##if local.BadChoices ##leg.ZONESOPAC.MakeReservation.NoReservableStock ##helpcontext.addHelp(PReservationNoStock) ##else ##leg.ZONESOPAC.MakeReservation.WantConfirmation ##leg.ZONESOPAC.MakeReservation.ClickConfirmToContinue ##endif ##if local.HaveChoices ##leg.ZONESOPAC.MakeReservation.ClickBackToChangeSelections ##endif ##else ##if valueMap.IsEqual(VolumeCount,1) ##else ##helpcontext.addHelp(PReservationVolumeChoice) ##if valueMap.IsEqual(BranchCount,1) ##leg.ZONESOPAC.MakeReservation.YouHaveVolumeChoices ##else ##leg.ZONESOPAC.MakeReservation.YouHaveVolumeAndDeliveryBranchChoices ##endif ##endif ##if valueMap.IsEqual(BranchCount,1) ##else ##if valueMap.IsEqual(VolumeCount,1) ##helpcontext.addHelp(PReservationDeliveryChoice) ##leg.ZONESOPAC.MakeReservation.YouHaveDeliveryBranchChoices ##endif ##endif ##endif ##helpcontext.addHelp(PMakeReservation) ##endif ##else ##leg.ZONESOPAC.MakeReservation.ReservationLogin ##helpcontext.addHelp(PReservationAuthenticate) ##endif ##endif ##endif ##local.define(TopButtons) ##local.define(BottomButtons) ##local.define(Title) ##if valueMap.Done ##leg.ZONESOPAC.MakeReservation.Title.Complete ##else ##leg.ZONESOPAC.MakeReservation.Title.Make /* ##if request.Security(On) ( ##leg.ZONESOPAC.Security.Secure ) ##endif */ ##endif ##local.Define(AfterAuthenticationContent) ##if local.BadItem ##else ##if local.MadeChoices ##if local.BadChoices ##else ##if local.ShowQueue
##leg.Expand(ZONESOPAC.MakeReservation.QueueMessage,Position,##valueMap.QueueLength)
##endif ##local.define(GoForwardFormButton)1 ##endif ##endif
##this.stylesetforform ##if valueMap.GotVolume ##if valueMap.IsEqual(VolumeCount,1) ##else ##if valueMap.IsEqual(VolumeCount,0) ##else
##leg.ZONESOPAC.MakeReservation.SelectedVolume : ##valueMap.Volume
##endif ##endif ##else ##local.define(VolumeChoice)0 ##if valueMap.IsEqual(VolumeCount,0) ##else ##local.define(VolumeChoice)1 ##endif ##if local.IsEqual(VolumeChoice,"1")
##leg.ZONESOPAC.MakeReservation.VolumeChoice
##valueMap.With(Volumes,"Volumes") ##local.defineByRender(volCounter)0 ##Volumes.ForEachIn(Item,"")

##local.increment(volCounter)
##local.define(GoForwardFormButton)1
##endif ##else ##endif
##if valueMap.GotBranch ##if valueMap.IsEqual(BranchCount,1) ##leg.ZONESOPAC.MakeReservation.DeliveryBranch ##else ##leg.ZONESOPAC.MakeReservation.SelectedDeliveryBranch ##endif : ##if valueMap.BranchInfo.branch_code ##valueMap.QualData(BranchInfo.description) ##else ##valueMap.Branch ##endif ##else ##leg.ZONESOPAC.MakeReservation.DeliveryBranchChoice /* */
/*##valueMap.Dump()*/ ##valueMap.With(Branches,"Branches")
##local.defineByRender(branchCount)0 ##Branches.ForEachIn(Item,"")
##if Item.IsDefined(branch_code) /* this is the new localised structure */ ##if sessioncfg.DB.Config.Circ.Reservation.ShowCopyAndReservation ##local.define(IsBrackets)0 ##if Item.IsEmpty(no_copies) ##else ##local.define(IsBrackets)1 ##endif ##if Item.IsEmpty(rank) ##else ##local.define(IsBrackets)1 ##endif ##if Item.IsGreater(no_copies,0) ##if local.IsEqual(IsBrackets,1) ( ##endif ##if Item.IsEmpty(no_copies) ##else ##if Item.IsGreater(no_copies,1) ##Item.no_copies ##leg.ZONESOPAC.MakeReservation.MultiAvailDocument ##else ##Item.no_copies ##leg.ZONESOPAC.MakeReservation.SingleAvailDocument ##endif ##if Item.IsEmpty(rank) ##else - ##endif ##endif ##if Item.IsEmpty(rank) ##else ##leg.ZONESOPAC.MakeReservation.ReservRank: ##Item.rank ##endif ##if local.IsEqual(IsBrackets,1) ) ##endif ##endif ##endif ##else ##endif

##local.increment(branchCount)
##leg.ZONESOPAC.MakeReservation.PickExpiry / /
##local.define(GoForwardFormButton)1 ##endif
##if local.MadeChoices ##endif
##if local.HaveChoices ##if local.MadeChoices
##this.stylesetforform
##local.define(GoBackFormButton)1 ##endif ##endif
##if local.GoBackFormButton ##local.define(ButtonCaption)##leg.Expand(ZONESOPAC.Forms.Buttons.Back) ##local.define(ButtonTip)##leg.Expand(ZONESOPAC.Forms.Buttons.BackTIP) ##local.define(ButtonHref)javascript:goBackward() ##local.define(ButtonID)buttonPrevStep ##local.ButtonFMT ##endif ##if local.GoForwardFormButton ##if local.BadChoices ##else ##local.Define(ButtonCaption)##leg.Expand(ZONESOPAC.Forms.Buttons.Confirm) ##local.Define(ButtonTip)##leg.Expand(ZONESOPAC.Forms.Buttons.ConfirmTIP) ##local.Define(ButtonID)buttonNextStep ##local.define(ButtonHref)javascript:goForward() ##local.ButtonFMT ##endif ##endif
##endif
##local.define(AccountTrapInfo) ##local.define(FieldTemplate) ##local.Value ##if valueMap.IsEqual(AccountTrapLevel,Error) ##local.define(Name)  ##local.define(Value) ##sessioncfg.MapLegendThroughTable(AccountTrapError,"DB.Config.ZONESERVICES.ErrorMessageMap")

##valueMap.foreachIn(trap,AccountTraps) ##local.defineByRender(ErrorText)##sessioncfg.MapLegendThroughTable(##trap.trapID,"DB.Config.ZONESERVICES.ErrorMessageMap") ##if local.IsEqual(ErrorText,"") ##local.define(ErrorText)##trap.trapID ##endif ##if local.IsEqual(ErrorText,"Hide") ##else ##local.ErrorText
##endif


##local.FieldTemplate ##endif ##if valueMap.IsEqual(AccountTrapLevel,Warning) ##local.define(Name)  ##local.define(Value) ##sessioncfg.MapLegendThroughTable(AccountTrapWarning,"DB.Config.ZONESERVICES.ErrorMessageMap")

##valueMap.foreachIn(trap,AccountTraps) ##local.defineByRender(ErrorText)##sessioncfg.MapLegendThroughTable(##trap.trapID,"DB.Config.ZONESERVICES.ErrorMessageMap") ##if local.IsEqual(ErrorText,"") ##local.define(ErrorText)##trap.trapID ##endif ##if local.IsEqual(ErrorText,"Hide") ##else ##local.ErrorText
##endif
##local.FieldTemplate ##endif
##local.define(MainContent) ##if valueMap.Done ##if valueMap.IsEqual(Result.ResultKnown,1) /* this is the P7 case where we know the result of the reserver operation */ ##if valueMap.IsEqual(Result.Result,1) ##leg.ZONESOPAC.MakeReservation.PortfolioCompleteDetailResultSuccess ##else ##leg.ZONESOPAC.MakeReservation.PortfolioCompleteDetailResultFail ##valueMap.QualData(Result.ResultMessage) ##endif ##else ##if valueMap.Success ##leg.ZONESOPAC.MakeReservation.PortfolioCompleteDetail ##endif ##endif ##endif
##local.Define(RoundBoxContent) ##valueMap.With(SE,"SE") ##if valueMap.IsEqual("SerialCopyNumber","") ##local.define(PLISGeneralBibSummaryExtraInfo) ##else ##local.define(PLISGeneralBibSummaryExtraInfo)      ##valueMap.SerialCopyDetails.issue_desc ##endif ##local.PLISGeneralBibSummaryTable /* serial copy related information here if it's available */ /*##valueMap.Dump()*/ ##local.RoundBoxContent ##local.Advice
##if valueMap.Done ##else ##if valueMap.Authenticated ##if valueMap.IsEqual(AccountTrapLevel,Error) ##local.AccountTrapInfo ##else ##local.AfterAuthenticationContent ##endif ##else ##local.define(FormFields) ##if local.ShowQueue ##endif ##local.define(FormBorrowerDefault)##valueMap.BRWR ##local.LoginFormRowTemplate ##if local.BadPatronError ##local.define(Value) ##leg.ZONESOPAC.MakeReservation.InvalidBorrower ##local.AlertRowTemplate ##endif ##if local.BadPasswordError ##local.define(Value) ##leg.ZONESOPAC.MakeReservation.InvalidPIN ##local.AlertRowTemplate ##endif
##endif
##local.Define(Content)##local.MainContent ##include(Body) ##endif ##endif