Implementing a Photoduplication Toggle Option on Request Forms

Print Friendly and PDF Follow

Beginning with Aeon Server v5.2.4, additional web page configuration options are available to implement a photoduplication request toggle control on Aeon request forms, such as the EAD Request form (EADRequest.html) and the Archival Request form (ArchivalRequest.html) used with the ArchivesSpace Request Fulfillment plugin. The photoduplication toggle control will be configured for and used on ArchivalRequest.html by default but can also be configured on other web forms following the instructions in this article.

Minimum Requirements

You must be on Aeon Server v5.2.4 (at minimum) and Aeon default/feature-specific web pages v5.2.4 (at minimum) to use the configuration options in this article. 

Photoduplication Toggle Overview

Beginning with Aeon Server v5.2.4, the <#PHOTOTOGGLE> tag can be added to the HTML for Aeon web request forms to configure a photoduplication request toggle option on the form. The <#PHOTOTOGGLE> tag will display toggle options allowing the patron to choose between submitting either a reading room request or a photoduplication request from the request form when the photoduplication toggle is enabled in the Aeon Customization Manager. If the photoduplication toggle is not enabled in the Aeon Customization Manager, then the <#PHOTOTOGGLE> tag will only display the scheduled date or appointment scheduling fields (based on your web page configuration):

Photoduplication Toggle

Note: This image reflects the default toggle options when appointment scheduling fields are used on the Aeon web pages.

  • When a reading room request is selected with the Schedule Retrieval/Schedule Appointment toggle option, the form will display either the scheduled date or appointment scheduling fields, based on whether you have configured the default version of the include_photodup_toggle_enabled.html file using the scheduled date fields or the feature-specific version of the include_photodup_toggle_disabled.html file using the appointment scheduling fields in your web directory
  • When a photoduplication request is selected with the Request photoduplication option, the form will display the default fields used for photoduplication requests
  • The label text used for the toggle options, the heading text used for the relevant sections of the web form, and the fields displayed on the form when either a photoduplication or reading room request is selected are all customizable, following the instructions in the Customizing Content Displayed by the <#PHOTOTOGGLE> Tag section below

Enabling the Photoduplication Toggle in the Aeon Customization Manager

The <#PHOTOTOGGLE> tag is used in conjunction with the PhotoduplicationEnabled key in the Aeon Customization Manager (located under Web Interface | System) to display content on the web form. The <#PHOTOTOGGLE> tag will be used to display different content based on whether you have enabled the photoduplication toggle using the PhotoduplicationEnabled key:

When the PhotoduplicationEnabled key in the Aeon Customization Manager is set to Yes:

  • The <#PHOTOTOGGLE> tag will be used to display the contents of the include_photoduplication_toggle_enabled.html file on any request forms on which the <#PHOTOTOGGLE> tag has been configured. This file:
    • Displays the toggle controls that will allow users to choose between submitting either a reading room request or a photoduplication request from the request form
    • Displays the contents of either include_scheduled_date.html or include_appointment_info_no_site.html by default when a reading room request is selected from the toggle options

      The specific file used is based on whether you have configured the default version of the include_photoduplication_toggle_enabled.html file using the schedule date fields or the feature-specific version of this file using the appointment scheduling fields in your web directory
    • Displays the contents of include_photoduplication_archival_request.html by default when a photoduplication request is selected from the toggle options

When the PhotoduplicationEnabled  key in the Aeon Customization Manager is set to No

  • The <#PHOTOTOGGLE> tag will be used to display the contents of the include_photoduplication_toggle_disabled.html file on any request forms on which the <#PHOTOTOGGLE> tag has been configured. This file:
    • Displays the contents of either include_scheduled_date.html or include_appointment_info_no_site.html by default

      The specific file used is based on whether you have configured the default version of the include_photoduplication_toggle_enabled.html file using the schedule date fields or the feature-specific version of this file using the appointment scheduling fields in your web directory

Implementing the <#PHOTOTOGGLE> Tag on Request Forms

The <#PHOTOTOGGLE> tag is only configured and used by default on the Archival Request form (ArchivalRequest.html). This tag can be configured and used on other request forms following the instructions below:

  1. Review the Customizing Content Displayed by the <#PHOTOTOGGLE> Tag section below and make any necessary customizations to the include files that will be used with the <#PHOTOTOGGLE> tag to display content on the web form.

    Please note that modifying this content will modify the content displayed on all request forms on which the <#PHOTOTOGGLE> tag has been configured. 
    If implementing the <#PHOTOTOGGLE> tag on EADRequest.html, you will need to make additional modifications to these files before the <#PHOTOTOGGLE> tag can be implemented on the form. The required modifications will prevent the <#PHOTOTOGGLE> tag from working on other Aeon web forms. Please review the Customizing Content Displayed by the <#PHOTOTOGGLE> Tag section for details.
  2. Open the request form on which the <#PHOTOTOGGLE> tag will be configured in a text editing application such as Notepad++ or within the GitHub editor
  3. Add the following line within the <head> section of the code at the top of the file:
    <script type="text/javascript" src="js/duplicationPermissionToggle.js"></script>
    Before adding the code, ensure that duplicationPermissionToggle.js is in the js folder of the Aeon web directory. This file was first released in the Aeon 5.0.73 web default web pages. If you do not have this file, download the latest Aeon 5.2 default web pages from the Aeon Downloads page to obtain the file and add it to your web directory in the js folder.
  4. Near the end of the file, locate and delete the entire block of code for the Request For field and the single line of code linking to include_appointment_info.html/include_appointment_info_ead.html or include_scheduled_date.html/include_scheduled_date_ead.html, depending on whether you are using the default web pages using the schedule date field, or the appointment scheduling web pages using the appointment scheduling fields (the example code below is from EADRequest.html):

    <div class="form-group col-md-5 <#PARAM name='RequestLinksVisible' enabled='RequestForEnabled' disabled='d-none'>">
    <label for="RequestLink">
    <span class="<#ERROR name='ERRORRequestLink'>">
    Request for
    </span>
    </label>
    <select class="custom-select mr-sm-2" id="RequestLink" name="FormDataField" size="1">
    <#OPTION name="RequestLinks">
    </select>
    </div>

    <#INCLUDE filename="include_scheduled_date_ead.html">

    </section>
    Do not delete the </section> tag at the end of the block of code.
    Depending on your web page customizations, the scheduled date and appointment scheduling fields may be hardcoded directly within the web page instead of using either of the include files listed above. If you are not using appointment scheduling features, the hardcoded Request For and Scheduled Date fields should be deleted. If you are using appointment scheduling features, the hardcoded Request For, Site (if present), and all other Appointment-related fields used with the appointment scheduling web tool should be deleted.
  5. Locate the following line of code near the end of the file that inserts the buttons used to submit the form:
    <#INCLUDE filename="include_request_buttons.html">

    Delete this line of code and replace it with the code used for the <#PHOTOTOGGLE> tag:

    <#PHOTOTOGGLE>

Customizing Content Displayed by the <#PHOTOTOGGLE> Tag

Warning! Modifying these files will modify this content for every web form on which the <#PHOTOTOGGLE> tag has been configured.

The text and content displayed by the <#PHOTOTOGGLE> tag when the photoduplication toggle is enabled in the Aeon Customization Manager can be modified by editing the include_photoduplication_toggle_enabled.html file according to the instructions below. The text and content displayed by the <#PHOTOTOGGLE> tag when the photoduplication toggle is disabled in the Aeon Customization Manager can be modified by editing the include_photoduplication_toggle_disabled.html file. 

Customizing Content Displayed When the Photoduplication Toggle is Enabled | Customizing Content Displayed When the Photoduplication Toggle is Disabled


Customizing Content Displayed When the Photoduplication Toggle is Enabled 

The text and content displayed by the <#PHOTOTOGGLE> tag when the photoduplication toggle is enabled in the Aeon Customization Manager can be modified by editing the include_photoduplication_toggle_enabled.html file according to the instructions below.

Customizing Section Headers and Label Text for Toggle Options | Customizing Content Displayed by Each Request Type Toggle Option

Customizing Section Headers and Label Text for Toggle Options

The include_photoduplication_toggle_enabled.html file includes the label text used for the request type toggle options as well as the text used for the sections headers that will be toggled on and off based on the patron's selected request type. This file can be directly modified to contain new/additional text if preferred by your institution at the following lines:

  • The "Request type" text used for the toggle section header (default line 1)
  • The "Schedule Retrieval"/"Schedule Appointment" text used to label the reading room request toggle option (default line 7)
  • The "Request photoduplication" text used to label the photoduplication request toggle option (default line 12)
  • The "Schedule Retrieval"/"Schedule Appointment" text used for the reading room request section header (default line 18)
  • The "Order Information" text used for the reading room request section header (default line 25 Appointment Scheduling / default line 37 Scheduled Date)

Customizing Content Displayed by Each Request Type Toggle Option

The include_photoduplication_toggle_enabled.html file also contains the link to the include file used to display the scheduled date/appointment scheduling fields when a reading room request is selected and the link to the include file used to display the photoduplication fields when a photoduplication request is selected. The include_photoduplication_toggle_enabled.html file can be modified to point to different include files for these fields, if necessary.

Modifying Content Displayed for Reading Room Requests | Modifying Content Displayed for Photoduplication Requests

Modifying Content Displayed for Reading Room Requests

To modify the include file used to display the scheduled date or appointment scheduling fields for reading room requests, edit the include_photoduplication_toggle_enabled.html file as shown below:

Scheduled Date:

Change this (default line 33):

<#INCLUDE filename="include_scheduled_date.html">

Appointment Scheduling:

Change this (default line 21):

<#INCLUDE filename="include_appointment_info_no_site.html">
 

 

To this:

<#INCLUDE filename="<insert new filename here>">

 

To this:

<#INCLUDE filename="<insert new filename here>">

Required modifications for EADRequest.html

If implementing the <#PHOTOTOGGLE> tag on EADRequest.html, the code above pointing to the include file used with the scheduled date or the appointment scheduling fields should be modified to point to include_scheduled_date_ead.html or include_appointment_info_ead.html.

Modifying Content Displayed for Photoduplication Requests

To modify the include file used to display the photoduplication fields, edit the include_photoduplication_toggle_enabled.html file as shown below:

Photoduplication Fields:

Change this (default line 41 or default line 29):

<#INCLUDE filename="include_photoduplication_archival_request.html">
 

To this:

<#INCLUDE filename="<insert new filename here>">

Required modifications for EADRequest.html

If implementing the <#PHOTOTOGGLE> tag on EADRequest.html, the photoduplication fields used in the photoduplication include file will need to be modified. For more information, please see Required Customizations for Photoduplication Fields Used on EADRequest.html.

Customizing Photoduplication Fields Displayed by the Photoduplication Include File

By default, the photoduplication toggle will display the contents of include_photoduplication_archival_request.html when a photoduplication request is selected. This file contains the following fields by default:

  • Billing Account
  • Request for *Do not delete this field from the file*
  • Inclusive Pages
  • Page Count
  • Format
  • Shipping
  • Service Level
  • For Publication?

This include file can be edited to remove any of the default photoduplication fields (except for the Request For field, which is required) that you do not want to use on the request form.

You can also modify the photoduplication fields displayed when a photoduplication request is selected by creating a new include file with the photoduplication fields you would like to display, and then changing the code within include_photoduplication_toggle_enabled.html to point to the new include file following the instructions in the section above.
Required Customizations for Photoduplication Fields Used on EADRequest.html

If implementing the <#PHOTOTOGGLE> tag on EADRequest.html, the include file used to point to the photoduplication fields will need to undergo additional modifications to modify the name attribute used for each field to FormDataField. Each photoduplication field in the include file should be modified with the new name attribute following the example for the Billing Account field below:

Change this:

<div class="form-group col-md-4 
<#PARAM name='BillingAccountsVisible'
disabled='d-none'>">
<label for="BillingAccountId">
<span class="<#ERROR name='ERRORBillingAccountId'>">
Billing Account
</span>
</label>
<select class="custom-select mr-sm-2"
id="BillingAccountId" name="BillingAccountId">
<#OPTION name="BillingAccounts">
</select>
</div>
 

To this:

<div class="form-group col-md-4 
<#PARAM name='BillingAccountsVisible'
disabled='d-none'>">
<label for="BillingAccountId">
<span class="<#ERROR name='ERRORBillingAccountId'>">
Billing Account
</span>
</label>
<select class="custom-select mr-sm-2"
id="BillingAccountId" name="FormDataField">
<#OPTION name="BillingAccounts">
</select>
</div>

Customizing Content Displayed When the Photoduplication Toggle is Disabled

Customizing Section Header Text 

The include_photoduplication_toggle_disabled.html file includes the text used for the section header that will be displayed when the photoduplication toggle functionality is disabled by setting the PhotoduplicationEnabled customization key in the Aeon Customization Manager to No. This file can be directly modified to contain new/additional text if preferred by your institution at the following lines:

  • The "Schedule Retrieval"/"Schedule Appointment" text used for the reading room request section header (default line 1)

Customizing Fields Displayed When the Toggle is Disabled

The include_photoduplication_toggle_disabled.html file also contains the link to the include file used to display the scheduled date/appointment scheduling fields when the photoduplication toggle has been disabled. This include file may be modified to point to a different include file, if needed:

Scheduled Date:

Change this (default line 16):

<#INCLUDE filename="include_scheduled_date.html">

Appointment Scheduling:

Change this (default line 4):

<#INCLUDE filename="include_appointment_info_no_site.html">
 

 

To this:

<#INCLUDE filename="<insert new filename here>">

 

To this:

<#INCLUDE filename="<insert new filename here>">

Required modifications for EADRequest.html

If implementing the <#PHOTOTOGGLE> tag on EADRequest.html, the code above pointing to the scheduled date or the appointment scheduling fields should be modified to instead point to include_scheduled_date_ead.html or include_appointment_info_ead.html.

 

Questions?

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

Contact Support