How to add a note to the LoanPeriod field in the IRFBook.html form

Print Friendly and PDF Follow

Product Ares
Version 4.7
Ticket 14465
KB Permissions Public

 

Question/Issue Sent to DevSupport

How can I add a note to the LoanPeriod field in the IRFBook.html form?

Answer

In order to be able to add a note to the LoanPeriod field, you have to change two things:

You have to change the HTML code in IRFBook.html (or other form) like this (in this example I left the original code, but commented it out. You can remove it.):

<!--custom code from Dev that lets you add a note to the loanperiod, but if you only have one pickuplocation it will not show the pickuplocation field-->
      <#OPTION name="PickupLocation" selectedValue="<#CUSTOMIZATION name='DefaultPickupSite'>" headerText="<label for='PickupLocation'><strong><span class='req'>*</span><span class='<#VALIDATION name=ERRORPickupLocation>'>Pickup Location for Physical Items</span></strong>" footerText="<br /></label>">

      <div id="LoanPeriodDiv">
          <#OPTION name="LoanPeriod" id="LoanPeriod" isSharedListItem="False" SitePeriods="True" headerText="<label for='LoanPeriod'><strong><span class='req'>*</span><span class='<#VALIDATION name='ERRORLoanPeriod'>'>Loan Period for Physical Items</span><br /><span class='note'>Physical items may be checked out from the reserve desk (above) for the time period you select here. Loan Period does not apply to electronic reserves.</span></strong>" footerText="<br /></label>">
      </div>

<!--original code for pickuplocation and loanperiod
      <#OPTION name="PickupLocation" selectedValue="<#CUSTOMIZATION name='DefaultPickupSite'>" headerText="<label for='PickupLocation'><strong><span class='<#VALIDATION name=ERRORPickupLocation>'>Pickup Location for Physical Items</span></strong>" footerText="<br /></label>">

      <div id="LoanPeriodDiv"><#OPTION name="LoanPeriod" isSharedListItem="False" SitePeriods="True" headerText="<label for='LoanPeriod'><#ERROR Name='ERRORLoanPeriod'><strong><span class='<#VALIDATION name='ERRORLoanPeriod'>'>Loan Period for Physical Items</span></strong>" footerText="<br /></label>"></div>
-->

And you also have to edit the defaultLoanPeriodControl in the aresajax.js file which is in the js folder, like this (this should be line 155 in the file):

var _defaultLoanPeriodControl = $('<label for="LoanPeriod"><strong><span class="req">*</span>Loan Period for Physical Items<br /><span class="note">Physical items may be checked out from the reserve desk (above) for the time period you select here. Loan Period does not apply to electronic reserves.</span></strong><select name="LoanPeriod" id="LoanPeriod"></select><br></label>'); 

 

Just to clarify: if all you want to do is add a note, then you only need to add the <span class='note'>(insert note here)</span> attributes to the LoanPeriod option in IRFBook.html and the _defaultLoanPeriodControl in the aresajax.js file.

The <span class='req'>*</span> attribute was added to the PickupLocation and LoanPeriod options in the example above to add the red asterisks (indicating it is required) to the labels, but aren't needed if all you really want to do is add a note.

Questions?

If this article didn’t resolve your issue, please contact Atlas Support for assistance:

Contact Support