Skip to main content

Upgrading to Central 3

The latest release introduces several significant changes and improvements.

Notably, we have removed our classic form builder, including related class files, templates, and database tables, along with all associated data. This decision aligns with our commitment to streamlining our product offerings and focusing on modern solutions.

Additionally, we have enhanced the accessibility of our blog templates to meet the WCAG 2.1 AA success criteria, ensuring a more inclusive experience for all users. However, this effort has necessitated the retirement of several older templates that were no longer compatible with contemporary accessibility standards.

Furthermore, a new interface for user objects has been added, and a new required method has been introduced to our user adapter interface.

Lastly, we have introduced improved security configuration options for our modern template library, Photon, providing you with greater control and peace of mind when managing your web presence.

Compatibility information

Jadu Central 2 and above can be upgraded to Jadu Central 3.

Prerequisites

No changes to system requirements have been made from our Jadu Central 2 release. Before attempting to upgrade a Jadu Central instance to Jadu Central 2.0.0, please confirm the following prerequisites are in place:

  • A snapshot of the server has been taken, as the removal of the old form builder is a destructive process and any associated data will be lost if the patch is rolled back
  • If you have previously used the classic form builder, ensure any remaining customer submission data has been exported using the data management functionality of the application.
  • Confirm that there are no classic form builder forms remaining live on your website using the “Forms by form builder version” report. If forms are identified, delay patching until these forms have been migrated to a new form builder form
  • If applicable, forms have been taken offline
  • The PHP version installed is PHP 8.1
  • If used, MariaDB version is MariaDB 10.5
  • We recommend the patch process is followed on your UAT environment, before application to a production environment.

Step-by-step upgrade instructions

Deployer upgrade

Manual upgrade

  1. Confirm the pre-requisites above have been met
  2. Start by building and downloading a Jadu Central 3.0.0 package for your environment from Deployer
  3. Turn off forms by logging into the application and navigating to “Forms > Settings” in the Control Center
  4. Windows only: Stop IIS
  5. Install the package via Meteor
  6. Copy the package to the server and unzip the file
  7. From the command line, cd to the unzipped folder and run the following command. Answer yes to run the migrations:
    • php -d memory_limit=-1 meteor.phar patch:apply --path=<<JADU-HOME>>
  8. Once the package has been applied, warm the cache using the following command line commands:
    • Linux System:
      • sudo -u jadu-www /usr/bin/php -d memory_limit=-1 /var/www/jadu/cli.php cache:warmup --kernel=cc
      • sudo -u jadu-www /usr/bin/php -d memory_limit=-1 /var/www/jadu/cli.php cache:warmup --kernel=frontend
    • Windows System (run as Administrator user, where the Jadu installation directory is C:\inetput\wwwroot\jadu):
      • php -d memory_limit=-1 C:\inetpub\wwwroot\cli.php cache:warmup --kernel=cc
      • php -d memory_limit=-1 C:\inetpub\wwwroot\cli.php cache:warmup --kernel=frontend
  9. If Galaxies Sites are in service, also warm their cache using the following command line commands:
    • Linux System:
      • sudo -u jadu-www /usr/bin/php -d memory_limit=-1 /var/www/jadu/cli.php cache:warmup --kernel=galaxy
    • Windows System (run as Administrator user, where the Jadu installation directory is C:\inetput\wwwroot\jadu):
      • php -d memory_limit=-1 C:\inetpub\wwwroot\cli.php cache:warmup --kernel=galaxy
  10. Windows only: Start IIS
  11. Verify the upgrade by logging in to the application and confirming the website can be accessed without encountering an error
  12. Turn on forms via “Forms > Settings” in the Control Center

Change to configuration files

Security has been a top priority in this release, and we have introduced several enhancements to the security configuration options for our modern Photon template library.

These updates provide robust safeguards and granular control over various aspects of web application security.

The new configuration options encompass features such as Content Security Policy for mitigating cross-site scripting attacks, signed cookies to prevent unauthorised modification, clickjacking protection through X-Frame-Options headers, and detection mechanisms for external redirects and forced HTTPS/SSL handling.

Additionally, we have implemented flexible HTTPS/SSL handling, disabled content type sniffing, enabled XSS protection, and introduced a referrer policy to control the Referer header for enhanced privacy and security. These comprehensive security measures ensure a more secure and reliable experience for your web applications, while also offering flexibility to tailor the settings to your specific needs.

This functionality is provided by the Nelmio security bundle and can be configured by amending the content of the security.yml file associated with the Symfony app. For the main site this will be config/frontend/security.yml.

An updated example security.yml file is provided.

config/frontend/security.yml.example

nelmio_security:
# forces HTTPS handling, don't combine with flexible mode
# and make sure you have SSL working on your site before enabling this
# forced_ssl:
# hsts_max_age: 2592000 # 30 days
# hsts_subdomains: true
# redirect_status_code: 302 # default, switch to 301 for permanent redirects

# flexible HTTPS handling, read the detailed config info
# and make sure you have SSL working on your site before enabling this
# flexible_ssl:
# cookie_name: auth
# unsecured_logout: false

New extension point

As part of our ongoing effort to modernise and enhance the functionality of Jadu Central, we have implemented significant improvements to the validation routines and form validation mechanisms.

In this release, we have made Predefined Validation Routines extensible, enabling developers to customise and extend the validation logic according to their specific requirements.

Furthermore, we have removed the legacy JaduXFormsFormValidation.php file from Jadu Central, replacing the outdated functions with their modern equivalents.

These changes not only provide increased flexibility and scalability but also align our codebase with current best practices, ensuring improved maintainability and future-proofing for upcoming releases.

Instructions on creating a new Predefined Validation routine in Jadu Central

To add a new Validation routine, create a class which implements PredefinedValidationRoutineInterface, and register it in services.yml file as follows:

 xfp_core.predefined_validation_routine.integer:
class: Jadu\XFormsPro\Form\PredefinedValidationRoutines\IntegerRoutine
tags:
- { name: xfp.predefined_validation_routine, label: 'Integer (Whole number)' }
- { name: xfp.predefined_validation_routine, method: 'validate_integer' }

Add migration which add validation routine to JaduXFormsFormValidation table with the method as above and label as the title:

INSERT INTO 
`JaduXFormsFormValidation` (`title`, `type`, `method`, `regex`)
VALUES
('Integer (Whole number)','predefinedvalidationroutine','validate_integer','');

API/Code breaking changes

In our continuous effort to enhance performance, maintainability, and security, this release introduces several changes that may require adjustments to existing code.

We have deprecated certain functions, classes, and APIs that are either redundant, inefficient, or pose potential security risks.

Developers are advised to carefully review their codebase and replace any usage of deprecated elements with their recommended alternatives.

To facilitate a smooth transition, we have provided comprehensive documentation outlining the deprecated items. By addressing these changes promptly, developers can ensure their applications remain compatible, secure, and optimised for optimal performance.

Changes to User Adapter Interface

This release introduces enhancements to our authentication and user management systems. Developers should take note of the addition of a new method, getSessionUserID(), to the AuthenticationAdapterInterface.php file. This method is designed to facilitate differentiating between authentication adapters based upon native Jadu Central authentication, and those using third-party identity management such as SAML or CAS.

Furthermore, we have introduced a new interface, JaduUserInterface.php, which defines a standardised set of methods and properties for user objects. This change aims to promote consistency and streamline the handling of user-related operations across various components of the application.

Developers are encouraged to review the updated interfaces and ensure that their custom implementations adhere to the new requirements, enabling seamless integration with the latest authentication and user management features.

src/User/Authentication/AuthenticationAdapterInterface.php

public function getSessionUserID(JaduUserInterface $user): string;

src/User/JaduUserInterface.php

<?php
namespace Jadu\ContinuumCommon\User;
use Symfony\Component\Security\Core\User\UserInterface;
interface JaduUserInterface extends UserInterface
{
public function getId(): ?int;
public function setId(int $id): self;
public function getExternalID(): string;
public function setExternalID(?string $externalID): self;
public function getEmail(): string;
public function setEmail(string $email): self;
public function getPassword(): string;
public function setPassword(string $password): self;
public function getAccessLevel(): int;
public function setAccessLevel(int $accessLevel): self;
public function getSalutation(): string;
public function setSalutation(?string $salutation): self;
public function getForename(): string;
public function setForename(string $forename): self;
public function getSurname(): string;
public function setSurname(string $surname): self;
public function getBirthday(): string;
public function setBirthday(string $birthday): self;
public function getAge(): string;
public function setAge(string $age): self;
public function getSex(): string;
public function setSex(string $sex): self;
public function getOccupation(): string;
public function setOccupation(?string $occupation): self;
public function getCompany(): string;
public function setCompany(?string $company): self;
public function getAddress(): string;
public function setAddress(?string $address): self;
public function getCity(): string;
public function setCity(?string $city): self;
public function getCounty(): string;
public function setCounty(?string $county): self;
public function getPostcode(): string;
public function setPostcode(?string $postcode): self;
public function getCountry(): string;
public function setCountry(?string $country): self;
public function getTelephone(): string;
public function setTelephone(?string $telephone): self;
public function getMobile(): string;
public function setMobile(?string $mobile): self;
public function getFax(): string;
public function setFax(?string $fax): self;
public function getWebsite(): string;
public function setWebsite(?string $website): self;
public function getDataProtection(): int;
public function setDataProtection(int $dataProtection): self;
public function getEnterDate(): int;
public function setEnterDate(int $enterDate): self;
public function getAuthenticated(): int;
public function setAuthenticated(int $authenticated): self;
public function getForcePasswordReset(): int;
public function setForcePasswordReset(int $forcePasswordReset): self;
public function getResetCode(): ?string;
public function setResetCode(?string $resetCode): self;
public function getResetTS(): ?int;
public function setResetTS(?int $resetTS): self;
/**
* Return a sha1 hash based on the users email address, date registered and user id.
*
* @return string a hash value based on the above criteria
*/
public function getAuthenticationHash(): string;
}

Retirement of classic form builder

File deletions

  • jadu/PayBridge/Payment/ReceiptEmailHandler.php
  • jadu/PayBridge/DirectDebitActivityLog.php
  • jadu/PayBridge/EmailHelper.php
  • jadu/PayBridge/EmailVariable.php
  • jadu/PayBridge/FormIntegration.php
  • jadu/PayBridge/IntegratedComponentHelper.php
  • jadu/PayBridge/OrderPayee.php
  • jadu/PayBridge/Paginator.php
  • jadu/PayBridge/Bundle/CoreBundle/Resources/config/services/direct_debit.yml
  • jadu/PayBridge/DataMapper/DirectDebitActivityLogMapper.php
  • jadu/PayBridge/DataMapper/EmailVariableMapper.php
  • jadu/PayBridge/DataMapper/FormIntegrationMapper.php
  • jadu/PayBridge/DataMapper/XFormsSchemaElementMapper.php
  • jadu/PayBridge/DataMapper/XFormsSchemaElementMappingMapper.php
  • jadu/PayBridge/DirectDebit/DirectDebitActivityLogFormatter.php
  • jadu/PayBridge/DirectDebit/DirectDebitActivityLogService.php
  • jadu/PayBridge/DirectDebit/DirectDebitMandateService.php
  • jadu/PayBridge/DirectDebit/DirectDebitPaymentService.php
  • jadu/PayBridge/DirectDebit/DirectDebitService.php
  • jadu/PayBridge/Logging/JaduPayBridgeDirectDebitActivityLogProcessor.php
  • jadu/PayBridge/Order/ReportGenerator.php
  • jadu/PayBridge/Order/ReportRequest.php
  • jadu/PayBridge/Order/ReportService.php
  • jadu/PayBridge/XFormsSchemaElement.php
  • jadu/PayBridge/XFormsSchemaElementMapping.php
  • jadu/PayBridge/Bundle/CCBundle/Controller/DirectDebit/AJAX/FilterUsersAction.php
  • jadu/PayBridge/Bundle/CCBundle/Controller/DirectDebit/ListAction.php
  • jadu/PayBridge/Bundle/CCBundle/Controller/DirectDebit/SubscriptionAction.php
  • jadu/PayBridge/Bundle/CCBundle/Controller/DirectDebit/SubscriptionActivityAction.php
  • jadu/PayBridge/Bundle/CCBundle/Controller/DirectDebit/SubscriptionPaymentAction.php
  • jadu/PayBridge/Bundle/CCBundle/Controller/DirectDebit/SubscriptionPaymentsAction.php
  • jadu/PayBridge/Bundle/CCBundle/Controller/DirectDebit/UserActivityAction.php
  • jadu/PayBridge/Bundle/CCBundle/Controller/DirectDebit/UserDetailsAction.php
  • jadu/PayBridge/Bundle/CCBundle/Controller/DirectDebit/UserSubscriptionsAction.php
  • jadu/PayBridge/Bundle/CCBundle/Controller/Settings/Component/EmailVariablePickerComponent.php
  • jadu/PayBridge/Bundle/CCBundle/Resources/config/services/direct_debit.yml
  • jadu/PayBridge/Bundle/EmbedBundle/Controller/Payment/PayeeAction.php
  • jadu/PayBridge/DataMapper/OrderPayeeMapper.php
  • jadu/PayBridge/Widget/DirectDebitWidget.php
  • public_html/jadu/xforms2/maintenance/calendar_to_validation.php
  • public_html/site/xfp/javascript/widget/direct_debits_widget.js
  • public_html/jadu/editors/ckeditor/plugins/jaduxfpvariables/icons/hidpi/jaduxfpvariables.png
  • public_html/jadu/editors/ckeditor/plugins/jaduxfpvariables/icons/jaduxfpvariables.png
  • public_html/jadu/editors/ckeditor/plugins/jaduxfpvariables/plugin.js
  • public_html/jadu/editors/ckeditor/xfp_config/xfp_config.js
  • public_html/jadu/editors/ckeditor/xfp_config/xfp_config_restrictive.js
  • public_html/jadu/xforms2/crm_return_processor.php
  • public_html/jadu/xforms2/includes/form_head.php
  • public_html/jadu/xforms2/includes/session_header.php
  • public_html/jadu/xforms2/includes/supplement_form_link_include.php
  • public_html/jadu/xforms2/includes/xforms_ajax_select_component_include.php
  • public_html/jadu/xforms2/includes/xforms_ajax_select_component_options.php
  • public_html/jadu/xforms2/includes/xforms_ajax_set_form_status.php
  • public_html/jadu/xforms2/includes/xforms_ajax_xml_template_include.php
  • public_html/jadu/xforms2/includes/xforms_calculation_mappings.php
  • public_html/jadu/xforms2/includes/xforms_confirmation_include.php
  • public_html/jadu/xforms2/includes/xforms_export_settings_include.php
  • public_html/jadu/xforms2/includes/xforms_form_access_include.php
  • public_html/jadu/xforms2/includes/xforms_form_access_report.php
  • public_html/jadu/xforms2/includes/xforms_form_export_import_include.php
  • public_html/jadu/xforms2/includes/xforms_form_pages_structure_include.php
  • public_html/jadu/xforms2/includes/xforms_legacy_actions_menu.php
  • public_html/jadu/xforms2/includes/xforms_tabs_include.php
  • public_html/jadu/xforms2/lightboxes/access_group.js
  • public_html/jadu/xforms2/lightboxes/access_group.php
  • public_html/jadu/xforms2/lightboxes/access_group_list.js
  • public_html/jadu/xforms2/lightboxes/access_group_list.php
  • public_html/jadu/xforms2/lightboxes/access_level.js
  • public_html/jadu/xforms2/lightboxes/access_level.php
  • public_html/jadu/xforms2/lightboxes/access_level_list.js
  • public_html/jadu/xforms2/lightboxes/access_level_list.php
  • public_html/jadu/xforms2/lightboxes/assigned_access.js
  • public_html/jadu/xforms2/lightboxes/assigned_access.php
  • public_html/jadu/xforms2/lightboxes/component_fields_ajax.php
  • public_html/jadu/xforms2/lightboxes/confirm_delete.js
  • public_html/jadu/xforms2/lightboxes/confirm_delete.php
  • public_html/jadu/xforms2/lightboxes/form_access.js
  • public_html/jadu/xforms2/lightboxes/form_access.php
  • public_html/jadu/xforms2/lightboxes/form_variables.js
  • public_html/jadu/xforms2/lightboxes/form_variables.php
  • public_html/jadu/xforms2/lightboxes/remove_personal_data.js
  • public_html/jadu/xforms2/lightboxes/remove_personal_data.php
  • public_html/jadu/xforms2/lightboxes/request_response_log.js
  • public_html/jadu/xforms2/lightboxes/request_response_log.php
  • public_html/jadu/xforms2/lightboxes/save_form_as.js
  • public_html/jadu/xforms2/lightboxes/save_form_as.php
  • public_html/jadu/xforms2/lightboxes/save_xml_template.js
  • public_html/jadu/xforms2/lightboxes/save_xml_template.php
  • public_html/jadu/xforms2/lightboxes/simple_form_variables.js
  • public_html/jadu/xforms2/lightboxes/simple_form_variables.php
  • public_html/jadu/xforms2/lightboxes/user_form_completion.js
  • public_html/jadu/xforms2/lightboxes/user_form_completion.php
  • public_html/jadu/xforms2/lightboxes/user_form_completion_ajax.php
  • public_html/jadu/xforms2/lightboxes/validation_tester.js
  • public_html/jadu/xforms2/lightboxes/validation_tester.php
  • public_html/jadu/xforms2/lightboxes/xforms_field_setup_popup.php
  • public_html/jadu/xforms2/lightboxes/xforms_reporting_select_columns.js
  • public_html/jadu/xforms2/lightboxes/xforms_reporting_select_columns.php
  • public_html/jadu/xforms2/lightboxes/xforms_section_create_from_page.php
  • public_html/jadu/xforms2/lightboxes/xforms_sections_field_setup_popup.php
  • public_html/jadu/xforms2/lightboxes/xforms_sections_list.js
  • public_html/jadu/xforms2/lightboxes/xforms_sections_list.php
  • public_html/jadu/xforms2/lightboxes/xforms_sections_list_ajax.php
  • public_html/jadu/xforms2/lightboxes/xforms_select_connector.js
  • public_html/jadu/xforms2/lightboxes/xforms_select_connector.php
  • public_html/jadu/xforms2/lightboxes/xforms_table_configuration.js
  • public_html/jadu/xforms2/lightboxes/xforms_table_configuration.php
  • public_html/jadu/xforms2/lightboxes/xforms_widget_ajax.php
  • public_html/jadu/xforms2/user_form_stream_pdf.php
  • public_html/jadu/xforms2/xforms.php
  • public_html/jadu/xforms2/xforms_access.php
  • public_html/jadu/xforms2/xforms_access_error.php
  • public_html/jadu/xforms2/xforms_access_groups.php
  • public_html/jadu/xforms2/xforms_access_levels.php
  • public_html/jadu/xforms2/xforms_complete_page_details.php
  • public_html/jadu/xforms2/xforms_completed.php
  • public_html/jadu/xforms2/xforms_crm_schema_view.php
  • public_html/jadu/xforms2/xforms_epayments_integration.php
  • public_html/jadu/xforms2/xforms_file_output.php
  • public_html/jadu/xforms2/xforms_form_actions.php
  • public_html/jadu/xforms2/xforms_form_email_route.php
  • public_html/jadu/xforms2/xforms_form_email_template.php
  • public_html/jadu/xforms2/xforms_form_emails.php
  • public_html/jadu/xforms2/xforms_form_export.php
  • public_html/jadu/xforms2/xforms_form_export_file_feed.php
  • public_html/jadu/xforms2/xforms_form_internal.php
  • public_html/jadu/xforms2/xforms_form_pages_branching.php
  • public_html/jadu/xforms2/xforms_form_preview.php
  • public_html/jadu/xforms2/xforms_form_privileges.php
  • public_html/jadu/xforms2/xforms_form_question_values_lookup.php
  • public_html/jadu/xforms2/xforms_form_request_access.php
  • public_html/jadu/xforms2/xforms_form_structure.php
  • public_html/jadu/xforms2/xforms_integrated_components.php
  • public_html/jadu/xforms2/xforms_internal_form.php
  • public_html/jadu/xforms2/xforms_internal_incomplete_forms.php
  • public_html/jadu/xforms2/xforms_page_details.php
  • public_html/jadu/xforms2/xforms_page_fields.php
  • public_html/jadu/xforms2/xforms_paybridge_integration.php
  • public_html/jadu/xforms2/xforms_pdf_forms.php
  • public_html/jadu/xforms2/xforms_report_index.php
  • public_html/jadu/xforms2/xforms_sections_fields.php
  • public_html/jadu/xforms2/xforms_sections_list.php
  • public_html/jadu/xforms2/xforms_statistics.php
  • public_html/jadu/xforms2/xforms_user_form.php
  • public_html/jadu/xforms2/xforms_user_form_stream_attachment.php
  • public_html/jadu/xforms2/xforms_user_form_stream_attachment_legacy.php
  • public_html/jadu/xforms2/xforms_user_form_stream_email_attachment.php
  • public_html/jadu/xforms2/xforms_user_submitals.php
  • public_html/jadu/xforms2/xforms_validation_routines.php
  • public_html/jadu/xforms2/maintenance/technical_fault_log.php
  • public_html/jadu/xforms2/xforms_form_details.php
  • public_html/jadu/xforms2/xforms_form_import.php
  • public_html/site/xfp/scripts/xforms_form_logic.php
  • jadu/xforms2/JaduXFormsFormValidation.php
  • jadu/xforms2/JaduXFormsFormValidationMessages.php
  • jadu/xforms2/JaduXFormsFormIntegratedComponentDataRetrievalFunctionMappings.php
  • jadu/xforms2/Form/Actions.php
  • jadu/xforms2/JaduXFormsTabs.php
  • jadu/xforms2/ItemWrapper/Form.php
  • jadu/xforms2/Logic/Container.php
  • jadu/xforms2/ACL/Level.php
  • jadu/xforms2/ACL/Mapping.php
  • jadu/xforms2/ACL/Role.php
  • jadu/xforms2/Action/Abstract.php
  • jadu/xforms2/Action/CRM.php
  • jadu/xforms2/Action/EPay.php
  • jadu/xforms2/Action/FileOutput.php
  • jadu/xforms2/Action/PDF.php
  • jadu/xforms2/Action/PayBridge.php
  • jadu/xforms2/Action/Result.php
  • jadu/xforms2/Action/Result/Item.php
  • jadu/xforms2/AllowedExtension.php
  • jadu/xforms2/AllowedExtensionGroup.php
  • jadu/xforms2/AllowedMIMEType.php
  • jadu/xforms2/BranchingRouteToEmailAlert.php
  • jadu/xforms2/CRMSchemaParser.php
  • jadu/xforms2/DataMapper/AllowedExtensionGroupMapper.php
  • jadu/xforms2/DataMapper/AllowedExtensionMapper.php
  • jadu/xforms2/DataMapper/AllowedMIMEMapper.php
  • jadu/xforms2/DataMapper/BranchingRouteToEmailAlertMapper.php
  • jadu/xforms2/DataMapper/EmailAlertMapper.php
  • jadu/xforms2/DataMapper/FormVariableMapper.php
  • jadu/xforms2/DataMapper/LanguageMapper.php
  • jadu/xforms2/DataMapper/QuestionMapper.php
  • jadu/xforms2/Form/AdminAccess.php
  • jadu/xforms2/Form/Connector.php
  • jadu/xforms2/Form/DataRetention/Policy.php
  • jadu/xforms2/Form/Export/Schedule.php
  • jadu/xforms2/Form/Output/File.php
  • jadu/xforms2/Form/Output/File/Generator.php
  • jadu/xforms2/Form/Output/File/Options.php
  • jadu/xforms2/Form/Output/Filter/UserAnswer.php
  • jadu/xforms2/FormVariable.php
  • jadu/xforms2/Handler/FileUploadHandler.php
  • jadu/xforms2/Handler/FormMarkupGenerator.php
  • jadu/xforms2/Handler/FormVariableGenerator.php
  • jadu/xforms2/Handler/FormVariableReplacer.php
  • jadu/xforms2/IntegratedComponent/Confirmation.php
  • jadu/xforms2/Interface/CSRF.php
  • jadu/xforms2/ItemWrapper/Template.php
  • jadu/xforms2/JaduDatabaseObject.php
  • jadu/xforms2/JaduXFormsACL.php
  • jadu/xforms2/JaduXFormsCRMIntegration.php
  • jadu/xforms2/JaduXFormsCRMOracleLG45Adapter.php
  • jadu/xforms2/JaduXFormsCRMSchemaElements.php
  • jadu/xforms2/JaduXFormsCRMServiceRequestTypes.php
  • jadu/xforms2/JaduXFormsCRMSubmissionLog.php
  • jadu/xforms2/JaduXFormsCRMXMLResponseParser.php
  • jadu/xforms2/JaduXFormsForm.php
  • jadu/xforms2/JaduXFormsFormBranchingRoutes.php
  • jadu/xforms2/JaduXFormsFormBranchingRules.php
  • jadu/xforms2/JaduXFormsFormCompletePage.php
  • jadu/xforms2/JaduXFormsFormComponents.php
  • jadu/xforms2/JaduXFormsFormConglomerate.php
  • jadu/xforms2/JaduXFormsFormConglomerateElements.php
  • jadu/xforms2/JaduXFormsFormConglomerateElementsOptions.php
  • jadu/xforms2/JaduXFormsFormCopies.php
  • jadu/xforms2/JaduXFormsFormEmailAlert.php
  • jadu/xforms2/JaduXFormsFormEmailLog.php
  • jadu/xforms2/JaduXFormsFormEpaymentsIntegration.php
  • jadu/xforms2/JaduXFormsFormPage.php
  • jadu/xforms2/JaduXFormsUserForms.php
  • jadu/xforms2/JaduXFormsFormQuestions.php
  • jadu/xforms2/JaduXFormsFormQuestionsOptions.php
  • jadu/xforms2/JaduXFormsFormSections.php
  • jadu/xforms2/JaduXFormsFormSectionsConglomerate.php
  • jadu/xforms2/JaduXFormsFormSectionsConglomerateElements.php
  • jadu/xforms2/JaduXFormsFormSectionsConglomerateElementsOptions.php
  • jadu/xforms2/JaduXFormsFormSectionsQuestions.php
  • jadu/xforms2/JaduXFormsFormSectionsQuestionsOptions.php
  • jadu/xforms2/JaduXFormsPDFFormsToBranchingRouteMappings.php
  • jadu/xforms2/JaduXFormsReporting.php
  • jadu/xforms2/JaduXFormsToPDFFormFieldMapping.php
  • jadu/xforms2/JaduXFormsUserForms.php
  • jadu/xforms2/JaduXFormsUserFormOutputGenerator.php
  • jadu/xforms2/JaduXFormsUserFormsToEpaymentOrderItems.php
  • jadu/xforms2/JaduXFormsUserQuestionAnswers.php
  • jadu/xforms2/JaduXMLParser.php
  • jadu/xforms2/Logic/Engine.php
  • jadu/xforms2/Logic/Engine/EmailAlertEngine.php
  • jadu/xforms2/Logic/Engine/Helper/EmailAttachmentHelper.php
  • jadu/xforms2/Logic/Engine/Helper/Parameter.php
  • jadu/xforms2/Logic/Engine/PagePathEngine.php
  • jadu/xforms2/Question.php
  • jadu/xforms2/ReportingColumn/Abstract.php
  • jadu/xforms2/ReportingColumn/Approved.php
  • jadu/xforms2/ReportingColumn/CRM/Raised.php
  • jadu/xforms2/ReportingColumn/CSOSubmissions.php
  • jadu/xforms2/ReportingColumn/ConversionRate.php
  • jadu/xforms2/ReportingColumn/Declined.php
  • jadu/xforms2/ReportingColumn/InProgress.php
  • jadu/xforms2/ReportingColumn/Pending.php
  • jadu/xforms2/ReportingColumn/RegisteredUserSubmissions.php
  • jadu/xforms2/ReportingColumn/Submissions.php
  • jadu/xforms2/ReportingColumn/Terminated.php
  • jadu/xforms2/ReportingColumn/UnregisteredUserSubmissions.php
  • jadu/xforms2/ReportingColumn/Views.php
  • jadu/xforms2/ReportingColumn/ePay/Submissions.php
  • jadu/xforms2/ReportingColumn/ePay/Value.php
  • jadu/xforms2/ScheduledTask/ClearAuditTrail.php
  • jadu/xforms2/ScheduledTask/FileOutput.php
  • jadu/xforms2/UI/CRMSchemaMappingsHelper.php
  • jadu/xforms2/UI/Controller/AbstractController.php
  • jadu/xforms2/UI/Controller/EmailTemplateController.php
  • jadu/xforms2/UI/Controller/EmailsController.php
  • jadu/xforms2/UI/Controller/RouteDetailsController.php
  • jadu/xforms2/UI/FormTabsComponent.php
  • jadu/xforms2/UI/MappingDropdown.php
  • jadu/xforms2/UserForm/Output/PreformattingFunctions.php
  • jadu/xforms2/UserForm/Search.php
  • jadu/xforms2/Tab/Action.php
  • jadu/xforms2/Tab/Base.php
  • jadu/xforms2/Tab/DataExport.php
  • jadu/xforms2/Tab/DataRetention.php
  • jadu/xforms2/Tab/Emails.php
  • jadu/xforms2/Tab/ExportSchedule.php
  • jadu/xforms2/Tab/Form.php
  • jadu/xforms2/Tab/Preview.php
  • jadu/xforms2/Tab/Privileges.php
  • jadu/xforms2/Tab/Received.php
  • jadu/xforms2/Tab/Statistics.php
  • jadu/XFormsPro/Form/Pages/FormDiagramBuilder.php
  • jadu/XFormsPro/Form/DataRetention/DataRetentionOnSubmission.php
  • jadu/XFormsPro/Form/DataRetention/DataRetentionOnSubmissionMapper.php
  • jadu/XFormsPro/Bundle/CCBundle/Resources/views/CRM/RequestType/details.html.twig
  • jadu/XFormsPro/Bundle/CCBundle/Resources/views/CRM/RequestType/list.html.twig
  • jadu/XFormsPro/Bundle/CCBundle/Resources/views/CRM/SubmissionDigest/email.html.twig
  • jadu/XFormsPro/Bundle/CCBundle/Resources/views/CRM/SubmissionLog/details.html.twig
  • jadu/XFormsPro/Bundle/CCBundle/Resources/views/CRM/SubmissionLog/list.html.twig
  • jadu/XFormsPro/Bundle/CCBundle/Resources/views/CRM/SubmissionLog/log_table.html.twig
  • jadu/XFormsPro/Bundle/CoreBundle/Resources/views/Form/Notification/digest_email.html.twig
  • jadu/XFormsPro/Form/Logic/TechnicalFaultLogMapper.php
  • jadu/XFormsPro/Form/UserFormRepository.php
  • jadu/XFormsPro/Pagination/PaginatedCollection.php
  • jadu/XFormsPro/Reports/Report/ModernLegacyForms.php
  • jadu/XFormsPro/Form/FormRepository.php
  • jadu/XFormsPro/Form/Question/QuestionRepository.php
  • jadu/XFormsPro/IntegratedComponent/AddressFinder/AddressFinderFunctions.php
  • jadu/XFormsPro/IntegratedComponent/BartecCollective/BulkyCollectionDates/BulkyCollectionDatesService.php
  • jadu/XFormsPro/IntegratedComponent/BartecCollective/BulkyCollectionDates/DataFunctions.php
  • jadu/XFormsPro/IntegratedComponent/BartecCollective/BulkyCollectionDates/Result/DateResult.php
  • jadu/XFormsPro/IntegratedComponent/BartecCollective/ScrapCollectionDates/DataFunctions.php
  • jadu/XFormsPro/IntegratedComponent/BartecCollective/ScrapCollectionDates/Result/DateResult.php
  • jadu/XFormsPro/IntegratedComponent/BartecCollective/ScrapCollectionDates/ScrapCollectionDatesService.php
  • jadu/XFormsPro/IntegratedComponent/ESRILocatorHub/PostcodeSearch/ESRILocatorHubFunctions.php
  • jadu/XFormsPro/IntegratedComponent/ESRILocatorHub/StreetSearch/ESRILocatorHubFunctions.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/UpgraderTestAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Factory/LegacyAnsweredFormFactory.php
  • jadu/XFormsPro/CRM/RequestTypeService.php
  • jadu/XFormsPro/CRM/SubmissionLogCriteria.php
  • jadu/XFormsPro/CRM/SubmissionLogService.php
  • jadu/XFormsPro/Exception/CRMSubmissionFailedException.php
  • jadu/XFormsPro/Form/FormList/ListService.php
  • jadu/XFormsPro/Form/IntegratedComponent/IntegratedComponentRepository.php
  • jadu/XFormsPro/Bartec/BartecServiceRequestHelper.php
  • jadu/XFormsPro/Form/Submission/SubmissionLog.php
  • jadu/XFormsPro/Form/Submission/SubmissionLogMapper.php
  • jadu/XFormsPro/Form/Submission/SubmissionLogger.php
  • jadu/XFormsPro/Form/Submission/SubmissionLoggerFactory.php
  • jadu/XFormsPro/AssureSign/Action/AssureSignAction.php
  • jadu/XFormsPro/AssureSign/Entity/AssureSignBranchingRoute.php
  • jadu/XFormsPro/AssureSign/Entity/AssureSignBranchingRouteMapper.php
  • jadu/XFormsPro/AssureSign/Entity/AssureSignTemplate.php
  • jadu/XFormsPro/AssureSign/Entity/AssureSignTemplateMapper.php
  • jadu/XFormsPro/AssureSign/Repository/AssureSignBranchingRouteRepository.php
  • jadu/XFormsPro/AssureSign/Repository/AssureSignTemplateRepository.php
  • jadu/XFormsPro/Bartec/Action/BartecAction.php
  • jadu/XFormsPro/Bartec/Action/BartecActionExecutor.php
  • jadu/XFormsPro/Bartec/Command/BranchingRoute/Clear/BranchingRouteClearCommand.php
  • jadu/XFormsPro/Bartec/Command/BranchingRoute/Clear/BranchingRouteClearHandler.php
  • jadu/XFormsPro/Bartec/Command/BranchingRoute/Delete/BranchingRouteDeleteCommand.php
  • jadu/XFormsPro/Bartec/Command/BranchingRoute/Delete/BranchingRouteDeleteHandler.php
  • jadu/XFormsPro/Bartec/Command/BranchingRoute/Save/BranchingRouteSaveCommand.php
  • jadu/XFormsPro/Bartec/Command/BranchingRoute/Save/BranchingRouteSaveHandler.php
  • jadu/XFormsPro/Bartec/Command/BranchingRoute/Save/Validator/BranchingRouteSaveValidator.php
  • jadu/XFormsPro/Bartec/Command/BranchingRoute/Update/BranchingRouteUpdateCommand.php
  • jadu/XFormsPro/Bartec/Command/BranchingRoute/Update/BranchingRouteUpdateHandler.php
  • jadu/XFormsPro/Bartec/Command/BranchingRoute/Update/Validator/BranchingRouteUpdateValidator.php
  • jadu/XFormsPro/Bartec/Command/Template/Delete/TemplateDeleteCommand.php
  • jadu/XFormsPro/Bartec/Command/Template/Delete/TemplateDeleteHandler.php
  • jadu/XFormsPro/Bartec/Command/Template/Save/TemplateSaveCommand.php
  • jadu/XFormsPro/Bartec/Command/Template/Save/TemplateSaveHandler.php
  • jadu/XFormsPro/Bartec/Command/Template/Save/Validator/TemplateSaveValidator.php
  • jadu/XFormsPro/Bartec/Entity/BartecBranchingRoute.php
  • jadu/XFormsPro/Bartec/Entity/BartecRouteMapping.php
  • jadu/XFormsPro/Bartec/Entity/BartecTemplate.php
  • jadu/XFormsPro/Bartec/Entity/BartecWorkPackToDate.php
  • jadu/XFormsPro/Bartec/Mapper/BartecBranchingRouteMapper.php
  • jadu/XFormsPro/Bartec/Mapper/BartecTemplateMapper.php
  • jadu/XFormsPro/Bartec/Mapper/BartecWorkPackToDateMapper.php
  • jadu/XFormsPro/Bartec/Repository/BartecBranchingRouteRepository.php
  • jadu/XFormsPro/Bartec/Repository/BartecTemplateRepository.php
  • jadu/XFormsPro/Bundle/CoreBundle/Resources/config/services/directory.yml
  • jadu/XFormsPro/Bundle/CoreBundle/Resources/config/services/location.yml
  • jadu/XFormsPro/Form/Log/RequestResponseLog.php
  • jadu/XFormsPro/Form/Log/RequestResponseLogMapper.php
  • jadu/XFormsPro/Bundle/CCBundle/EventListener/AccessDeniedExceptionListener.php
  • jadu/XFormsPro/Bundle/CCBundle/Resources/config/services/upgrader.yml
  • jadu/XFormsPro/Bundle/CoreBundle/Resources/config/services/acl.yml
  • jadu/XFormsPro/CXM/Action/AnswerResolver.php
  • jadu/XFormsPro/CXM/Action/CXMAction.php
  • jadu/XFormsPro/CXM/Action/CXMActionExecutor.php
  • jadu/XFormsPro/CXM/Action/CXMActionExecutorFactory.php
  • jadu/XFormsPro/CXM/DataMapper/CXMFormFileMappingMapper.php
  • jadu/XFormsPro/CXM/DataMapper/CXMTemplateMapper.php
  • jadu/XFormsPro/CXM/DataMapper/CxmFormQuestionToXfpMappingMapper.php
  • jadu/XFormsPro/CXM/Entity/CXMFormFileMapping.php
  • jadu/XFormsPro/CXM/Entity/CxmFormQuestionToXfpMapping.php
  • jadu/XFormsPro/CXM/Resources/html/cxm_action_description.html
  • jadu/XFormsPro/CXM/Service/CXMQuestionMappingService.php
  • jadu/XFormsPro/CXM/Transformer/CxmFormQuestionToXfpMappingTransformer.php
  • jadu/XFormsPro/CXM/Validator/CXMMappingValidator.php
  • jadu/XFormsPro/Form/Calculation/CalculationMapping.php
  • jadu/XFormsPro/Form/Calculation/CalculationMappingMapper.php
  • jadu/XFormsPro/Form/Calculation/CalculationService.php
  • jadu/XFormsPro/Form/Calculation/CalculationValidator.php
  • jadu/XFormsPro/Form/Exception/CalculationValidatorException.php
  • jadu/XFormsPro/Form/FormLogicRunner.php
  • jadu/XFormsPro/Form/FormProcessor.php
  • jadu/XFormsPro/Form/FormResult.php
  • jadu/XFormsPro/Form/Mapping/FieldMapping.php
  • jadu/XFormsPro/Form/Mapping/FieldMappingMapper.php
  • jadu/XFormsPro/Form/Mapping/FieldMappingService.php
  • jadu/XFormsPro/Form/Mapping/FormDataMappingInterface.php
  • jadu/XFormsPro/Form/Notification/AbstractSender.php
  • jadu/XFormsPro/Form/Notification/FailureDigestSender.php
  • jadu/XFormsPro/Form/Notification/NotificationEmailService.php
  • jadu/XFormsPro/Form/Notification/NotificationSender.php
  • jadu/XFormsPro/Form/Page/PageRepository.php
  • jadu/XFormsPro/Form/Upgrader/FormUpgrader.php
  • jadu/XFormsPro/Form/Upgrader/Helper/BranchingUpgradeHelper.php
  • jadu/XFormsPro/Form/Upgrader/Helper/FormUpgradeHelper.php
  • jadu/XFormsPro/Form/Upgrader/Helper/PageUpgradeHelper.php
  • jadu/XFormsPro/Form/Upgrader/Helper/QuestionUpgradeHelper.php
  • jadu/XFormsPro/Form/Variable/Bank/AbstractBank.php
  • jadu/XFormsPro/Form/Variable/Bank/AnswerBank.php
  • jadu/XFormsPro/Form/Variable/Bank/OptionLabelBank.php
  • jadu/XFormsPro/Form/Variable/FormVariableBank.php
  • jadu/XFormsPro/Form/Variable/FormVariableReplacer.php
  • jadu/XFormsPro/Form/Variable/VariableFunctionRepository.php
  • jadu/XFormsPro/Form/View/Confirmation/AnswerView.php
  • jadu/XFormsPro/Form/View/Confirmation/ConfirmationViewFactory.php
  • jadu/XFormsPro/Form/View/FormView.php
  • jadu/XFormsPro/Form/View/FormViewFactory.php
  • jadu/XFormsPro/Form/View/QuestionView.php
  • jadu/XFormsPro/Form/View/QuestionViewFactory.php
  • jadu/XFormsPro/Location/Form/Component/Entity/LocationComponent.php
  • jadu/XFormsPro/Location/Form/Component/LocationComponentService.php
  • jadu/XFormsPro/Logging/Logger/TechnicalFaultFactory.php
  • jadu/XFormsPro/Logging/SQLHandler.php
  • jadu/XFormsPro/Logging/SubmissionLogProcessor.php
  • jadu/XFormsPro/Logging/TechnicalFaultLogProcessor.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Settings/AllowedExtensionGroup/DeleteAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Settings/AllowedExtensionGroup/DetailsAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Settings/AllowedExtensionGroup/ListAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Settings/CompatibilitySettingsAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Settings/MimeType/DeleteAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Settings/MimeType/DetailsAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Settings/MimeType/ListAction.php
  • jadu/XFormsPro/Directory/Action/DirectoryAction.php
  • jadu/XFormsPro/Directory/Action/DirectoryActionExecutor.php
  • jadu/XFormsPro/Directory/Entity/DirectoryBranchingRoute.php
  • jadu/XFormsPro/Directory/Entity/DirectoryBranchingRouteMapper.php
  • jadu/XFormsPro/Directory/Entity/DirectoryEntryMapper.php
  • jadu/XFormsPro/Directory/Entity/DirectoryFieldMapping.php
  • jadu/XFormsPro/Directory/Entity/DirectoryFieldMappingMapper.php
  • jadu/XFormsPro/Directory/Entity/DirectoryTemplate.php
  • jadu/XFormsPro/Directory/Entity/DirectoryTemplateMapper.php
  • jadu/XFormsPro/Directory/Mapping/DirectoryFieldMappingService.php
  • jadu/XFormsPro/Directory/Repository/DirectoryBranchingRouteRepository.php
  • jadu/XFormsPro/Directory/Repository/DirectoryTemplateRepository.php
  • jadu/XFormsPro/Form/Action/FirstCapitalCashflow/Entity/BranchingRouteToFCC.php
  • jadu/XFormsPro/Form/Action/FirstCapitalCashflow/Entity/BranchingRouteToFCCMapper.php
  • jadu/XFormsPro/Form/Action/FirstCapitalCashflow/Entity/FirstCapitalCashflowTemplate.php
  • jadu/XFormsPro/Form/Action/FirstCapitalCashflow/Entity/FirstCapitalCashflowTemplateMapper.php
  • jadu/XFormsPro/Form/Action/FirstCapitalCashflow/FirstCapitalCashflowAction.php
  • jadu/XFormsPro/Form/Action/FirstCapitalCashflow/FirstCapitalCashflowActionExecutor.php
  • jadu/XFormsPro/Form/Action/FirstCapitalCashflow/Repository/FirstCapitalCashflowBranchingRouteRepository.php
  • jadu/XFormsPro/Form/Action/FirstCapitalCashflow/Repository/FirstCapitalCashflowTemplateRepository.php
  • jadu/XFormsPro/Form/Action/LoggableInterface.php
  • jadu/XFormsPro/Form/Component/ComponentFactory.php
  • jadu/XFormsPro/Form/Component/ComponentRenderer.php
  • jadu/XFormsPro/Form/Component/ComponentRepository.php
  • jadu/XFormsPro/Form/Component/ComponentServiceInterface.php
  • jadu/XFormsPro/Form/Component/Entity/AbstractComponent.php
  • jadu/XFormsPro/Form/Component/Entity/ComponentInterface.php
  • jadu/XFormsPro/Form/Component/Entity/Setting.php
  • jadu/XFormsPro/Form/Component/Entity/SettingMapper.php
  • jadu/XFormsPro/Form/Component/Locator/ComponentServiceLocator.php
  • jadu/XFormsPro/Form/Component/Settings/ComponentSettingsHelper.php
  • jadu/XFormsPro/Form/Component/Settings/SettingsFormRenderer.php
  • jadu/XFormsPro/Form/Component/Settings/SettingsRepository.php
  • jadu/XFormsPro/Form/Component/Settings/SettingsRepositoryInterface.php
  • jadu/XFormsPro/Form/Conglomerate/ConglomerateRepository.php
  • jadu/XFormsPro/Form/CoreDropDown/MappingDropdownBlacklist.php
  • jadu/XFormsPro/Form/Logic/LegacyFormInitialiser.php
  • jadu/XFormsPro/Settings/AllowedExtensionService.php
  • jadu/XFormsPro/Settings/CompatibilitySettingsService.php
  • jadu/XFormsPro/Settings/MimeTypeService.php
  • jadu/XFormsPro/ACL/ACL.php
  • jadu/XFormsPro/ACL/ACLFactory.php
  • jadu/XFormsPro/ACL/ACLService.php
  • jadu/XFormsPro/ACL/Exception/AccessDeniedFormException.php
  • jadu/XFormsPro/ACL/Exception/AccessDeniedWorkflowException.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/CRM/RequestType/DeleteAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/CRM/RequestType/DetailsAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/CRM/RequestType/ListAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/CRM/SubmissionLog/DetailsAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/CRM/SubmissionLog/ListAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/AssureSign/Routes/AJAX/SaveAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/AssureSign/Routes/ListAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/AssureSign/Templates/DeleteAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/AssureSign/Templates/DetailsAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/AssureSign/Templates/ListAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/Bartec/Routes/API/ClearAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/Bartec/Routes/API/DeleteAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/Bartec/Routes/API/SaveAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/Bartec/Routes/API/UpdateAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/Bartec/Routes/ListAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/Bartec/Templates/DeleteAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/Bartec/Templates/DetailsAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/Bartec/Templates/ListAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/CXM/Routes/AJAX/CopyAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/CXM/Routes/AJAX/DeleteAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/CXM/Routes/AJAX/SaveAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/CXM/Routes/ListAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/CXM/StandardTemplates/DetailsAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/CXM/StandardTemplates/ListAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/CXM/Templates/DeleteAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/CXM/Templates/DetailsAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/CXM/Templates/ListAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/Directory/Routes/AJAX/SaveAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/Directory/Routes/ListAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/Directory/Templates/DeleteAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/Directory/Templates/DetailsAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/Directory/Templates/ListAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/FirstCapitalCashflow/Routes/AJAX/DeleteAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/FirstCapitalCashflow/Routes/AJAX/SaveAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/FirstCapitalCashflow/Routes/ListAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/FirstCapitalCashflow/Templates/DeleteAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/FirstCapitalCashflow/Templates/DetailsAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Controller/Form/Action/FirstCapitalCashflow/Templates/ListAction.php
  • jadu/XFormsPro/Bundle/CCBundle/Resources/config/services/controller/assuresign.yml
  • jadu/XFormsPro/Bundle/CCBundle/Resources/config/services/controller/crm.yml
  • jadu/XFormsPro/Bundle/CCBundle/Resources/config/services/controller/cxm.yml
  • jadu/XFormsPro/Bundle/CCBundle/Resources/config/services/controller/directory.yml
  • jadu/XFormsPro/Bundle/CCBundle/Resources/config/services/controller/first_capital.yml
  • jadu/XFormsPro/CXM/Service/CXMFileMappingService.php
  • jadu/XFormsPro/Form/BranchingRoute/BranchingRouteFunctionRepository.php
  • jadu/XFormsPro/Form/BranchingRoute/BranchingRouteToCXM.php
  • jadu/XFormsPro/Form/BranchingRoute/BranchingRouteToCXMMapper.php
  • jadu/XFormsPro/Form/BranchingRoute/BranchingRouteToCXMService.php
  • jadu/XFormsPro/Form/Rules/TemplatesTab.php
  • jadu/XFormsPro/Response/Views/xfp-form-tab-template.html.twig
  • jadu/XFormsPro/Response/XFPFormTabController.php
  • jadu/XFormsPro/Form/Advanced/LogicTab.php
  • jadu/XFormsPro/Form/Advanced/PrefillsTab.php
  • jadu/XFormsPro/Form/Details/DetailsTab.php
  • jadu/XFormsPro/Form/Pages/PagesTab.php
  • jadu/XFormsPro/Form/Rules/RulesTab.php
  • jadu/XFormsPro/Tab/PublishTab.php
  • jadu/XFormsPro/Tab/TabsFactory.php
  • jadu/Perceptive/XFP/Action/PerceptiveContentFormPost.php
  • public_html/jadu/perceptive/forms_perceptive_content.php
  • assets/views/PayBridge/widgets/direct_debit.html.twig
  • var/widgets/38001/WIDGET_My Account Direct Debits
  • var/widgets/38001/public.php
  • tests/unit/XFormsPro/CXM/Service/CXMLinkGeneratorTest.php

Dropped database tables

  • JaduXFormsACLLevel
  • JaduXFormsACLMapping
  • JaduXFormsACLRole
  • JaduXFormsAllowedExtensionGroups
  • JaduXFormsAllowedExtensions
  • JaduXFormsAllowedMIMETypes
  • JaduXFormsAppliedCategories
  • JaduXFormsAssureSignBranchingRoute
  • JaduXFormsAssureSignTemplate
  • JaduXFormsBartecCollectiveBranchingRoute
  • JaduXFormsBartecCollectiveTemplate
  • JaduXFormsBartecCollectiveWorkPackToDates
  • JaduXFormsCRMSchemaElementMappings
  • JaduXFormsCRMSchemaElements
  • JaduXFormsCRMServiceRequestTypes
  • JaduXFormsCRMSubmissionLog
  • JaduXFormsDirectoryBranchingRoute
  • JaduXFormsDirectoryFieldMapping
  • JaduXFormsDirectoryTemplate
  • JaduXFormsExportSchedule
  • JaduXFormsFormActions
  • JaduXFormsFormAdminAccess
  • JaduXFormsFormBranchingRouteToCXM
  • JaduXFormsFormBranchingRouteToEmailAlerts
  • JaduXFormsFormBranchingRouteToFirstCapital
  • JaduXFormsFormBranchingRoutes
  • JaduXFormsFormBranchingRules
  • JaduXFormsFormCXMFileMappings
  • JaduXFormsFormCXMTemplates
  • JaduXFormsFormCompletePage
  • JaduXFormsFormComponentSettings
  • JaduXFormsFormComponents
  • JaduXFormsFormConglomerate
  • JaduXFormsFormConglomerateElementOptions
  • JaduXFormsFormConglomerateElements
  • JaduXFormsFormCopies
  • JaduXFormsFormEmailAlerts
  • JaduXFormsFormEmailLog
  • JaduXFormsFormEpaymentsIntegrations
  • JaduXFormsFormFieldMappings
  • JaduXFormsFormFileOutput
  • JaduXFormsFormFileOutputOptions
  • JaduXFormsFormFirstCapitalTemplates
  • JaduXFormsFormPage
  • JaduXFormsFormQuestions
  • JaduXFormsFormQuestionsOptions
  • JaduXFormsFormRequestResponseLog
  • JaduXFormsFormSections
  • JaduXFormsFormSectionsConglomerate
  • JaduXFormsFormSectionsConglomerateElementOptions
  • JaduXFormsFormSectionsConglomerateElements
  • JaduXFormsFormSectionsQuestions
  • JaduXFormsFormSectionsQuestionsOptions
  • JaduXFormsFormSubmissionLog
  • JaduXFormsFormTechnicalFaultLog
  • JaduXFormsFormToConnector
  • JaduXFormsFormVariables
  • JaduXFormsFormXMLTemplates
  • JaduXFormsPDFForms
  • JaduXFormsPDFFormsFieldMappings
  • JaduXFormsPDFFormsToBranchingRouteMappings
  • JaduXFormsPreformattingFunctions
  • JaduXFormsProCxmFormQuestionToXfpMappings
  • JaduXFormsUserFormsToEpaymentOrderItems
  • JaduXFormsTabs
  • JaduXFormsUserQuestionAnswers
  • JaduPayBridgeDirectDebitActivityLog
  • JaduPayBridgeEmailVariables
  • JaduPayBridgeFormIntegrations
  • JaduPayBridgeOrderPayees
  • JaduPayBridgeXFormsSchemaElementMappings
  • JaduPayBridgeXFormsSchemaElements
  • JaduXFormsFormIntegratedComponentDataRetrievalFunctionMappings

Dropped database table columns

  • JaduXFormsForm
    • validateCalculations
    • isLegacy
    • approveEmail
    • declineEmail
    • initialStatus
    • numberOfPages
  • JaduXFormsUserForms
    • unregisteredUserID
    • Comments
    • sequenceID
    • ipAddress
    • updatedtimestamp

Changes to JaduModulePages entries

  • Updated entries:
    • /xforms2/xforms_form_details.php => /xforms2/form/details
    • /xforms2/xforms_internal_form.php => /xforms2/internal
    • /xforms2/xforms_user_submitals.php => /xforms2/received
    • /xforms2/xforms_user_form.php => /xforms2/received/submission
  • Removed entries:
    • /xforms2/form/action/directory
    • /xforms2/form/action/assuresign
    • /xforms2/form/action/first-capital
    • /xforms2/form/action/bartec
    • /xforms2/form/action/cxm
    • /xforms2/settings/file-extensions
    • /xforms2/settings/mime-types
    • /xforms2/settings/compatibility
    • /xforms2/crm/request_types
    • /xforms2/crm/submission_log

Change to MyJaduAPI Endpoints

RewriteRule ^/?api/userForms/getstatusandcomments/([0-9]+)\.xml$ /api.%EXTENSION%?resource=userForms&method=getstatusandcomments&id=$1 [QSA,NC,L]
RewriteRule ^/?api/userForms/setstatusandcomments/([0-9]+)\.xml$ /api.%EXTENSION%?resource=userForms&method=setstatusandcomments&id=$1 [QSA,NC,L]
RewriteRule ^/?api/userForms/getstatus/([0-9]+)\.xml$ /api.%EXTENSION%?resource=userForms&method=getstatus&id=$1 [QSA,NC,L]
RewriteRule ^/?api/userForms/setstatus/([0-9]+)\.xml$ /api.%EXTENSION%?resource=userForms&method=setstatus&id=$1 [QSA,NC,L]

Retirement of GoCardless integration

Removed files

  • jadu/PayBridge/Bundle/FrontEndBundle/Controller/Webhook/GoCardlessWebhookAction.php
  • jadu/PayBridge/Bundle/PayBridgeProject/Page/PayBridgeContent/Integration/GoCardlessWebHookController.php
  • jadu/PayBridge/DirectDebit/GoCardless/GoCardlessWebhookProcessor.php
  • jadu/PayBridge/DirectDebit/PSP/Adapter/GoCardless.php
  • jadu/PayBridge/Integrations/GoCardlessDirectDebit/Controllers/ManageController.php
  • jadu/PayBridge/Integrations/GoCardlessDirectDebit/GoCardlessDirectDebitIntegration.php
  • jadu/PayBridge/Integrations/GoCardlessDirectDebit/GoCardlessIntegrationService.php
  • jadu/PayBridge/Integrations/GoCardlessDirectDebit/GoCardlessUIService.php
  • jadu/PayBridge/Integrations/GoCardlessDirectDebit/ServiceLocator.php
  • jadu/PayBridge/Integrations/GoCardlessDirectDebit/Views/base.html.twig
  • jadu/PayBridge/Integrations/GoCardlessDirectDebit/Views/stage1.html.twig
  • jadu/PayBridge/Integrations/GoCardlessDirectDebit/Views/stage2.html.twig
  • jadu/PayBridge/Integrations/GoCardlessDirectDebit/Views/stage3.html.twig
  • jadu/PayBridge/Integrations/GoCardlessDirectDebit/Views/stage4.html.twig
  • var/JaduXFormsToGoCardless.xsd
  • public_html/jadu/PayBridge/javascript/gocardless_mappings.js

Removal of original form classes

With this release, we are taking a significant step forward in streamlining our product offerings and aligning with industry best practices.

In Jadu CMS 20.0.0, we retired the original form building tools within the application as they failed to comply with the updated privacy requirements of GDPR, paving the way for more modern and efficient solutions. Building upon that decision, we are now removing the associated form classes from Jadu Central.

Developers are encouraged to review the list of removed files and ensure that their custom implementations do not reference these files.

File deletions

  • jadu/Intercom/Data.php
  • jadu/egov/JaduXFormsForm.php
  • jadu/egov/JaduXFormsFormComponents.php
  • jadu/egov/JaduXFormsFormConglomerate.php
  • jadu/egov/JaduXFormsFormConglomerateElements.php
  • jadu/egov/JaduXFormsFormConglomerateElementsOptions.php
  • jadu/egov/JaduXFormsFormInterfaceFunctions.php
  • jadu/egov/JaduXFormsFormPage.php
  • jadu/egov/JaduXFormsFormQuestions.php
  • jadu/egov/JaduXFormsFormQuestionsOptions.php
  • jadu/egov/JaduXFormsFormSections.php
  • jadu/egov/JaduXFormsFormSectionsConglomerate.php
  • jadu/egov/JaduXFormsFormSectionsConglomerateElements.php
  • jadu/egov/JaduXFormsFormSectionsConglomerateElementsOptions.php
  • jadu/egov/JaduXFormsFormSectionsQuestions.php
  • jadu/egov/JaduXFormsFormSectionsQuestionsOptions.php
  • jadu/egov/JaduXFormsFormValidation.php
  • jadu/egov/JaduXFormsUserForms.php
  • jadu/egov/JaduXFormsUserQuestionAnswers.php
  • jadu/egov/XFormsItemWrapper/Form.php
  • jadu/egov/XFormsItemWrapper/Template.php
  • jadu/egov/XFormsSearchProvider.php
  • jadu/egov/htaccess_readable_xforms

Singlepoint integration

A number of customers have reported failures looking up certain postcodes due to the amount of data being returned by the web service response.

Most of the fields returned were unused, so the SinglePoint client library has been changed (in v4.0.0) to only return the subset of fields that are required by the products. This new version of the library is included in Central v3.0.0.

The client library therefore now allows field names to be specified when performing a search, overriding the default ones, e.g.

$client->retrieveByUPRN(‘10123456789012’,[‘CustomField1’, ‘CustomField2’]);

This is supported for each of the search methods:

  • findByPostCode
  • retrieveByUPRN
  • findByStreetName
  • retrieveByUSRN

Any custom code making use of the SinglePoint client library, and needing to capture additional fields will need to be amended as necessary.

The default fields which will be returned are detailed here:

public const RETURN_FIELD_TAGS = [
'PAON_TEXT',
'PAON_START',
'PAON_END',
'SAON_TEXT',
'SAON_START',
'SAON_END',
'LOGICAL_STATUS',
'COUNTY',
'EASTING',
'NORTHING',
'LOCALITY',
'PAON',
'SAON',
'POSTCODE',
'STREET',
'TOWN',
'UPRN',
'USRN',
];

Blog accessibility improvements

In this release we have enhanced the accessibility of our blog templates to meet the WCAG 2.1 AA success criteria, ensuring a more inclusive experience for all users. However, this effort has necessitated the retirement of several older templates that were no longer compatible with contemporary accessibility standards.

This includes:

  • Abstract [Felt,Grass, Sand, Sky, Sponge, Wood]
  • Bubbles
  • Hedgerow
  • Minimal [Blue, Green, Grey, Red]
  • Note Pad [Fern, Plum, Sky, Teal]
  • Ornate [Ice, Rose, Tangerine, Sage]
  • Rounded [Flame, Coffee, Slate, Verdant]
  • Photo [Beach, Night, Horse, Celestial, Rose, World]

Referencing controllers with a single colon

In our continuous effort to align with industry best practices and maintain compatibility with the latest software dependencies, we have addressed a deprecation notice related to controller referencing.

Developers should take note that referencing controllers with a single colon, such as ExceptionController, is now deprecated.

This change is in compliance with the symfony/http-kernel 5.1 update, which requires a more explicit method of referencing controllers.

Moving forward, developers should use the fully qualified class name and method, for example, Jadu\\Bundle\\CCBundle\\Controller\\ExceptionController::showAction.

Deprecation

Please note, the RepopulateHomepageVersionsDateCommand command has now been deprecated, and will be removed in a future release.

Post-upgrade steps

Following the upgrade, confirm that the website is responsive and that you can successfully log into the Control Center.

Troubleshooting tips

Refer to our online troubleshooting guidance for tips.

Rollback instructions

We recommend that rollback of the upgrade is undertaken if:

  • The site is down and can not be brought up
  • A critical issue is present on the site that will affect the organisation in a business critical way and does not have an immediate or imminent resolution
  • Forms have not been returned online

Once forms are online any rollback activities will affect data integrity and are to be avoided.

Should you ever need to revert from the patch, from inside the patch directory run the following command and then clear the system cache:

php -d memory_limit=512M meteor.phar patch:rollback

Further information on rolling back the patch is available in our manual.

Where to get help

Testing information

The following test cases are recommended to be executed in your UAT or Dev environment before applying this upgrade to your production environment:

  • Check correct version of Jadu Central is installed
  • Check homepage content can be created (Publishing > Homepages)
  • Check homepage created can be submitted, previewed and viewed live
  • Check preview matches live view
  • Check a form can be imported
  • Check imported form can be made live and submitted
  • Check navigation through form operates correctly (next, previous)
  • Review the submitted form in the Control Center
  • Generate a PDF from the submitted form
  • Check PDF link is present on the completed page if added and generated
  • Create a form and check page templates and can be created and added
  • Check actions which reference a “user” variable in their template can be re-run successfully
  • Export the created form
  • Confirm the availability and behaviour of any customisations
  • Log into the website using a user account and confirm the behaviour of your MyAccount portal
  • Confirm the presentation of any blogs

Changes to classic templates

Removed files

The following files have been removed from our classic template package:

  • public_html/site/includes/rightcolumn_payments.php
  • public_html/site/javascript/payments.js
  • public_html/site/scripts/payment_details_1.php
  • public_html/site/scripts/payment_maintenance.php
  • public_html/site/scripts/payment_processor.php
  • public_html/site/scripts/payments.php
  • public_html/site/scripts/payments_basket.php
  • public_html/site/scripts/payments_direct_debit.php
  • public_html/site/scripts/payments_payee_details.php
  • public_html/site/scripts/payments_provider.php
  • public_html/site/scripts/user_order_receipt.php
  • public_html/site/xfp/scripts/payment_complete.php
  • public_html/site/xfp/includes/xforms_form_confirmation_include.php
  • public_html/site/xfp/scripts/mobilecss.php
  • public_html/site/xfp/scripts/xforms_form.php
  • public_html/site/xfp/scripts/xforms_form_kiosk.php
  • public_html/site/xfp/scripts/xforms_form_mobile.php
  • public_html/site/xfp/scripts/xforms_index.php
  • public_html/site/xfp/scripts/xforms_list.php

Added files

The following files have been added to our classic template package:

  • public_html/site/scripts/payments_payee_details.php

File changes

The following changes to files have been made:

public_html/site/includes/metadata.php

    */
if (
preg_match('/(xfp)/', $_SERVER['PHP_SELF'])
- && $form->visible == 0
+ && !empty($form) && $form->isVisible()
) {
?>
<meta name="ROBOTS" content="NOINDEX,NOFOLLOW" >

public_html/site/scripts/category_rss.php

        $categoryName = ' ';

$categoryList = getLiveCategoryList(BESPOKE_CATEGORY_LIST_NAME);
- $categoryItem = $categoryList->GetCategory($categoryID);
+ $categoryItem = $categoryList->getCategory($categoryID);

if ($categoryItem != null && $categoryItem->id == $categoryID) {
$categoryName = ' ' . $categoryItem->name . ' ';
case 'downloads':
$downloadFileList = [];

- //Get download items
- if ($_GET['categoryID'] == null || !is_numeric($_GET['categoryID'])) {
- $downloadFileList = getXMostRecentlyCreatedDownloadFiles(MAX_ITEMS, true, true, true);
- } else {
- $categoryID = $_GET['categoryID'];

- $downloadFileList = getAllDownloadFilesWithCategory($categoryID, 'creationDate DESC');
+ if (isset($_GET['categoryID']) && is_numeric($_GET['categoryID'])) {
+ $categoryID = (int) $_GET['categoryID'];
+ $categoryName = getCategoryName($categoryID);
+ $downloadFileList = getAllDownloadFilesWithCategory($categoryID, 'creationDate DESC');
+ } else {
+ $downloadFileList = getXMostRecentlyCreatedDownloadFiles(MAX_ITEMS, true, true, true);
}

$rssChannel->title = 'Latest' . $categoryName . 'Download Files from ' . METADATA_GENERIC_NAME;
$criteria['approved'] = '1';
$criteria['live'] = '1';

- $download = getDownload(downloadFileItem . DownloadID, $criteria);
+ $download = getDownload($downloadFile->downloadID, $criteria);

$rssItem->description = '';
$rssItem->pubDate = date('r', $downloadFile->creationDate);

public_html/site/scripts/services_info.php

    require_once 'egov/JaduPIDList.php';
require_once 'JaduCategories.php';
require_once 'websections/JaduDocuments.php';
- require_once 'egov/JaduXFormsForm.php';
require_once 'utilities/JaduMostPopular.php';

$PID = null;

public_html/site/scripts/user_order_receipt.php

    require_once 'JaduStyles.php';
require_once 'PayBridge/DataMapper/OrderMapper.php';
require_once 'PayBridge/DataMapper/OrderItemMapper.php';
- require_once 'PayBridge/DataMapper/OrderPayeeMapper.php';
require_once 'PayBridge/DataMapper/FinanceDetailsMapper.php';
require_once 'PayBridge/DataMapper/ProductMapper.php';
require_once 'PayBridge/Processor.php';
@@ -13,7 +12,6 @@
$financeDetailsMapper = new Jadu_PayBridge_DataMapper_FinanceDetailsMapper($db, new Jadu_CacheManager());
$orderSecurityMapper = new Jadu_PayBridge_DataMapper_OrderSecurityMapper($db, new Jadu_CacheManager());
$orderMapper = new Jadu_PayBridge_DataMapper_OrderMapper($db, new Jadu_CacheManager());
- $orderPayeeMapper = new Jadu_PayBridge_DataMapper_OrderPayeeMapper($db, new Jadu_CacheManager());
$orderItemMapper = new Jadu_PayBridge_DataMapper_OrderItemMapper($db, new Jadu_CacheManager());
$productMapper = new Jadu_PayBridge_DataMapper_ProductMapper($db, new Jadu_CacheManager());

@@ -36,7 +34,6 @@
$financeDetails = $financeDetailsMapper->getFinanceDetails();
if (!is_null($order)) {
$orderItems = $orderItemMapper->getByOrderID($order->id);
- $orderPayee = $orderPayeeMapper->getByOrderID($order->id);
}

if (isset($orderItems) && !empty($orderItems)) {
@@ -139,29 +136,7 @@
?>
</div>
</fieldset>
-<?php
- if (is_object($orderPayee)) {
-?>
- <fieldset>
- <legend>Payee details</legend>
- <div>
- <ul class="list">
- <li>Name: <?php print encodeHtml("$orderPayee->title $orderPayee->forename $orderPayee->surname");?></li>
- <li>Telephone: <?php print encodeHtml($orderPayee->telephone); ?></li>
- <?php if (strlen($orderPayee->fax) > 0) {?>
- <li>Fax:</div> <span class="amount"><?php print encodeHtml($orderPayee->fax); ?></span><?php } ?>
- <li>Address:
- <br /><?php print encodeHtml($orderPayee->address1); ?>
- <?php if (isset($orderPayee->address2[1])) { print '<br />' . encodeHtml($orderPayee->address2); } ?>
- <br /><?php print encodeHtml($orderPayee->city);?>
- <br /><?php print encodeHtml($orderPayee->postcode);?>
- </li>
- </ul>
- </div>
- </fieldset>
-<?php
- }
-?>
+
<fieldset>
<legend>Our details</legend>
<div>

public_html/site/xfp/includes/az_search_results.php

<?php
+ use Jadu\Symfony\DependencyInjection\ServiceLocator;
+
include_once("utilities/JaduStatus.php");
include_once("utilities/JaduReadableURLs.php");
include_once('egov/JaduEGovJoinedUpServices.php');
include_once('egov/JaduEGovJoinedUpServicesContacts.php');
- include_once("xforms2/JaduXFormsForm.php");
include_once("xforms2/JaduXFormsProReadableURLs.php");

$searchText = trim($_REQUEST['searchText']);
$serviceFound = false;

+ $formRepository = ServiceLocator::get('xfp_core.repository.form.builder.form');

if (!empty($searchText)) {
$services = getAllServicesWithTitleAliases(true, true);
if (function_exists('getLiveCategoryList')) {
@@ -42,13 +45,12 @@
$forms = array();
if (sizeof($formsWithCategory) > 0) {
foreach ($formsWithCategory as $formWithCategory) {
- $form = getXFormsForm($formWithCategory->itemID, true);
+ $form = $formRepository->find($formWithCategory->itemID);
if ($form != -1) {
$forms[] = $form;
}
}
}
-
?>
<li>
<a href="<?php print 'http://' . DOMAIN . buildAZServiceURL($service->id); ?>"><?php print encodeHtml($service->title); ?></a>
@@ -65,7 +67,7 @@
<?php
foreach ($forms as $form) {
?>
- <li><a href="<?php print getSecureSiteRootURL().buildXFormsProFormURL($form->id); ?>"><?php print encodeHtml($form->title); ?></a></li>
+ <li><a href="<?php print getSecureSiteRootURL().buildXFormsProFormURL($form->getId()); ?>"><?php print encodeHtml($form->getTitle()); ?></a></li>
<?php
}
?>

public_html/site/xfp/includes/xforms_search_results.php

<?php
+ use Jadu\Symfony\DependencyInjection\ServiceLocator;

session_start();
include_once("utilities/JaduStatus.php");
- include_once("xforms2/JaduXFormsForm.php");
include_once("xforms2/JaduXFormsProReadableURLs.php");
include_once("JaduMetadata.php");

$searchText = trim($_REQUEST['searchText']);
$found = false;
+ $formRepository = ServiceLocator::get('xfp_core.repository.form.builder.form');

if (!empty($searchText)) {
- $xforms = getAllXFormsForms(true, true, 'id', 'ASC', true);
+ $params = [
+ 'live' => true,
+ 'archived' => false,
+ 'visible' => true
+ ];
+ $xforms = $formRepository->findBy($params, ['id' => 'DESC']);
?>
<ul class="list">
<?php
foreach ($xforms as $form) {
- if (mb_strpos(mb_strtolower($form->title), mb_strtolower($searchText)) !== false) {
+ if (mb_strpos(mb_strtolower($form->getTitle()), mb_strtolower($searchText)) !== false) {
$found = true;
- $formMetadata = getMetadataForItem(XFORMS_METADATA_TABLE, $form->id);
+ $formMetadata = getMetadataForItem(XFORMS_METADATA_TABLE, $form->getId());
?>
<li>
- <a href="<?php print (FORCE_SECURE_FORM ? SECURE_SERVER : 'http://'.DOMAIN).buildXFormsProFormURL($form->id, $formMetadata->language);?>" title="<?php print encodeHtml($form->title);?>"><?php print encodeHtml($form->title);?></a>
+ <a href="<?php print (FORCE_SECURE_FORM ? SECURE_SERVER : 'http://'.DOMAIN).buildXFormsProFormURL($form->getId(), $formMetadata->language);?>" title="<?php print encodeHtml($form->getTitle());?>"><?php print encodeHtml($form->getTitle());?></a>
<?php
if (!isset($_SESSION['userID']) && $form->allowUnregistered == 0) {
?>

public_html/site/xfp/scripts/category_rss.php

<?php
- include_once("websections/JaduRSS.php");
- include_once("JaduLibraryFunctions.php");
- include_once("JaduConstants.php");
- include_once("xforms2/JaduXFormsForm.php");
- include_once("xforms2/JaduXFormsProReadableURLs.php");
- include_once("utilities/JaduReadableURLs.php");
-
- function getCategoryName($categoryID)
- {
+
+use Jadu\Symfony\DependencyInjection\ServiceLocator;
+use Jadu\XFormsPro\Category\Service\CategoryFormService;
+
+include_once 'websections/JaduRSS.php';
+include_once 'JaduLibraryFunctions.php';
+include_once 'JaduConstants.php';
+include_once 'xforms2/JaduXFormsProReadableURLs.php';
+include_once 'utilities/JaduReadableURLs.php';
+
+function getCategoryName($categoryID)
+{
$categoryName = ' ';

- if (function_exists("getLiveCategoryList")) {
+ if (function_exists('getLiveCategoryList')) {
$categoryList = getLiveCategoryList(BESPOKE_CATEGORY_LIST_NAME);
- }
- else {
+ } else {
$categoryList = new CategoryList(BESPOKE_CATEGORY_LIST_NAME, BESPOKE_CATEGORY_LIST_FILE);
}

$categoryItem = $categoryList->GetCategory($categoryID);

- if ($categoryItem != null && $categoryItem->id == $categoryID) {
- $categoryName = ' ' . $categoryItem->name . ' ';
+ if (null != $categoryItem && $categoryItem->id == $categoryID) {
+ $categoryName = ' '.$categoryItem->name.' ';
}

return $categoryName;
- }
+}

- define('MAX_ITEMS', 10);
- $categoryName = ' ';
+define('MAX_ITEMS', 10);
+$categoryName = ' ';

- if (isset($_GET['content']) && $_GET['content'] != '') {
+if (isset($_GET['content']) && '' != $_GET['content']) {
+ /** @var CategoryFormService $categoryFormsService */
+ $categoryFormsService = ServiceLocator::get('xfp_core.form.category_form_service');
+ $formRepository = ServiceLocator::get('xfp_core.repository.form.builder.form');

$rssChannel = new RSSChannel();
$rssChannel->title = '';
$rssChannel->description = encodeXML(getSiteRootURL());

- if ($_GET['content'] == 'forms') {
- $xFormsList = array();
+ if ('forms' == $_GET['content']) {
+ $xFormsList = [];

- //Get press release items
- if ($_GET['categoryID'] == null || !is_numeric($_GET['categoryID'])) {
- $xFormsList = getXMostRecentlyCreatedXFormsForms(MAX_ITEMS, 'enterDate DESC', true);
- }
- else {
+ // Get press release items
+ if (null == $_GET['categoryID'] || !is_numeric($_GET['categoryID'])) {
+ $xFormsList = $formRepository->findNewlyCreatedForms(MAX_ITEMS, ['enterDate' => 'DESC'], true);
+ } else {
$categoryID = $_GET['categoryID'];
- $xFormsList = getAllFormsWithCategory($categoryID, true, true, BESPOKE_CATEGORY_LIST_NAME, -1, true);
+ $params['status'] = 'visibleOnline';
+ $restrictions = [
+ 'category' => true,
+ ];
+ $params['category'] = $categoryID;
+ $xFormsList = $categoryFormsService->getAllCategoryForms($params, $restrictions, -1);
$categoryName = getCategoryName($categoryID);
}

- $rssChannel->title = 'Latest' . $categoryName . 'Forms from ' . METADATA_GENERIC_NAME;
- $rssChannel->link = getSiteRootURL() . buildCategoryRSSURL($_GET['content'], $categoryID);
- $rssChannel->href = getSiteRootURL() . buildCategoryRSSURL($_GET['content'], $categoryID);
+ $rssChannel->title = 'Latest'.$categoryName.'Forms from '.METADATA_GENERIC_NAME;
+ $rssChannel->link = getSiteRootURL().buildCategoryRSSURL($_GET['content'], $categoryID);
+ $rssChannel->href = getSiteRootURL().buildCategoryRSSURL($_GET['content'], $categoryID);

foreach ($xFormsList as $form) {
$rssItem = new RSSItem();
- $rssItem->title = encodeXML($form->title);
- $rssItem->link = getSiteRootURL() . buildXFormsProFormURL($form->id);
- $rssItem->description = encodeXML($form->instructions);
- $rssItem->pubDate = date('r', $form->enterDate);
+ $rssItem->title = encodeXML($form->getTitle());
+ $rssItem->link = getSiteRootURL().buildXFormsProFormURL($form->getId());
+ $rssItem->description = encodeXML($form->getInstructions());
+ $rssItem->pubDate = date('r', $form->getEnterDate());

$rssChannel->addItem($rssItem);
}
- }
- else {
- header('Location: ' . getSiteRootURL());
- exit();
+ } else {
+ header('Location: '.getSiteRootURL());
+ exit;
+ }

$xml = createRSSString($rssChannel);

header('Content-type: text/xml');
$xml = str_replace('&nbsp;', '', $xml);
- print $xml;
- }
- else {
- header('Location: ' . getSiteRootURL());
- exit();
- }
-?>
+ echo $xml;
+} else {
+ header('Location: '.getSiteRootURL());
+ exit;
}

public_html/site/xfp/scripts/forms.php

<?php
- require_once("utilities/JaduStatus.php");
- require_once("JaduStyles.php");
- require_once("JaduMetadata.php");
- require_once("JaduCategories.php");
- require_once("xforms2/JaduXFormsForm.php");
- require_once("xforms2/JaduXFormsProReadableURLs.php");
- require_once("utilities/JaduAdministrators.php");
- require_once("egov/JaduCL.php");
- require_once("xforms2/DataMapper/FormMapper.php");
-
- $allXForms = array();
- $dirTree = array();
- $formMapper = new Jadu_XForms2_DataMapper_FormMapper(Jadu_Service_Container::getInstance()->getDb(), new Jadu_CacheManager());
-
- if (isset($_GET['categoryID']) && is_numeric($_GET['categoryID'])) {
- $allXForms = $formMapper->getAllForListView('online','',-1,$_GET['categoryID']);
+
+use Jadu\XFormsPro\Category\Service\CategoryFormService;
+use Jadu\Symfony\DependencyInjection\ServiceLocator;
+
+require_once("utilities/JaduStatus.php");
+require_once("JaduStyles.php");
+require_once("JaduMetadata.php");
+require_once("JaduCategories.php");
+require_once("xforms2/JaduXFormsProReadableURLs.php");
+require_once("utilities/JaduAdministrators.php");
+require_once("egov/JaduCL.php");
+
+$allXForms = array();
+$dirTree = array();
+
+/** @var CategoryFormService $categoryFormsService */
+$categoryFormsService = ServiceLocator::get('xfp_core.form.category_form_service');
+
+if (isset($_GET['categoryID']) && is_numeric($_GET['categoryID'])) {
+ $params['category'] = $_GET['categoryID'];
+ $params['status'] = 'online';
+ $restrictions = [
+ 'category' => true
+ ];
+ $allXForms = $categoryFormsService->getAllCategoryForms($params, $restrictions, -1);
foreach($allXForms as $key => $form) {
- if ($form->visible == 0 || $form->internalOnly == 1) {
+ if (!$form->isVisible() || $form->isInternalOnly()) {
unset($allXForms[$key]);
}
}

if (function_exists('getLiveCategoryList')) {
$bespokeCategoryList = getLiveCategoryList(BESPOKE_CATEGORY_LIST_NAME);
- }
- else {
+ } else {
$bespokeCategoryList = new CategoryList(BESPOKE_CATEGORY_LIST_NAME, BESPOKE_CATEGORY_LIST_FILE);
}

@@ -39,76 +47,80 @@
if (sizeof($allXForms) < 1 && sizeof($categories) < 1) {
header('HTTP/1.0 404 Not Found');
}
- }
- else {
+} else {
header('HTTP/1.0 404 Not Found');
- }
+}

- $MAST_BREADCRUMB = '<li><a href="' . getSiteRootURL() .'/site/" >Home</a></li><li><a href="' . getSiteRootURL() . buildXFormsProFormURL() .'" >Online forms</a></li>';
- $count = 0;
- foreach ($dirTree as $parent) {
+$MAST_BREADCRUMB = '<li><a href="' . getSiteRootURL() .'/site/" >Home</a></li><li><a href="' . getSiteRootURL() . buildXFormsProFormURL() .'" >Online forms</a></li>';
+$count = 0;
+foreach ($dirTree as $parent) {
if ($count < sizeof($dirTree) - 1) {
$MAST_BREADCRUMB .= '<li><a href="' . getSiteRootURL() . buildXFormsProCategoryURL($parent->id).'" >'. encodeHtml($parent->name) .'</a></li>';
- }
- else {
+ } else {
$MAST_BREADCRUMB .= '<li class="bc_end"><span>'. encodeHtml($parent->name) .'</span></li>';
$MAST_HEADING = 'Online forms: '. $parent->name ;
}
$count++;
- }
+}
?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html<?php if (defined('TEXT_DIRECTION') && TEXT_DIRECTION == 'rtl') print ' dir="rtl"'; ?> xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html<?php if (defined('TEXT_DIRECTION') && TEXT_DIRECTION == 'rtl') {
+ print ' dir="rtl"';
+} ?> xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
<title><?php print encodeHtml($currentCategory->name);?> forms - <?php print encodeHtml(METADATA_GENERIC_NAME); ?></title>
<?php include_once(HOME . "site/includes/stylesheets.php"); ?>
<?php include_once(HOME . "site/includes/metadata.php"); ?>

- <meta name="Keywords" content="<?php foreach ($dirTree as $parent) { print encodeHtml($parent->name) . ', '; } ?><?php print encodeHtml(METADATA_GENERIC_KEYWORDS); ?>" />
- <meta name="Description" content="<?php print encodeHtml(METADATA_GENERIC_NAME); ?>'s online forms organised within the following categories<?php foreach ($dirTree as $parent) { print ', ' . encodeHtml($parent->name); } ?>" />
+ <meta name="Keywords" content="<?php foreach ($dirTree as $parent) {
+ print encodeHtml($parent->name) . ', ';
+ } ?><?php print encodeHtml(METADATA_GENERIC_KEYWORDS); ?>" />
+ <meta name="Description" content="<?php print encodeHtml(METADATA_GENERIC_NAME); ?>'s online forms organised within the following categories<?php foreach ($dirTree as $parent) {
+ print ', ' . encodeHtml($parent->name);
+ } ?>" />

<meta name="DC.title" lang="en" content="<?php print encodeHtml(METADATA_GENERIC_NAME); ?> online forms<?php foreach ($dirTree as $parent) { ?> | <?php print encodeHtml($parent->name); ?><?php } ?>" />
- <meta name="DC.description" lang="en" content="<?php print encodeHtml(METADATA_GENERIC_NAME); ?>'s online forms organised within the following categories<?php foreach ($dirTree as $parent) { print ', ' . encodeHtml($parent->name); } ?>" />
+ <meta name="DC.description" lang="en" content="<?php print encodeHtml(METADATA_GENERIC_NAME); ?>'s online forms organised within the following categories<?php foreach ($dirTree as $parent) {
+ print ', ' . encodeHtml($parent->name);
+ } ?>" />

<meta name="DC.subject" lang="en" scheme="eGMS.IPSV" content="Local government;Government, politics and public administration" />
<meta name="DC.subject" lang="en" content="Council, government and democracy" />
-</head>
+ </head>
<body>
<!-- ########## MAIN STRUCTURE ######### -->
<?php include(HOME . "site/includes/opening.php"); ?>
<!-- ########################## -->

<?php
- if (sizeof($allXForms) > 0) {
-?>
+if (sizeof($allXForms) > 0) {
+ ?>
<h2>Available online forms</h2>
<ul class="list">
-<?php
+ <?php
foreach ($allXForms as $formItem) {
- $formMetadata = getMetadataForItem(XFORMS_METADATA_TABLE, $formItem->id);
- $url = $formItem->isLegacy !== 0 ?
- buildXFormsProFormURL($formItem->id, $formMetadata->language) :
- '/xfp/form/' . (int)$formItem->id;
-?>
- <li><a href="<?php print (FORCE_SECURE_FORM ? getSecureSiteRootURL() : 'http://'.DOMAIN) . $url;?>"><?php print encodeHtml($formItem->title); ?></a></li>
-<?php
+ $formMetadata = getMetadataForItem(XFORMS_METADATA_TABLE, $formItem->getId());
+ $url = '/xfp/form/' . (int)$formItem->getId();
+ ?>
+ <li><a href="<?php print(FORCE_SECURE_FORM ? getSecureSiteRootURL() : 'http://'.DOMAIN) . $url;?>"><?php print encodeHtml($formItem->getTitle()); ?></a></li>
+ <?php
}
-?>
+ ?>
</ul>
-<?php
- }
+ <?php
+}

- if (sizeof($splitArray['left']) > 0 || sizeof($splitArray['right']) > 0) {
-?>
+if (sizeof($splitArray['left']) > 0 || sizeof($splitArray['right']) > 0) {
+ ?>
<div class="cate_info">
<h2><?php print encodeHtml($parent->name); ?> categories</h2>
-<?php
+ <?php
if (sizeof($splitArray['left']) > 0) {
print '<ul class="info_left list">';
foreach ($splitArray['left'] as $subCat) {
-?>
+ ?>
<li><a href="http://<?php print DOMAIN . buildXFormsProCategoryURL($subCat->id); ?>"><?php print encodeHtml($subCat->name); ?></a> </li>
-<?php
+ <?php
}
print '</ul>';
}
@@ -116,24 +128,24 @@
if (sizeof($splitArray['right']) > 0) {
print '<ul class="info_right list">';
foreach ($splitArray['right'] as $subCat) {
-?>
+ ?>
<li><a href="http://<?php print DOMAIN . buildXFormsProCategoryURL($subCat->id);?>"><?php print encodeHtml($subCat->name); ?></a> </li>
-<?php
+ <?php
}
print '</ul>';
}
-?>
+ ?>
<div class="clear"></div>
</div>
-<?php
- }
+ <?php
+}
?>

- <p><a href="<?php print getSiteRootURL() . buildXFormsProCategoryRSSURL($_GET['categoryID']); ?>" target="_blank"><img src="<?php print getStaticContentRootURL(); ?>/site/images/xml.gif" alt="Get this feed" /> <?php print encodeHtml(METADATA_GENERIC_NAME . ' ' . $currentCategory->name); ?> feed</a></p>
+<p><a href="<?php print getSiteRootURL() . buildXFormsProCategoryRSSURL($_GET['categoryID']); ?>" target="_blank"><img src="<?php print getStaticContentRootURL(); ?>/site/images/xml.gif" alt="Get this feed" /> <?php print encodeHtml(METADATA_GENERIC_NAME . ' ' . $currentCategory->name); ?> feed</a></p>

- <!-- The Contact box -->
- <?php include(HOME . "site/includes/contactbox.php"); ?>
- <!-- END of the Contact box -->
+<!-- The Contact box -->
+<?php include(HOME . "site/includes/contactbox.php"); ?>
+<!-- END of the Contact box -->

<!-- ################ MAIN STRUCTURE ############ -->
<?php include(HOME . "site/includes/closing.php"); ?>

public_html/site/xfp/scripts/rss.php

<?php
- include_once("websections/JaduRSS.php");
- include_once("JaduLibraryFunctions.php");
- include_once("JaduConstants.php");
- include_once("utilities/JaduReadableURLs.php");

- $MAX_ITEMS = 20;
+use Jadu\Symfony\DependencyInjection\ServiceLocator;

- $rssChannel = new RSSChannel();
+include_once("websections/JaduRSS.php");
+include_once("JaduLibraryFunctions.php");
+include_once("JaduConstants.php");
+include_once("utilities/JaduReadableURLs.php");

- if (isset($_GET['events'])) {
+$MAX_ITEMS = 20;
+
+$rssChannel = new RSSChannel();
+
+if (isset($_GET['events'])) {
include_once("websections/JaduEvents.php");
include_once("egov/JaduEGovMeetingMinutes.php");
$events = array_merge(getNumEvents($MAX_ITEMS), getMeetingsAsEvents($MAX_ITEMS));
@@ -25,8 +28,7 @@
$rssItem->title = encodeXML($event->title);
if ($event->isMeeting) {
$rssItem->link = getSiteRootURL() . buildMeetingsURL(-1, 'meeting', $event->id, -1, true);
- }
- else {
+ } else {
$rssItem->link = getSiteRootURL() . buildEventsURL(-1, '', $event->id);
}

@@ -35,12 +37,12 @@

$rssChannel->addItem($rssItem);
}
- }
- elseif (isset($_GET['forms'])) {
- include_once("xforms2/JaduXFormsForm.php");
+} elseif (isset($_GET['forms'])) {
+
include_once("xforms2/JaduXFormsProReadableURLs.php");
+ $formRepository = ServiceLocator::get('xfp_core.repository.form.builder.form');
+ $forms = $formRepository->findNewlyCreatedForms($MAX_ITEMS, ['enterDate' => 'DESC', 'title' => 'ASC'], true);

- $forms = getXMostRecentlyCreatedXFormsForms($MAX_ITEMS, 'enterDate DESC, title', true);
$rssChannel->title = DOMAIN . " Latest Forms";
$rssChannel->description = encodeXML(METADATA_GENERIC_NAME . " Latest forms");
$rssChannel->link = getSecureSiteRootURL() . buildXFormsProFormURL();
@@ -48,15 +50,14 @@

foreach ($forms as $form) {
$rssItem = new RSSItem();
- $rssItem->title = encodeXML($form->title);
- $rssItem->link = getSecureSiteRootURL() . buildXFormsProFormURL($form->id);
+ $rssItem->title = encodeXML($form->getTitle());
+ $rssItem->link = getSecureSiteRootURL() . buildXFormsProFormURL($form->getId());
$rssItem->description = '';
- $rssItem->pubDate = date("r", $form->enterDate);
+ $rssItem->pubDate = date("r", $form->getEnterDate());

$rssChannel->addItem($rssItem);
}
- }
- elseif (isset($_GET['downloads'])) {
+} elseif (isset($_GET['downloads'])) {
include_once("websections/JaduDownloads.php");
$downloads = getXMostRecentlyCreatedDownloadFiles($MAX_ITEMS);
$rssChannel->title = DOMAIN . " Latest Downloads";
@@ -73,13 +74,13 @@

$rssChannel->addItem($rssItem);
}
- }
- elseif (isset($_GET['jobs']) && file_exists($JADU_HOME . 'recruitment/JaduRecruitmentJobs.php')) {
+} elseif (isset($_GET['jobs']) && file_exists($JADU_HOME . 'recruitment/JaduRecruitmentJobs.php')) {
include_once("recruitment/JaduRecruitmentJobs.php");
- $jobs = getLatestLiveJobs ($MAX_ITEMS, true);
+ $jobs = getLatestLiveJobs($MAX_ITEMS, true);
$rssChannel->title = DOMAIN . " Latest Jobs";
$rssChannel->description = encodeXML(METADATA_GENERIC_NAME . " Latest jobs");
- $rssChannel->link = 'http://' . DOMAIN . buildJobsURL();;
+ $rssChannel->link = 'http://' . DOMAIN . buildJobsURL();
+ ;

foreach ($jobs as $job) {
$rssItem = new RSSItem();
@@ -90,8 +91,7 @@

$rssChannel->addItem($rssItem);
}
- }
- elseif (isset($_GET['podcasts'])) {
+} elseif (isset($_GET['podcasts'])) {
include_once('multimedia/JaduMultimediaRSS.php');
include_once('multimedia/JaduMultimediaPodcasts.php');
include_once('utilities/JaduAdministrators.php');
@@ -118,8 +118,7 @@

$rssChannel->addItem($rssItem);
}
- }
- else {
+ } else {
if (!$podcast = getMultimediaPodcast($_GET['podcasts'], array('live' => true))) {
header('HTTP/1.0 404 Not Found');
exit();
@@ -190,8 +189,7 @@
}
}
}
- }
- elseif (isset($_GET['galleries'])) {
+} elseif (isset($_GET['galleries'])) {
include_once('multimedia/JaduMultimediaGalleries.php');
include_once('utilities/JaduAdministrators.php');
include_once('JaduImages.php');
@@ -218,8 +216,7 @@

$rssChannel->addItem($rssItem);
}
- }
- else {
+ } else {
if (!$gallery = getMultimediaGallery($_GET['galleries'], array('live' => true))) {
header('HTTP/1.0 404 Not Found');
exit();
@@ -249,8 +246,7 @@
}
}
}
- }
- else if (isset($_GET['press'])) {
+} elseif (isset($_GET['press'])) {
include_once("websections/JaduPressReleases.php");
$rssChannel->title = DOMAIN . " Latest Press Releases";
$rssChannel->description = encodeXML(METADATA_GENERIC_NAME . " Latest press releases");
@@ -268,8 +264,7 @@

$rssChannel->addItem($rssItem);
}
- }
- else {
+} else {
include_once("websections/JaduNews.php");
$rssChannel->title = DOMAIN . " Latest News";
$rssChannel->description = encodeXML(METADATA_GENERIC_NAME . " Latest news");
@@ -287,11 +282,12 @@

$rssChannel->addItem($rssItem);
}
- }
+}
+
+$xml = createRSSString($rssChannel);

- $xml = createRSSString($rssChannel);
+header("Content-type: text/xml");
+$xml = str_replace('&nbsp;', '', $xml);
+print $xml;

- header("Content-type: text/xml");
- $xml = str_replace('&nbsp;', '', $xml);
- print $xml;
?>

public_html/site/xfp/scripts/services_info.php

<?php
- include_once("utilities/JaduStatus.php");
- include_once("JaduStyles.php");
- include_once("JaduCategories.php");
-
- include_once("utilities/JaduMostPopular.php");
- include_once("egov/JaduEGovJoinedUpServices.php");
- include_once("egov/JaduEGovJoinedUpServicesContacts.php");
- include_once("egov/JaduPIDList.php");
- include_once("websections/JaduFAQ.php");
- include_once("websections/JaduDocuments.php");
+use Jadu\Symfony\DependencyInjection\ServiceLocator;

- include_once("xforms2/JaduXFormsForm.php");
- include_once("xforms2/JaduXFormsProReadableURLs.php");
+include_once("utilities/JaduStatus.php");
+include_once("JaduStyles.php");
+include_once("JaduCategories.php");

- $PID = null;
- $allLGCLCategories = array();
+include_once("utilities/JaduMostPopular.php");
+include_once("egov/JaduEGovJoinedUpServices.php");
+include_once("egov/JaduEGovJoinedUpServicesContacts.php");
+include_once("egov/JaduPIDList.php");
+include_once("websections/JaduFAQ.php");
+include_once("websections/JaduDocuments.php");

- // Default to approved/live
- $approvedOnly = true;
- $liveOnly = true;
+include_once("xforms2/JaduXFormsProReadableURLs.php");

- // Check whether an administrator is previewing the page
- if (isset($_GET['adminID']) && isset($_GET['preview']) && isset($_GET['expire'])) {
+$PID = null;
+$allLGCLCategories = array();
+
+// Default to approved/live
+$approvedOnly = true;
+$liveOnly = true;
+
+// Check whether an administrator is previewing the page
+if (isset($_GET['adminID']) && isset($_GET['preview']) && isset($_GET['expire'])) {
include_once('utilities/JaduAdministrators.php');
$approvedOnly = $liveOnly = !validateAdminPreviewHash(getAdministrator($_GET['adminID']), $_GET['preview'], $_GET['expire']);
- }
+}

- if (isset($_GET['pid']) && $_GET['pid'] > 0) {
+if (isset($_GET['pid']) && $_GET['pid'] > 0) {
$services = getAllServicesWithPID_ID($_GET['pid']);

if (sizeof($services) > 0) {
$serviceID = $services[0]->id;
}
- }
+}

- if (isset($_GET['serviceID']) && $_GET['serviceID'] > 0) {
+if (isset($_GET['serviceID']) && $_GET['serviceID'] > 0) {
$serviceID = intval($_GET['serviceID']);
- }
+}

- $service = null;
+$service = null;

- if (isset($serviceID) && $serviceID > 0) {
+if (isset($serviceID) && $serviceID > 0) {
$service = getService($serviceID, $liveOnly, $approvedOnly);
if ($service->id > 0) {
if (function_exists("getLiveCategoryList")) {
$lgclList = getLiveCategoryList(BESPOKE_CATEGORY_LIST_NAME);
- }
- else {
+ } else {
$lgclList = new CategoryList(BESPOKE_CATEGORY_LIST_NAME, BESPOKE_CATEGORY_LIST_FILE);
}

@@ -64,26 +65,28 @@
exit;
}
}
- }
+}

- if ($service == null || $service->id < 1) {
+if ($service == null || $service->id < 1) {
header("HTTP/1.0 404 Not Found");
- }
+}

- $allServices = getAllServicesWithTitleAliases(true, true);
- $validLetters = getAllValidAlphabetLetters($allServices);
+$allServices = getAllServicesWithTitleAliases(true, true);
+$validLetters = getAllValidAlphabetLetters($allServices);

- $title = $service->title;
- if (mb_strlen($title) > 64) {
+$title = $service->title;
+if (mb_strlen($title) > 64) {
$title = mb_substr($title, 0, 61) . "...";
- }
+}

- $MAST_HEADING = 'A to Z';
- $MAST_BREADCRUMB = '<a href="' . getSiteRootURL() .'/">Home</a><a href="' . getSiteRootURL() . buildAToZURL() .'">A to Z of services</a><span>'. encodeHtml($service->title) .'</span>';
+$MAST_HEADING = 'A to Z';
+$MAST_BREADCRUMB = '<a href="' . getSiteRootURL() .'/">Home</a><a href="' . getSiteRootURL() . buildAToZURL() .'">A to Z of services</a><span>'. encodeHtml($service->title) .'</span>';
?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html<?php if (defined('TEXT_DIRECTION') && TEXT_DIRECTION == 'rtl') print ' dir="rtl"'; ?> xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html<?php if (defined('TEXT_DIRECTION') && TEXT_DIRECTION == 'rtl') {
+ print ' dir="rtl"';
+} ?> xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
<title><?php print encodeHtml($title); ?> - <?php print encodeHtml(METADATA_GENERIC_NAME); ?></title>

<?php include_once(HOME . "site/includes/stylesheets.php"); ?>
@@ -91,43 +94,41 @@

<meta name="Keywords" content="<?php print encodeHtml($service->title);?>, services, a-z, <?php print encodeHtml(METADATA_GENERIC_KEYWORDS); ?>" />
<meta name="Description" content="<?php print encodeHtml($service->title);?> - <?php print encodeHtml(METADATA_GENERIC_NAME); ?> A to Z of services" />
-<?php
+ <?php
list($metadata, $gclString, $lgclString, $gclNonPreferred) = getAllMetadata(SERVICES_METADATA_TABLE, SERVICES_CATEGORIES_TABLE, $_GET['serviceID']);
$meta = new JaduMetadata();

if ($gclString != '' && $lgclString != '' && $meta != $metadata) {
printMetadata(SERVICES_METADATA_TABLE, SERVICES_CATEGORIES_TABLE, $_GET['serviceID'], $service->title, "http://".$DOMAIN.$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']);
- }
- else {
-?>
+ } else {
+ ?>
<meta name="DC.title" lang="en" content="<?php print encodeHtml($service->title);?> - <?php print encodeHtml(METADATA_GENERIC_NAME); ?> A to Z of services" />
<meta name="DC.description" lang="en" content="<?php print encodeHtml($service->title);?> - <?php print encodeHtml(METADATA_GENERIC_NAME); ?> A to Z of services" />

<meta name="DC.subject" lang="en" scheme="eGMS.IPSV" content="Local government;Government, politics and public administration" />
<meta name="DC.subject" lang="en" content="Council, government and democracy" />
-<?php
+ <?php
}
if ($service->PID_ID > 0) {
-?>
+ ?>
<meta name="eGMS.subject.service" lang="en" scheme="LGSL" content="<?php print encodeHtml($PID->PIDName); ?>" />
-<?php
+ <?php
}
-?>
+ ?>
<script type="text/javascript" src="<?php print getStaticContentRootURL(); ?>/site/javascript/prototype.js"></script>
-</head>
+ </head>
<body>
<!-- ########## MAIN STRUCTURE ######### -->
<?php include(HOME . "site/includes/opening.php"); ?>
<!-- ########################## -->

<?php
- if ($service->id == -1) {
-?>
+if ($service->id == -1) {
+ ?>
<h2>Sorry - this entry is not available</h2>
-<?php
- }
- else {
-?>
+ <?php
+} else {
+ ?>

<!-- DESCRIPTION -->
<div class="lead_item">
@@ -138,7 +139,7 @@
</div>

<!-- Forms -->
-<?php
+ <?php
$formsWithCategory = array();
foreach ($allLGCLCategories as $lgclCategory) {
if ($lgclCategory !== null) {
@@ -147,53 +148,54 @@
}

$liveForms = array();
+ $formRepository = ServiceLocator::get('xfp_core.repository.form.builder.form');
foreach($formsWithCategory as $formWithCategory) {
- $form = getXFormsForm($formWithCategory->itemID, true, true);
- if ($form != -1) {
+ $form = $formRepository->find($formWithCategory->itemID);
+ if (!empty($form)) {
$liveForms[] = $form;
}
}

if (sizeof($liveForms) > 0) {
-?>
+ ?>
<div class="listed_item">
<h2>Online Services</h2>
<ul class="list">
-<?php
+ <?php
foreach ($liveForms as $form) {
- print '<li><a href="'.(FORCE_SECURE_FORM ? getSecureSiteRootURL() : 'http://'.DOMAIN).buildXFormsProFormURL($form->id) . '">' . encodeHtml($form->title) . '</a></li>';
+ print '<li><a href="'.(FORCE_SECURE_FORM ? getSecureSiteRootURL() : 'http://'.DOMAIN).buildXFormsProFormURL($form->getId()) . '">' . encodeHtml($form->getTitle()) . '</a></li>';
}
-?>
+ ?>
</ul>
</div>
-<?php
+ <?php
}

if (mb_strlen(trim($service->eligibility)) > 0) {
-?>
+ ?>
<div class="listed_item">
<h2>Eligibility</h2>
<?php print encodeHtml($service->eligibility); ?>
</div>
-<?php
+ <?php
}

if (mb_strlen(trim($service->accessibility)) > 0) {
-?>
+ ?>
<div class="listed_item">
<h2>Accessibility</h2>
<?php print encodeHtml($service->accessibility); ?>
</div>
-<?php
+ <?php
}

if (mb_strlen(trim($service->availability)) > 0) {
-?>
+ ?>
<div class="listed_item">
<h2>Availability</h2>
<?php print encodeHtml($service->availability); ?>
</div>
-<?php
+ <?php
}

$faqsWithCategory = array();
@@ -203,21 +205,21 @@
}
}
if (sizeof($faqsWithCategory) > 0) {
-?>
+ ?>
<div class="listed_item">
<h2>Common Questions</h2>
<ul class="list">
-<?php
+ <?php
foreach ($faqsWithCategory as $faqWithCategory) {
$faq = getFAQ($faqWithCategory->itemID);
if (isset($faq) && $faq->id != -1) {
print '<li><a href="' . getSiteRootURL() . buildIndividualFAQURL($faq->id) . '">' . encodeHtml($faq->question) . '</a></li>';
}
}
-?>
+ ?>
</ul>
</div>
-<?php
+ <?php
}

$docsWithCategory = array();
@@ -234,39 +236,51 @@
}
}
if (sizeof($docsWithCategoryAndId) > 0) {
-?>
+ ?>
<div class="listed_item">
<h2>Further Information</h2>
<ul class="list">
-<?php
+ <?php
foreach ($docsWithCategoryAndId as $doc) {
$docHeader = getDocumentHeader($doc->headerOriginalID);
-?>
+ ?>
<li><a href="<?php print getSiteRootURL() . buildDocumentsURL($doc->id); ?>"><?php print encodeHtml($docHeader->title); ?></a></li>
-<?php
+ <?php
}
-?>
+ ?>
</ul>
</div>
-<?php
+ <?php
}
-?>
+ ?>


<!-- CONTACTS -->
-<?php
+ <?php
$serviceContacts = $service->getContacts();
if (count($serviceContacts) > 0) {
-?>
+ ?>
<div class="listed_item">
-<?php
+ <?php
foreach ($serviceContacts as $serviceContact) {
- if ($serviceContact->name != "") print "<h3>Contact: " . encodeHtml($serviceContact->name) . " " . encodeHtml($serviceContact->jobTitle) . "</h3>";
- if ($serviceContact->department != "") print "<p><strong>Department: " . encodeHtml($serviceContact->department) . "</strong></p>";
- if ($serviceContact->email != "") print "<p><span class=\"email\">Email: <a href=\"mailto:" . encodeHtml($serviceContact->email) . "\">" . encodeHtml($serviceContact->email) . "</a></span></p>";
- if ($serviceContact->telephone != "") print "<p><span class=\"tel\">Telephone: " . encodeHtml($serviceContact->telephone) . "</span></p>";
- if ($serviceContact->fax != "") print "<p><span class=\"fax\">Fax: " . encodeHtml($serviceContact->fax) . "</span></p>";
- if ($serviceContact->url != "") print "<address><span class=\"adr\">Visit: <a href=\"" . encodeHtml($serviceContact->url) . "\">" . encodeHtml($serviceContact->url) . "</a></span></address>";
+ if ($serviceContact->name != "") {
+ print "<h3>Contact: " . encodeHtml($serviceContact->name) . " " . encodeHtml($serviceContact->jobTitle) . "</h3>";
+ }
+ if ($serviceContact->department != "") {
+ print "<p><strong>Department: " . encodeHtml($serviceContact->department) . "</strong></p>";
+ }
+ if ($serviceContact->email != "") {
+ print "<p><span class=\"email\">Email: <a href=\"mailto:" . encodeHtml($serviceContact->email) . "\">" . encodeHtml($serviceContact->email) . "</a></span></p>";
+ }
+ if ($serviceContact->telephone != "") {
+ print "<p><span class=\"tel\">Telephone: " . encodeHtml($serviceContact->telephone) . "</span></p>";
+ }
+ if ($serviceContact->fax != "") {
+ print "<p><span class=\"fax\">Fax: " . encodeHtml($serviceContact->fax) . "</span></p>";
+ }
+ if ($serviceContact->url != "") {
+ print "<address><span class=\"adr\">Visit: <a href=\"" . encodeHtml($serviceContact->url) . "\">" . encodeHtml($serviceContact->url) . "</a></span></address>";
+ }
if (EGOV_SERVICE_CONTACT_MODE != "Complex" && $serviceContact->address != "") {
print "<address><span class=\"adr\">" . nl2br(encodeHtml($serviceContact->address)) . "</span></address>";
}
@@ -277,15 +291,15 @@
}
}
}
-?>
+ ?>
</div>

-<?php
- }
+ <?php
}
+}
?>

- <form class="basic_form" action="<?php print getSiteRootURL() . buildAZServiceURL($service->id); ?>" method="get">
+<form class="basic_form" action="<?php print getSiteRootURL() . buildAZServiceURL($service->id); ?>" method="get">
<input type="hidden" name="serviceID" value="<?php print (int) $_GET['serviceID'];?>" />
<p id="az_live_find">
Begin to type the name and select from the appearing choices.
@@ -297,18 +311,18 @@
</span>
</p>
<div id="search_results">
-<?php
+ <?php
if(isset($_GET['searchAZButton'])) {
- include(HOME . 'site/xfp/includes/az_search_results.php' );
+ include(HOME . 'site/xfp/includes/az_search_results.php');
}
-?>
+ ?>
</div>
- </form>
+</form>

- <script type="text/javascript">
+<script type="text/javascript">
var theButton = document.getElementById('nonJavascriptButton');
theButton.style.display = 'none';
- </script>
+</script>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php print GOOGLE_MAPS_API_KEY; ?>" type="text/javascript"></script>
<script src="http://www.google.com/uds/api?file=uds.js&amp;v=1.0&amp;key=<?php print GOOGLE_MAPS_API_KEY; ?>" type="text/javascript"></script>
<script type="text/javascript" src="<?php print getStaticContentRootURL(); ?>/site/xfp/javascript/livesearch.js"></script>

public_html/site/xfp/scripts/user_form_archive.php

<?php
- use Doctrine\Common\Collections\Criteria;
- use Jadu\XFormsPro\Form\Builder\UserFormActionLog;
- use Jadu\XFormsPro\Widget\UserFormWidget;
- use Jadu\Symfony\DependencyInjection\ServiceLocator;
- use Jadu\Service\User as ServiceUser;
+use Doctrine\Common\Collections\Criteria;
+use Jadu\Service\User as ServiceUser;
+use Jadu\Symfony\DependencyInjection\ServiceLocator;
+use Jadu\XFormsPro\Form\Builder\UserFormActionLog;
+use Jadu\XFormsPro\Widget\UserFormWidget;

- require_once("utilities/JaduStatus.php");
+require_once 'utilities/JaduStatus.php';

- // Force onto SSL if required.
- if ((defined('SSL_ENABLED') && SSL_ENABLED) && PROTOCOL != 'https://') {
- header("Location: ".getSecureSiteRootURL().$_SERVER['REQUEST_URI']);
+// Force onto SSL if required.
+if ((defined('SSL_ENABLED') && SSL_ENABLED) && PROTOCOL != 'https://') {
+ header('Location: '.getSecureSiteRootURL().$_SERVER['REQUEST_URI']);
exit;
- }
+}

- require_once("JaduStyles.php");
- require_once("xforms2/JaduXFormsForm.php");
- require_once("xforms2/JaduXFormsUserForms.php");
- require_once("xforms2/JaduXFormsPDFForms.php");
- require_once("xforms2/JaduXFormsCRMSubmissionLog.php");
- require_once("xforms2/JaduXFormsProReadableURLs.php");
- require_once("xforms2/JaduXFormsTabs.php");
- require_once("xforms2/Form/Actions.php");
+require_once 'JaduStyles.php';
+require_once 'xforms2/JaduXFormsPDFForms.php';
+require_once 'xforms2/JaduXFormsProReadableURLs.php';

- if (ServiceUser::getInstance()->isSessionLoggedIn()) {
+if (ServiceUser::getInstance()->isSessionLoggedIn()) {
$userID = ServiceUser::getInstance()->getSessionUser()->id;
- }
- else {
- header ("Location: $ERROR_REDIRECT_PAGE");
- exit();
- }
+} else {
+ header("Location: $ERROR_REDIRECT_PAGE");
+ exit;
+}

- $recievedFormService = ServiceLocator::get('xfp_core.user_form.received_form_service');
- $allSubmittedUserForms = $recievedFormService->getSubmittedUserForms($userID);
+$recievedFormService = ServiceLocator::get('xfp_core.user_form.received_form_service');
+$allSubmittedUserForms = $recievedFormService->getSubmittedUserForms($userID);

- $userFormWidget = new UserFormWidget();
+$userFormWidget = new UserFormWidget();

- $MAST_HEADING = 'Online Form archive';
- $MAST_BREADCRUMB = '<a href="' . getSiteRootURL() .'/">Home</a><a href="' . Jadu_Service_User::getInstance()->getAdapter()->getAccountURL() .'">Your Account</a><span>Online form archive</span>';
+$MAST_HEADING = 'Online Form archive';
+$MAST_BREADCRUMB = '<a href="'.getSiteRootURL().'/">Home</a><a href="'.Jadu_Service_User::getInstance()->getAdapter()->getAccountURL().'">Your Account</a><span>Online form archive</span>';
?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html<?php if (defined('TEXT_DIRECTION') && TEXT_DIRECTION == 'rtl') print ' dir="rtl"'; ?> xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>Form archive - <?php print encodeHtml(METADATA_GENERIC_NAME); ?></title>
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html<?php if (defined('TEXT_DIRECTION') && TEXT_DIRECTION == 'rtl') {
+ echo ' dir="rtl"';
+} ?> xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>Form archive - <?php echo encodeHtml(METADATA_GENERIC_NAME); ?></title>

- <?php include_once(HOME . "site/includes/stylesheets.php"); ?>
- <?php include_once(HOME . "site/includes/metadata.php"); ?>
+ <?php include_once HOME.'site/includes/stylesheets.php'; ?>
+ <?php include_once HOME.'site/includes/metadata.php'; ?>

- <meta name="Keywords" content="home, homepage, index, root, <?php print encodeHtml(METADATA_GENERIC_KEYWORDS); ?>" />
- <meta name="Description" content="<?php print DOMAIN; ?> is the online resource for <?php print encodeHtml(METADATA_GENERIC_NAME); ?> - with council services online" />
+ <meta name="Keywords" content="home, homepage, index, root, <?php echo encodeHtml(METADATA_GENERIC_KEYWORDS); ?>" />
+ <meta name="Description" content="<?php echo DOMAIN; ?> is the online resource for <?php echo encodeHtml(METADATA_GENERIC_NAME); ?> - with council services online" />

- <meta name="DC.title" lang="en" content="<?php print encodeHtml(METADATA_GENERIC_NAME); ?> Online - Tel: <?php print encodeHtml($address->telephone);?>" />
- <meta name="DC.description" lang="en" content="<?php print DOMAIN; ?> is the online resource for <?php print encodeHtml(METADATA_GENERIC_NAME); ?> - with council services online" />
+ <meta name="DC.title" lang="en" content="<?php echo encodeHtml(METADATA_GENERIC_NAME); ?> Online - Tel: <?php echo encodeHtml($address->telephone); ?>" />
+ <meta name="DC.description" lang="en" content="<?php echo DOMAIN; ?> is the online resource for <?php echo encodeHtml(METADATA_GENERIC_NAME); ?> - with council services online" />

<meta name="DC.subject" lang="en" scheme="eGMS.IPSV" content="Local government;Government, politics and public administration" />
<meta name="DC.subject" lang="en" content="Council, government and democracy" />
-</head>
+ </head>
<body>
<!-- ########## MAIN STRUCTURE ######### -->
-<?php include(HOME . "site/includes/opening.php"); ?>
+<?php include HOME.'site/includes/opening.php'; ?>
<!-- ########################## -->

<?php
- if (sizeof($allSubmittedUserForms) > 0) {
-?>
+if (sizeof($allSubmittedUserForms) > 0) {
+ ?>
<h2>Your submitted forms</h2>

-<?php
+ <?php
foreach ($allSubmittedUserForms as $userForm) {
$form = $recievedFormService->getFormDetails($userForm->getFormId());
- $actualForm = getXFormsForm($userForm->getFormId());
- $formUrl = getSecureSiteRootURL() . buildXFormsProUserFormURL($userForm->getId());
-?>
+ $formUrl = getSecureSiteRootURL().buildXFormsProUserFormURL($userForm->getId());
+ ?>
<div class="search_result">
- <h3><?php print encodeHtml($form->title);?> - <a href="<?php print getSecureSiteRootURL() . buildXFormsProUserFormURL($userForm->getId()); ?>">Reference No: <?php print intval($userForm->getId()); ?></a></h3>
+ <h3><?php echo encodeHtml($form->getTitle()); ?> - <a href="<?php echo getSecureSiteRootURL().buildXFormsProUserFormURL($userForm->getId()); ?>">Reference No: <?php echo intval($userForm->getId()); ?></a></h3>

<ul class="list">
- <li><?php print encodeHtml("Completed: " . $userForm->getSubmittedTime()->format("jS F Y")); ?></li>
- <li><a href="<?php print getSecureSiteRootURL().buildXFormsProUserFormURL($userForm->getId()); ?>">View submitted form</a></li>
-<?php
+ <li><?php echo encodeHtml('Completed: '.$userForm->getSubmittedTime()->format('jS F Y')); ?></li>
+ <li><a href="<?php echo getSecureSiteRootURL().buildXFormsProUserFormURL($userForm->getId()); ?>">View submitted form</a></li>
+ <?php
if ($userForm->isModernForm()) {
$logs = $userForm->getActionLogs();

@@ -93,9 +88,9 @@
if (!empty($log->getResult())) {
$cxmURL = ServiceLocator::get('xfp_core.cxm.service.cxm_link_generator')->getURL($log->getResult(), true);
if (!empty($cxmURL)) {
-?>
- <li><a class="cxm" href="<?php print encodeHtml($cxmURL); ?>">View updates or talk to someone about this</a></li>
-<?php
+ ?>
+ <li><a class="cxm" href="<?php echo encodeHtml($cxmURL); ?>">View updates or talk to someone about this</a></li>
+ <?php
}
}
}
@@ -112,66 +107,33 @@

foreach ($filtered as $log) {
if (!empty($log->getResult())) {
- $pdfHash = md5(HASH_SALT . $userForm->getId() . SECURE_SERVER . METADATA_GENERIC_NAME);
-?>
- <li><a href="<?php print getSecureSiteRootURL().buildXFormsProStreamPDFUserFormURL($userForm->getId(), $pdfHash); ?>">Download completed PDF form</a> <img src="<?php print getSecureSiteRootURL(); ?>/site/images/file_type_icons/PDF.gif" alt="PDF icon" title="PDF" /></li>
-<?php
+ $pdfHash = md5(HASH_SALT.$userForm->getId().SECURE_SERVER.METADATA_GENERIC_NAME);
+ ?>
+ <li><a href="<?php echo getSecureSiteRootURL().buildXFormsProStreamPDFUserFormURL($userForm->getId(), $pdfHash); ?>">Download completed PDF form</a> <img src="<?php echo getSecureSiteRootURL(); ?>/site/images/file_type_icons/PDF.gif" alt="PDF icon" title="PDF" /></li>
+ <?php
break;
}
}
}
- else {
- $legacyUserForm = getXFormsUserForm($userForm->getId());
- $legacyUserForm = extendXFormsUserFormWithCRMSubmissionDetailsAvailable($legacyUserForm);
-
- $tabs = new \Jadu_XForms2_Tabs($actualForm);
- $formActions = new \Jadu_XForms2_Form_Action();
- $actionMappings = $formActions->all($actualForm->id);
-
- $cxmLink = '';
- foreach ($actionMappings as $actionMapping) {
- $action = $tabs->getActionByID($actionMapping->actionID);
- if (is_object($action) && get_class($action) == 'Jadu\XFormsPro\CXM\Action\CXMAction' && $action->enabled()) {
- $cxmLinkGenerator = ServiceLocator::get('xfp_core.cxm.service.cxm_link_generator');
- $cxmLink = $cxmLinkGenerator->generate($legacyUserForm, true, true, false);
-
- if ($cxmLink != '') {
-?>
- <li><a class="cxm" href="<?php print encodeHtml($cxmLink); ?>">View updates or talk to someone about this</a></li>
-<?php
- }
- }
- }
-
- $pdfFilename = XFORMS_RECEIVED_PDF_FORMS_DIRECTORY . 'JADU_' . $userForm->getSubmittedTime()->format('Y-m-d') . '_' . $userForm->id . '.pdf';
- $userPDFFormExists = checkXFormsUserPDFFormExists($pdfFilename);
-
- if ($userPDFFormExists === XFORMS_PDF_FORM_EXCEPTION_SUCCESSFUL) {
- $pdfHash = md5(HASH_SALT . $userForm->id . SECURE_SERVER . METADATA_GENERIC_NAME);
-?>
- <li><a href="<?php print getSecureSiteRootURL().buildXFormsProStreamPDFUserFormURL($userForm->id, $pdfHash); ?>">Download completed PDF form</a> <img src="<?php print getSecureSiteRootURL(); ?>/site/images/file_type_icons/PDF.gif" alt="PDF icon" title="PDF" /></li>
-<?php
- }
- }
-?>
+ ?>
</ul>
</div>

-<?php
- }
+ <?php
}
+}

- if (sizeof($allSubmittedUserForms) == 0 && sizeof($allUnsubmittedUserForms) == 0) {
-?>
- <p class="first">You have not yet submitted any forms to <?php print encodeHtml(METADATA_GENERIC_NAME); ?>.</p>
-<?php
- }
+if (empty($allSubmittedUserForms)) {
+ ?>
+ <p class="first">You have not yet submitted any forms to <?php echo encodeHtml(METADATA_GENERIC_NAME); ?>.</p>
+ <?php
+}
?>

- <!-- The Contact box -->
- <?php include(HOME . "site/includes/contactbox.php"); ?>
- <!-- END of the Contact box -->
+<!-- The Contact box -->
+<?php include HOME.'site/includes/contactbox.php'; ?>
+<!-- END of the Contact box -->


<!-- ################ MAIN STRUCTURE ############ -->
-<?php include(HOME . "site/includes/closing.php"); ?>
+<?php include HOME.'site/includes/closing.php'; ?>

public_html/site/xfp/scripts/user_form_info.php

<?php
- use Doctrine\Common\Collections\Criteria;
- use Jadu\XFormsPro\Form\Builder\UserFormActionLog;
- use Jadu\XFormsPro\Widget\UserFormWidget;
- use Jadu\Symfony\DependencyInjection\ServiceLocator;
- use Jadu\Service\User as ServiceUser;
-
- require_once("utilities/JaduStatus.php");
+use Doctrine\Common\Collections\Criteria;
+use Jadu\XFormsPro\Form\Builder\UserFormActionLog;
+use Jadu\XFormsPro\Widget\UserFormWidget;
+use Jadu\Symfony\DependencyInjection\ServiceLocator;
+use Jadu\Service\User as ServiceUser;

- // Force onto SSL if required.
- if ((defined('SSL_ENABLED') && SSL_ENABLED) && PROTOCOL != 'https://') {
+require_once("utilities/JaduStatus.php");

+// Force onto SSL if required.
+if ((defined('SSL_ENABLED') && SSL_ENABLED) && PROTOCOL != 'https://') {
header("Location: ".getSecureSiteRootURL().$_SERVER['REQUEST_URI']);
exit;
- }
+}
+
+require_once("JaduStyles.php");
+require_once("JaduMetadata.php");
+require_once("xforms2/JaduXFormsPDFForms.php");
+require_once("xforms2/JaduXFormsProReadableURLs.php");
+require_once("xforms2/JaduXFormsFormLibraryFunctions.php");

- require_once("JaduStyles.php");
- require_once("JaduMetadata.php");
- require_once("xforms2/JaduXFormsForm.php");
- require_once("xforms2/JaduXFormsUserForms.php");
- require_once("xforms2/JaduXFormsUserQuestionAnswers.php");
- require_once("xforms2/JaduXFormsPDFForms.php");
- require_once("xforms2/JaduXFormsCRMSubmissionLog.php");
- require_once("xforms2/JaduXFormsProReadableURLs.php");
- require_once("xforms2/JaduXFormsFormLibraryFunctions.php");
- require_once("xforms2/JaduXFormsTabs.php");
- require_once("xforms2/Form/Actions.php");
-
- $userPDFFormExists = false;
-
- if (ServiceUser::getInstance()->isSessionLoggedIn()) {
+$userPDFFormExists = false;
+
+if (ServiceUser::getInstance()->isSessionLoggedIn()) {
$userID = ServiceUser::getInstance()->getSessionUser()->id;
- }
- else {
- header ("Location: $ERROR_REDIRECT_PAGE");
+} else {
+ header("Location: $ERROR_REDIRECT_PAGE");
exit();
- }
+}

- if (isset($_GET['userFormID']) && is_numeric($_GET['userFormID'])) {
+if (isset($_GET['userFormID']) && is_numeric($_GET['userFormID'])) {
$recievedFormService = ServiceLocator::get('xfp_core.user_form.received_form_service');
$userForm = $recievedFormService->getUserForm($_GET['userFormID']);

if ($userForm && $userForm->getUserId() == $userID) {
$form = $recievedFormService->getFormDetails($userForm->getFormId());
- }
- else {
- header ("Location: $ERROR_REDIRECT_PAGE");
+ } else {
+ header("Location: $ERROR_REDIRECT_PAGE");
exit;
}
- }
- else {
- header ("Location: $ERROR_REDIRECT_PAGE");
+} else {
+ header("Location: $ERROR_REDIRECT_PAGE");
exit;
- }
+}

- $languagePack = includeAndReturnCorrectLanguagePack(getMetadata(XFORMS_METADATA_TABLE, $form->id));
- $userFormWidget = new UserFormWidget();
+$languagePack = includeAndReturnCorrectLanguagePack(getMetadata(XFORMS_METADATA_TABLE, $form->getId()));
+$userFormWidget = new UserFormWidget();

- $MAST_HEADING = 'Form archive';
- $MAST_BREADCRUMB = '<a href="' . getSiteRootURL() .'/">Home</a><a href="' . Jadu_Service_User::getInstance()->getAdapter()->getAccountURL() .'">Your Account</a><a href="' . getSecureSiteRootURL() . buildUserFormURL() .'">Form Archive</a><span>'. encodeHtml($form->title) .'</span>';
+$MAST_HEADING = 'Form archive';
+$MAST_BREADCRUMB = '<a href="' . getSiteRootURL() .'/">Home</a><a href="' . Jadu_Service_User::getInstance()->getAdapter()->getAccountURL() .'">Your Account</a><a href="' . getSecureSiteRootURL() . buildUserFormURL() .'">Form Archive</a><span>'. encodeHtml($form->getTitle()) .'</span>';
?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html<?php if (defined('TEXT_DIRECTION') && TEXT_DIRECTION == 'rtl') print ' dir="rtl"'; ?> xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title><?php print encodeHtml($form->title); ?> - Form archive - <?php print encodeHtml(METADATA_GENERIC_NAME); ?></title>
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html<?php if (defined('TEXT_DIRECTION') && TEXT_DIRECTION == 'rtl') {
+ print ' dir="rtl"';
+} ?> xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title><?php print encodeHtml($form->getTitle()); ?> - Form archive - <?php print encodeHtml(METADATA_GENERIC_NAME); ?></title>

<?php include_once(HOME . "site/includes/stylesheets.php"); ?>
<?php include_once(HOME . "site/includes/metadata.php"); ?>

- <meta name="Keywords" content="forms, form, application, archive, archives, <?php print encodeHtml($form->title);?>, <?php print encodeHtml(METADATA_GENERIC_KEYWORDS); ?>" />
+ <meta name="Keywords" content="forms, form, application, archive, archives, <?php print encodeHtml($form->getTitle());?>, <?php print encodeHtml(METADATA_GENERIC_KEYWORDS); ?>" />
<meta name="Description" content="<?php print encodeHtml(METADATA_GENERIC_NAME); ?> online user forms archive" />

- <meta name="DC.title" lang="en" content="<?php print encodeHtml(METADATA_GENERIC_NAME); ?> form archive - <?php print encodeHtml($form->title);?>" />
+ <meta name="DC.title" lang="en" content="<?php print encodeHtml(METADATA_GENERIC_NAME); ?> form archive - <?php print encodeHtml($form->getTitle());?>" />
<meta name="DC.description" lang="en" content="<?php print encodeHtml(METADATA_GENERIC_NAME); ?> online user forms archive" />

<meta name="DC.subject" lang="en" scheme="eGMS.IPSV" content="Local government;Government, politics and public administration" />
<meta name="DC.subject" lang="en" content="Council, government and democracy" />
-</head>
+ </head>
<body>
<!-- ########## MAIN STRUCTURE ######### -->
<?php include(HOME . "site/includes/opening.php"); ?>
<!-- ########################## -->

- <table summary="Name of the form with its reference number">
+<table summary="Name of the form with its reference number">
<tr>
<th><strong>Form:</strong></th>
- <td><?php print encodeHTML($form->title);?></td>
+ <td><?php print encodeHTML($form->getTitle());?></td>
</tr>
<tr>
<th>Reference No:</th>
@@ -92,115 +86,71 @@
<tr>
<th>Completed:</th>
<td>
-<?php
+ <?php
$completed = $userForm->getSubmittedTime();
if (is_int($completed)) {
$format = str_replace('%O', date('S', $completed), FORMAT_DATE_LONG);
print strftime($format, $userForm->getSubmittedTime());
- }
- else {
+ } else {
print $userForm->getSubmittedTime()->format("jS F Y");
}
-?>
+ ?>
</td>
</tr>
- </table>
-
-<?php
- if ($form->isLegacy !== 0) {
- $allUserFormAnswers = getAllXFormsQuestionAnswersForForm($userForm->getId());
-
- // Printout the users inputs for confirmation back to them.
- include("../includes/xforms_form_confirmation_include.php");
-
- $pdfFilename = XFORMS_RECEIVED_PDF_FORMS_DIRECTORY . 'JADU_' . $userForm->getSubmittedTime()->format('Y-m-d') . '_' . $userForm->id . '.pdf';
- $userPDFFormExists = checkXFormsUserPDFFormExists($pdfFilename);
-
- if ($userPDFFormExists === XFORMS_PDF_FORM_EXCEPTION_SUCCESSFUL) {
- $pdfHash = md5(HASH_SALT . $userForm->id . SECURE_SERVER . METADATA_GENERIC_NAME);
-?>
- <p><a href="<?php print getSecureSiteRootURL().buildXFormsProStreamPDFUserFormURL($userForm->getId(), $pdfHash); ?>">Download completed PDF form</a> <img src="<?php print getSecureSiteRootURL(); ?>/site/images/file_type_icons/PDF.gif" alt="PDF icon" title="PDF" /></p>
-<?php
- }
-
- $legacyUserForm = getXFormsUserForm($userForm->getId());
- $legacyUserForm = extendXFormsUserFormWithCRMSubmissionDetailsAvailable($legacyUserForm);
- $actualForm = getXFormsForm($userForm->getFormId());
-
- $tabs = new \Jadu_XForms2_Tabs($actualForm);
- $formActions = new \Jadu_XForms2_Form_Action();
- $actionMappings = $formActions->all($actualForm->id);
-
- $cxmLink = '';
- foreach ($actionMappings as $actionMapping) {
- $action = $tabs->getActionByID($actionMapping->actionID);
- if (is_object($action) && get_class($action) == 'Jadu\XFormsPro\CXM\Action\CXMAction' && $action->enabled()) {
- $cxmLinkGenerator = ServiceLocator::get('xfp_core.cxm.service.cxm_link_generator');
- $cxmLink = $cxmLinkGenerator->generate($legacyUserForm, true, true, false);
+</table>

- if ($cxmLink != '') {
-?>
- <p><a class="cxm" href="<?php print encodeHtml($cxmLink); ?>">View updates or talk to someone about this</a></p>
<?php
- }
- }
- }
-
+$answerGatherer = ServiceLocator::get('xfp_core.form_logic.answer_gatherer');
+$answers = $answerGatherer->getAnswersForUserForm($userForm, false, true, false, false);

- }
- else {
- $answerGatherer = ServiceLocator::get('xfp_core.form_logic.answer_gatherer');
- $answers = $answerGatherer->getAnswersForUserForm($userForm, false, true, false, false);
-
- $templating = ServiceLocator::get('twig');
- print $templating->render(
+$templating = ServiceLocator::get('twig');
+print $templating->render(
'@XFormsProCore/Form/AllQuestionsAnswers/all_questions_answers.html.twig',
['answers' => $answers]
- );
+);

- $logs = $userForm->getActionLogs();
- /** @var UserFormActionLog[] $filtered */
- $filtered = $logs->matching(
+$logs = $userForm->getActionLogs();
+/** @var UserFormActionLog[] $filtered */
+$filtered = $logs->matching(
Criteria::create()
->where(Criteria::expr()->eq('system', 'Jadu CXM'))
->andWhere(Criteria::expr()->eq('actionName', 'Create Case'))
->orderBy(['id' => Criteria::ASC])
- );
+);

- foreach ($filtered as $log) {
+foreach ($filtered as $log) {
if (!empty($log->getResult())) {
$cxmURL = ServiceLocator::get('xfp_core.cxm.service.cxm_link_generator')->getURL($log->getResult(), true);
if (!empty($cxmURL)) {
-?>
+ ?>
<p><a class="cxm" href="<?php print encodeHtml($cxmURL); ?>">View updates or talk to someone about this</a></p>
-<?php
- }
+ <?php
}
}
+}

- $pdfHash = '';
- /** @var UserFormActionLog[] $filtered */
- $filtered = $logs->matching(
+$pdfHash = '';
+/** @var UserFormActionLog[] $filtered */
+$filtered = $logs->matching(
Criteria::create()
->where(Criteria::expr()->in('system', ['PDF Generation', 'AssureSign']))
->andWhere(Criteria::expr()->in('actionName', ['Create PDF of Submission', 'Create PDF to sign']))
->orderBy(['id' => 'DESC'])
- );
+);

- foreach ($filtered as $log) {
+foreach ($filtered as $log) {
if (!empty($log->getResult())) {
$pdfHash = md5(HASH_SALT . $userForm->getId() . SECURE_SERVER . METADATA_GENERIC_NAME);
-?>
+ ?>
<p><a href="<?php print getSecureSiteRootURL().buildXFormsProStreamPDFUserFormURL($userForm->getId(), $pdfHash); ?>">Download completed PDF form</a> <img src="<?php print getSecureSiteRootURL(); ?>/site/images/file_type_icons/PDF.gif" alt="PDF icon" title="PDF" /></p>
-<?php
+ <?php
break;
}
- }
- }
+}
?>
- <!-- The Contact box -->
- <?php include(HOME . "site/includes/contactbox.php"); ?>
- <!-- END of the Contact box -->
+<!-- The Contact box -->
+<?php include(HOME . "site/includes/contactbox.php"); ?>
+<!-- END of the Contact box -->

<!-- ###################################### -->
<?php include(HOME . "site/includes/closing.php"); ?>

public_html/site/xfp/scripts/user_home.php

<?php
- use Jadu\Symfony\DependencyInjection\ServiceLocator;
- use Jadu\Service\Container as ServiceContainer;
- use Jadu\Service\User as ServiceUser;
- use Jadu\PayBridge\DirectDebit\DirectDebitService;
- use Jadu\PayBridge\DataMapper\UserDirectDebitMapper;
+use Jadu\Symfony\DependencyInjection\ServiceLocator;
+use Jadu\Service\Container as ServiceContainer;
+use Jadu\Service\User as ServiceUser;
+use Jadu\PayBridge\DataMapper\UserDirectDebitMapper;

- include_once("utilities/JaduStatus.php");
+include_once("utilities/JaduStatus.php");

- // Force onto SSL if required.
- if ((defined('SSL_ENABLED') && SSL_ENABLED) && PROTOCOL != 'https://') {
+// Force onto SSL if required.
+if ((defined('SSL_ENABLED') && SSL_ENABLED) && PROTOCOL != 'https://') {
header("Location: ".getSecureSiteRootURL().$_SERVER['REQUEST_URI']);
exit;
- }
+}

- include_once("JaduStyles.php");
- include_once('utilities/JaduModulePages.php');
- include_once("xforms2/JaduXFormsForm.php");
- include_once("xforms2/JaduXFormsUserForms.php");
- include_once("xforms2/JaduXFormsUserQuestionAnswers.php");
- include_once("xforms2/JaduXFormsProReadableURLs.php");
+include_once("JaduStyles.php");
+include_once('utilities/JaduModulePages.php');
+include_once("xforms2/JaduXFormsProReadableURLs.php");

- if (defined('XFORMS_PAYBRIDGE_INTEGRATION_ENABLED') && XFORMS_PAYBRIDGE_INTEGRATION_ENABLED == 'true') {
+if (defined('XFORMS_PAYBRIDGE_INTEGRATION_ENABLED') && XFORMS_PAYBRIDGE_INTEGRATION_ENABLED == 'true') {
require_once 'PayBridge/DataMapper/UserFormToOrderItemMapper.php';
require_once 'PayBridge/DataMapper/OrderMapper.php';
require_once 'PayBridge/DataMapper/OrderItemMapper.php';
- require_once 'PayBridge/DataMapper/OrderPayeeMapper.php';

$orderMapper = new Jadu_PayBridge_DataMapper_OrderMapper(
ServiceContainer::getInstance()->getDb(),
@@ -34,10 +29,6 @@
ServiceContainer::getInstance()->getDb(),
new Jadu_CacheManager()
);
- $orderPayeeMapper = new Jadu_PayBridge_DataMapper_OrderPayeeMapper(
- ServiceContainer::getInstance()->getDb(),
- new Jadu_CacheManager()
- );
$productMapper = new Jadu_PayBridge_DataMapper_ProductMapper(
ServiceContainer::getInstance()->getDb(),
new Jadu_CacheManager()
@@ -58,55 +49,35 @@
ServiceContainer::getInstance()->getDb(),
new Jadu_CacheManager()
);
- $directDebitService = new DirectDebitService($directDebitMapper, $configMapper, null);
- }
+}

- $confirmRemove = false;
+$confirmRemove = false;

- if (ServiceUser::getInstance()->isSessionLoggedIn()) {
+if (ServiceUser::getInstance()->isSessionLoggedIn()) {
$userID = ServiceUser::getInstance()->getSessionUser()->id;
- }
- else {
- header ("Location: $ERROR_REDIRECT_PAGE");
+} else {
+ header("Location: $ERROR_REDIRECT_PAGE");
exit();
- }
+}

- if (class_exists('Jadu_Service_User') && Jadu_Service_User::getInstance()->isSessionLoggedIn()) {
+if (class_exists('Jadu_Service_User') && Jadu_Service_User::getInstance()->isSessionLoggedIn()) {
$user = Jadu_Service_User::getInstance()->getSessionUser();
- }
+}

- $recievedFormService = ServiceLocator::get('xfp_core.user_form.received_form_service');
+$recievedFormService = ServiceLocator::get('xfp_core.user_form.received_form_service');

- if (isset($_GET['userFormID'])) {
+if (isset($_GET['userFormID'])) {
$userForm = $recievedFormService->getUserForm($_GET['userFormID']);

if ($userForm->getUserID() != $userID) {
- header ("Location: $ERROR_REDIRECT_PAGE");
+ header("Location: $ERROR_REDIRECT_PAGE");
exit();
}

if (isset($_GET['remove']) && $_GET['remove'] == "true" && isset($_GET['sure']) && $_GET['sure'] == "Yes") {
$userForm = $recievedFormService->getUserForm($_GET['userFormID']);
- if (isset($userForm->isLegacy) && $userForm->isLegacy) { // Legacy forms
- if (defined('XFORMS_PAYBRIDGE_INTEGRATION_ENABLED') && XFORMS_PAYBRIDGE_INTEGRATION_ENABLED == 'true') {
- $formItemMapping = $formItemMapper->getByUserFormID($_GET['userFormID']);
- if (!is_null($formItemMapping)) {
- $item = $orderItemMapper->getByID($formItemMapping->orderItemID);
- $order = $orderMapper->getByID($item->orderID);
-
- $orderPayeeMapper->deleteForOrder($order->id);
- $orderMapper->delete($order->id);
- $formItemMapper->deleteByOrderItemID($item->id);
- $orderItemMapper->delete($item->id);
- }
- }
-
- deleteXFormsUserForm($_GET['userFormID']);
- }
- else {
$userFormRetentionHelper = ServiceLocator::get("xfp_core.user_form.retention_helper");
$userFormRetentionHelper->clearUserFormData($userForm, true);
- }

unset(
$_GET['remove'],
@@ -114,16 +85,14 @@
$userForm
);
}
- }
- elseif (isset($_GET['userAppID']) || isset($_POST['userAppID'])) {
+} elseif (isset($_GET['userAppID']) || isset($_POST['userAppID'])) {
if (isset($_GET['remove']) && $_GET['remove'] == "true" && !isset($_POST['confirmRemove'])) {
$app = getApplication($_GET['userAppID']);

if ($app != null) {
$confirmRemove = true;
}
- }
- elseif(isset($_POST['confirmRemove'])) {
+ } elseif(isset($_POST['confirmRemove'])) {
$app = getApplication($_POST['userAppID']);

// check that the logged in user owns this application
@@ -132,9 +101,9 @@
}
unset($app);
}
- }
+}

- if (defined('XFORMS_PAYBRIDGE_INTEGRATION_ENABLED') && XFORMS_PAYBRIDGE_INTEGRATION_ENABLED == 'true') {
+if (defined('XFORMS_PAYBRIDGE_INTEGRATION_ENABLED') && XFORMS_PAYBRIDGE_INTEGRATION_ENABLED == 'true') {
$incompleteOrders = $orderMapper->getUsersOrdersOfState($userID, Jadu_PayBridge_Order::ORDER_STATUS_INCOMPLETE, "ASC");
$incompleteOrderValues = array_values($incompleteOrders);
if (!empty($incompleteOrderValues)) {
@@ -154,8 +123,7 @@
if (count($items) > 1) {
$numPendingOrders++;
}
- }
- else {
+ } else {
$numPendingOrders++;
}
}
@@ -168,8 +136,7 @@
if (count($items) > 1) {
$numCompletedOrders++;
}
- }
- else {
+ } else {
$numCompletedOrders++;
}
}
@@ -178,17 +145,14 @@
if ((count($incompleteOrders) + $numCompletedOrders + $numPendingOrders) == 0) {
$noPayments = true;
}
+}

- $activeDirectDebits = $directDebitService->getSubscriptionsForUser($user->id, 'active', -1, -1);
- $inactiveDirectDebits = $directDebitService->getSubscriptionsForUser($user->id, 'inactive', -1, -1);
- }
-
- $allSubmittedUserForms = $recievedFormService->getSubmittedUserForms($user->id);
- $allUnsubmittedUserForms = $recievedFormService->getUnsubmittedUserForms($user->id);
+$allSubmittedUserForms = $recievedFormService->getSubmittedUserForms($user->id);
+$allUnsubmittedUserForms = $recievedFormService->getUnsubmittedUserForms($user->id);

- // directory entries
- $directoryEntries = array();
- if (getModulePageFromName('Directories')->id != -1) {
+// directory entries
+$directoryEntries = array();
+if (getModulePageFromName('Directories')->id != -1) {
include_once("directoryBuilder/JaduDirectoryEntries.php");
include_once("directoryBuilder/JaduDirectoryUserEntries.php");
include_once("directoryBuilder/JaduDirectories.php");
@@ -197,14 +161,16 @@
$liveDirectoryEntries = getAllDirectoryEntriesForUser(Jadu_Service_User::getInstance()->getSessionUser()->id);

$directoryEntries = array_merge($liveDirectoryEntries, $unapprovedDirectoryEntries);
- }
+}

- $MAST_HEADING = 'Your Account';
- $MAST_BREADCRUMB = '<a href="' . getSiteRootURL() .'/">Home</a><span>Your account</span>';
+$MAST_HEADING = 'Your Account';
+$MAST_BREADCRUMB = '<a href="' . getSiteRootURL() .'/">Home</a><span>Your account</span>';
?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html<?php if (defined('TEXT_DIRECTION') && TEXT_DIRECTION == 'rtl') print ' dir="rtl"'; ?> xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html<?php if (defined('TEXT_DIRECTION') && TEXT_DIRECTION == 'rtl') {
+ print ' dir="rtl"';
+} ?> xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
<title>Personal details - <?php print encodeHtml(METADATA_GENERIC_NAME); ?></title>

<?php include_once(HOME . "site/includes/stylesheets.php"); ?>
@@ -218,17 +184,17 @@

<meta name="DC.subject" lang="en" scheme="eGMS.IPSV" content="Local government;Government, politics and public administration" />
<meta name="DC.subject" lang="en" content="Council, government and democracy" />
-</head>
+ </head>
<body>
<!-- ########## MAIN STRUCTURE ######### -->
<?php include(HOME . "site/includes/opening.php"); ?>
<!-- ########################## -->

<?php
- if ($confirmRemove) {
+if ($confirmRemove) {
$app = getApplication($_GET['userAppID']);
$job = getRecruitmentJob($app->jobID);
-?>
+ ?>

<p>Are you sure you want to <span class="warning">delete</span> your application for <strong><?php print encodeHtml($job->title); ?></strong></p>
<p>
@@ -239,21 +205,19 @@
</form>
<p>

-<?php
+ <?php
unset($app);
unset($job);
- }
- else {
+} else {
if (class_exists('Jadu_Service_User')) {
-?>
+ ?>
<h2>Hello, <em><?php print encodeHtml($user->getDisplayName()); ?></em></h2>
-<?php
- }
- else {
-?>
+ <?php
+ } else {
+ ?>
<h2>Hello,
<em>
-<?php
+ <?php

if ($user->salutation != "" && $user->surname != "") {
print encodeHtml($user->salutation) . " ";
@@ -271,12 +235,12 @@
print encodeHtml($user->email);
}

-?>
+ ?>
</em>
</h2>
-<?php
+ <?php
}
-?>
+ ?>

<p>Keep track of your activities and details right here.</p>

@@ -284,19 +248,19 @@
<div class="listed_item">
<h2>Your personal details <?php if (isset($detailsChanged)) { ?><em>have been updated.</em><?php } ?></h2>
<ul class="list">
-<?php
+ <?php
if (class_exists('Jadu_Service_User') && Jadu_Service_User::getInstance()->canUpdateUser() || isset($_SESSION['userID'])) {
-?>
+ ?>
<li><a href="<?php print getSecureSiteRootURL() . buildChangeDetailsURL(); ?>">Change your details</a></li>
-<?php
+ <?php
}

if (class_exists('Jadu_Service_User') && Jadu_Service_User::getInstance()->canUpdateUserPassword() || isset($_SESSION['userID'])) {
-?>
+ ?>
<li><a href="<?php print getSecureSiteRootURL() . buildChangePasswordURL(); ?>">Change your password</a></li>
-<?php
+ <?php
}
-?>
+ ?>
<li><a href="<?php print getSecureSiteRootURL() . buildSignOutURL();?>">Sign out</a></li>
</ul>
</div>
@@ -304,9 +268,9 @@
<!-- Online Forms -->
<div class="listed_item">
<h2>Your online forms</h2>
-<?php
+ <?php
if (isset($_GET['remove']) && $_GET['remove'] == "true") {
-?>
+ ?>
<form action="<?php print getSiteRootURL() . buildNonReadableXFPUserHomeURL(); ?>" method="get">
<input type="hidden" name="userFormID" value="<?php print intval($_GET['userFormID']);?>" />
<input type="hidden" name="remove" value="true" />
@@ -317,14 +281,14 @@
<input class="button" type="submit" name="sure" value="No" />
</div>
</form>
-<?php
+ <?php
}
if (sizeof($allSubmittedUserForms) > 0) {
-?>
+ ?>
<ul class="list">
<li><a href="<?php print getSecureSiteRootURL() . buildXFormsProUserFormURL(); ?>"><?php print sizeof($allSubmittedUserForms) . ' forms submitted online';?></a></li>
</ul>
-<?php
+ <?php
}

if (sizeof($allUnsubmittedUserForms) > 0) {
@@ -334,99 +298,98 @@
}

$actualForm = $recievedFormService->getFormDetails($unsubmittedForm->getFormId());
- if ($actualForm->id === -1) {
+ if ($actualForm->getId() === -1) {
unset($allUnsubmittedUserForms[$key]);
}
}
-?>
+ ?>

<h3>Awaiting completion</h3>
<p>You have <strong><?php print sizeof($allUnsubmittedUserForms);?> recent forms</strong> awaiting completion.</p>
-<?php
+ <?php
foreach ($allUnsubmittedUserForms as $userForm) {
$actualForm = $recievedFormService->getFormDetails($userForm->getFormId());
- $formUrl = getSecureSiteRootURL() . $recievedFormService->getFormUrl($actualForm->id, $userForm->getId());
-?>
- <p><a href="<?php print encodeHtml($formUrl) ;?>"><?php print encodeHtml($actualForm->title); ?></a></p>
+ $formUrl = getSecureSiteRootURL() . $recievedFormService->getFormUrl($actualForm->getId(), $userForm->getId());
+ ?>
+ <p><a href="<?php print encodeHtml($formUrl) ;?>"><?php print encodeHtml($actualForm->getTitle()); ?></a></p>
<ul class="list">
<li><a href="<?php print encodeHtml($formUrl); ?>">Complete</a></li>
<li><a href="<?php print getSecureSiteRootURL() . buildUserHomeURL(true, $userForm->getId()); ?>">Remove</a></li>
</ul>
-<?php
+ <?php
}
-?>
+ ?>

-<?php
+ <?php
}

if (sizeof($allSubmittedUserForms) == 0 && sizeof($allUnsubmittedUserForms) == 0) {
-?>
+ ?>
<p>You have <strong>no online forms in progress</strong> or submitted.</p>
-<?php
+ <?php
}
-?>
+ ?>
</div>
<!-- END Online Forms -->
-<?php
+ <?php
if (defined('XFORMS_PAYBRIDGE_INTEGRATION_ENABLED') && XFORMS_PAYBRIDGE_INTEGRATION_ENABLED == 'true') {
-?>
+ ?>
<!-- Online Payments -->
<div class="listed_item">
<h2>Your online payments</h2>
<ul class="list">
-<?php
+ <?php
if (isset($activeOrder) && $activeOrder->id > 0) {
$activeOrderItems = $orderItemMapper->getByOrderID($activeOrder->id);
if (!empty($activeOrderItems)) {
if (isset($orderPSP) && $orderPSP->basketEnabled == 1) {
-?>
+ ?>
<li><a href="<?php print getSecureSiteRootURL() . Jadu_PayBridge_ReadableURLs::buildPayBridgeBasketURL($activeOrder->id); ?>">Online payments basket (<?php print intval($incompleteOrderItems) . (intval($incompleteOrderItems) != 1 ? ' items' : ' item'); ?>)</a></li>
-<?php
- }
- else {
-?>
+ <?php
+ } else {
+ ?>
<li><a href="<?php print getSecureSiteRootURL() . Jadu_PayBridge_ReadableURLs::buildPayBridgeOrderPaymentURL($activeOrder->id); ?>">View Current Order</a></li>
-<?php
+ <?php
}
}
}
-?>
+ ?>
<li><a href="<?php print getSecureSiteRootURL() . Jadu_PayBridge_ReadableURLs::buildPayBridgeBalancesURL(); ?>">Online balances</a></li>
</ul>
-<?php
+ <?php
if ($numCompletedOrders > 0) {
-?>
+ ?>
<ul class="list">
<li><a href="<?php print getSecureSiteRootURL() . Jadu_PayBridge_ReadableURLs::buildPayBridgeOrderArchiveURL(); ?>"><?php print intval($numCompletedOrders) . (intval($numCompletedOrders) != 1 ? ' payments' : ' payment'); ?> archived</a></li>
</ul>
-<?php
+ <?php
}

if ($numPendingOrders > 0) {
-?>
+ ?>
<ul class="list">
<li><a href="<?php print getSecureSiteRootURL() . Jadu_PayBridge_ReadableURLs::buildPayBridgeOrderArchiveURL(true); ?>"><?php print intval($numPendingOrders) . (intval($numPendingOrders) != 1 ? ' payments' : ' payment'); ?> made</a></li>
</ul>
-<?php
+ <?php
}

if ($noPayments) {
-?>
+ ?>
<p>You have not made any online payments.</p>
-<?php
+ <?php
}
-?>
+ ?>
</div>
<!-- END Online Payments -->
-<?php
+ <?php
}

if (sizeof($directoryEntries) > 0) {
-?>
+ ?>
<!-- Directories-->
<div class="listed_item">
<h2>Your directory records</h2>
-<?php
+ <?php
$lastDirectoryID = -1;
foreach ($directoryEntries as $directoryEntry) {
$directory = getDirectory($directoryEntry->directoryID);
@@ -453,11 +416,11 @@
}

print '</ul>';
-?>
+ ?>
</div>

<!-- end directories -->
-<?php
+ <?php
}

if (defined('API_ACCESS') && API_ACCESS != 0) {
@@ -467,31 +430,30 @@
if (Jadu_Service_User::getInstance()->isSessionLoggedIn()) {
$numAPIKeys = getNumAPIKeysForUser(Jadu_Service_User::getInstance()->getSessionUser()->id);
}
-?>
+ ?>
<!-- API Keys -->
<h2>Developer API</h2>
<ul class="list">
-<?php
+ <?php
if ($numAPIKeys == 0) {
-?>
+ ?>
<li><a href="<?php print buildAPIApplyURL(); ?>">Apply for an API key</a></li>
-<?php
- }
- else {
-?>
+ <?php
+ } else {
+ ?>
<li><a href="<?php print buildAPIKeyURL(); ?>">View API key</a></li>
-<?php
+ <?php
}
-?>
+ ?>
</ul>
-<?php
- }
+ <?php
}
+}
?>

- <!-- The Contact box -->
- <?php include(HOME . "site/includes/contactbox.php"); ?>
- <!-- END of the Contact box -->
+<!-- The Contact box -->
+<?php include(HOME . "site/includes/contactbox.php"); ?>
+<!-- END of the Contact box -->

<!-- ################ MAIN STRUCTURE ############ -->
<?php include(HOME . "site/includes/closing.php"); ?>

public_html/site/xfp/scripts/whats_new_index.php

<?php
- include_once("utilities/JaduStatus.php");
- include_once("JaduStyles.php");
- include_once("JaduConstants.php");
- include_once("websections/JaduNews.php");
- include_once("websections/JaduEvents.php");
- include_once("websections/JaduDownloads.php");
- include_once("websections/JaduDocuments.php");
- include_once("xforms2/JaduXFormsForm.php");
- include_once("xforms2/JaduXFormsProReadableURLs.php");
-
- define('MAX_WHATS_NEW', 10);
-
- $news = getAllNewsByDate(true, true);
- $events = getNumEvents(MAX_WHATS_NEW);
- $downloads = getXMostRecentlyCreatedDownloadFiles(MAX_WHATS_NEW);
- $documents = getXMostRecentlyCreatedDocuments(MAX_WHATS_NEW, true, true);
- $forms = getXMostRecentlyCreatedXFormsForms(MAX_WHATS_NEW, 'enterDate DESC, title', true);
- $press = getAllPressReleasesByDate(true, true);
-
- $MAST_HEADING = "What's New";
- $MAST_BREADCRUMB = '<a href="' . getSiteRootURL() .'/">Home</a><span>What&#39;s new</span>';
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html<?php if (defined('TEXT_DIRECTION') && TEXT_DIRECTION == 'rtl') print ' dir="rtl"'; ?> xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
+use Jadu\Symfony\DependencyInjection\ServiceLocator;
+
+include_once("utilities/JaduStatus.php");
+include_once("JaduStyles.php");
+include_once("JaduConstants.php");
+include_once("websections/JaduNews.php");
+include_once("websections/JaduEvents.php");
+include_once("websections/JaduDownloads.php");
+include_once("websections/JaduDocuments.php");
+include_once("xforms2/JaduXFormsProReadableURLs.php");
+
+define('MAX_WHATS_NEW', 10);
+
+$news = getAllNewsByDate(true, true);
+$events = getNumEvents(MAX_WHATS_NEW);
+$downloads = getXMostRecentlyCreatedDownloadFiles(MAX_WHATS_NEW);
+$documents = getXMostRecentlyCreatedDocuments(MAX_WHATS_NEW, true, true);
+
+$formRepository = ServiceLocator::get('xfp_core.repository.form.builder.form');
+$forms = $formRepository->findNewlyCreatedForms(MAX_WHATS_NEW, ['enterDate' => 'DESC', 'title' => 'ASC'], true);
+$press = getAllPressReleasesByDate(true, true);
+
+$MAST_HEADING = "What's New";
+$MAST_BREADCRUMB = '<a href="' . getSiteRootURL() .'/">Home</a><span>What&#39;s new</span>';
+?>
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html<?php if (defined('TEXT_DIRECTION') && TEXT_DIRECTION == 'rtl') {
+ print ' dir="rtl"';
+} ?> xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
<title>What&#39;s new on site - <?php print encodeHtml(METADATA_GENERIC_NAME); ?></title>

<?php include_once(HOME . "site/includes/stylesheets.php"); ?>
@@ -37,212 +42,212 @@

<meta name="DC.subject" lang="en" scheme="eGMS.IPSV" content="Local government;Government, politics and public administration" />
<meta name="DC.subject" lang="en" content="Council, government and democracy" />
-</head>
+ </head>
<body>
<!-- ########## MAIN STRUCTURE ######### -->
<?php include(HOME . "site/includes/opening.php"); ?>
<!-- ########################## -->

- <p>Check here to see the most recent information published on site.</p>
+<p>Check here to see the most recent information published on site.</p>

<?php
- $navCounter = 0;
+$navCounter = 0;

- // see which sections we're going to display and put them in an array
- $sections = array();
+// see which sections we're going to display and put them in an array
+$sections = array();

- if (sizeof($news) > 0) {
+if (sizeof($news) > 0) {
$sections[] = "News";
- }
- if (sizeof($downloads) > 0) {
+}
+if (sizeof($downloads) > 0) {
$sections[] = "Downloads";
- }
- if (sizeof($documents) > 0) {
+}
+if (sizeof($documents) > 0) {
$sections[] = "Documents";
- }
- if (sizeof($events) > 0) {
+}
+if (sizeof($events) > 0) {
$sections[] = "Events";
- }
- if (sizeof($forms) > 0) {
+}
+if (sizeof($forms) > 0) {
$sections[] = "Forms";
- }
- if (sizeof($press) > 0) {
+}
+if (sizeof($press) > 0) {
$sections[] = "Press Releases";
- }
+}

- $sectionsList = splitArray($sections);
+$sectionsList = splitArray($sections);
?>
- <div class="lead_item">
+<div class="lead_item">
<ul class="info_left list">
-<?php
+ <?php
foreach ($sectionsList['left'] as $section) {
-?>
+ ?>
<li><a href="<?php print getSiteRootURL() . buildWhatsNewURL(); ?>#<?php print encodeHtml($section); ?>"><?php print encodeHtml($section); ?></a></li>
-<?php
+ <?php
}
-?>
+ ?>
</ul>
<ul class="info_right list">
-<?php
+ <?php
foreach ($sectionsList['right'] as $section) {
-?>
+ ?>
<li><a href="<?php print getSiteRootURL() . buildWhatsNewURL(); ?>#<?php print encodeHtml($section); ?>"><?php print encodeHtml($section); ?></a></li>
-<?php
+ <?php
}
-?>
+ ?>
</ul>
<div class="clear"></div>
- </div>
+</div>

<?php
- if (sizeof($news) > 0) {
-?>
+if (sizeof($news) > 0) {
+ ?>
<!-- most recent news -->
<div class="doc_info">
<h2 id="News">Latest News</h2>
<ul class="list">
-<?php
+ <?php
$itemsToShow = min(MAX_WHATS_NEW, count($news));
for ($i = 0; $i < $itemsToShow; $i++) {
$item = $news[$i];
if ($item != null) {
-?>
+ ?>
<li><a href="<?php print getSiteRootURL() . buildNewsArticleURL($item->id); ?>"><?php print encodeHtml($item->title); ?></a> <span class="small">- <?php print formatDateTime(FORMAT_DATE_LONG, $item->newsDate);?></span></li>
-<?php
+ <?php
}
}
-?>
+ ?>
</ul>
</div>
<!-- END most recent news -->
-<?php
- }
+ <?php
+}

- if (sizeof($downloads) > 0) {
-?>
+if (sizeof($downloads) > 0) {
+ ?>
<!-- most recent downloads -->
<div class="doc_info">
<h2 id="Downloads">Downloads</h2>
<ul class="list">
-<?php
+ <?php
$itemsToShow = min(MAX_WHATS_NEW, count($downloads));
for ($i = 0; $i < $itemsToShow; $i++) {
$item = $downloads[$i];

if ($item != null) {
-?>
- <li><a href="<?php print getSiteRootURL() . buildDownloadsURL( -1, $item->id); ?>"><?php print encodeHtml($item->title);?></a> <span class="small">- <?php print formatDateTime(FORMAT_DATE_LONG, $item->creationDate);?></span></li>
-<?php
+ ?>
+ <li><a href="<?php print getSiteRootURL() . buildDownloadsURL(-1, $item->id); ?>"><?php print encodeHtml($item->title);?></a> <span class="small">- <?php print formatDateTime(FORMAT_DATE_LONG, $item->creationDate);?></span></li>
+ <?php
}
}
-?>
+ ?>
</ul>
</div>
<!-- END most recent downloads -->
-<?php
- }
+ <?php
+}

- if (sizeof($documents) > 0) {
-?>
+if (sizeof($documents) > 0) {
+ ?>
<!-- most recent documents -->
<div class="doc_info">
<h2 id="Documents">Documents</h2>
<ul class="list">
-<?php
+ <?php
foreach ($documents as $document) {

$header = getDocumentHeader($document->headerOriginalID, true);

if ($document != null) {
-?>
+ ?>
<li><a href="<?php print getSiteRootURL() . buildDocumentsURL($document->id); ?>"><?php print encodeHtml($header->title);?></a> <span class="small">- <?php print formatDateTime(FORMAT_DATE_LONG, $document->enterDate);?></span></li>
-<?php
+ <?php
}
}
-?>
+ ?>
</ul>
</div>
<!-- END most recent documents -->
-<?php
- }
+ <?php
+}
?>

<?php
- if (sizeof($events) > 0) {
-?>
+if (sizeof($events) > 0) {
+ ?>
<!-- most recent events -->
<div class="doc_info">
<h2 id="Events">Events</h2>
<ul class="list">
-<?php
+ <?php
$itemsToShow = min(MAX_WHATS_NEW, count($events));
for ($i = 0; $i < $itemsToShow; $i++) {
$item = $events[$i];

if ($item != null) {
-?>
+ ?>
<li><a href="<?php print getSiteRootURL() . buildEventsURL(-1, '', $item->id);?>"><?php print encodeHtml($item->title);?></a> <span class="small">- <?php print formatDateTime(FORMAT_DATE_LONG, $item->dateCreated);?></span></li>
-<?php
+ <?php
}
}
-?>
+ ?>
</ul>
</div>
<!-- END most recent events -->
-<?php
- }
+ <?php
+}

- if (sizeof($forms) > 0) {
-?>
+if (sizeof($forms) > 0) {
+ ?>
<!-- most recent online forms -->
<div class="doc_info">
<h2 id="Forms">Online Forms</h2>
<ul class="list">
-<?php
+ <?php
$itemsToShow = min(MAX_WHATS_NEW, count($forms));
for ($i = 0; $i < $itemsToShow; $i++) {
$item = $forms[$i];

if ($item != null) {
-?>
- <li><a href="<?php print (FORCE_SECURE_FORM ? getSecureSiteRootURL() : getSiteRootURL()) . buildXFormsProFormURL($item->id); ?>"><?php print encodeHtml($item->title);?></a> <span class="small">- <?php print formatDateTime(FORMAT_DATE_LONG, $item->enterDate);?></span></li>
-<?php
+ ?>
+ <li><a href="<?php print(FORCE_SECURE_FORM ? getSecureSiteRootURL() : getSiteRootURL()) . buildXFormsProFormURL($item->getId()); ?>"><?php print encodeHtml($item->getTitle());?></a> <span class="small">- <?php print formatDateTime(FORMAT_DATE_LONG, $item->getEnterDate());?></span></li>
+ <?php
}
}
-?>
+ ?>
</ul>
</div>
<!-- END most recent online forms -->
-<?php
- }
+ <?php
+}

- if (sizeof($press) > 0) {
-?>
+if (sizeof($press) > 0) {
+ ?>
<!-- most recent press releases -->
<div class="doc_info">
<h2 id="Press Releases">Latest Press Releases</h2>
<ul class="list">
-<?php
+ <?php
$itemsToShow = min(MAX_WHATS_NEW, count($press));
for ($i = 0; $i < $itemsToShow; $i++) {
$item = $press[$i];
if ($item != null) {
-?>
+ ?>
<li><a href="<?php print getSiteRootURL() . buildPressArticleURL($item->id); ?>"><?php print encodeHtml($item->title); ?></a> <span class="small">- <?php print formatDateTime(FORMAT_DATE_LONG, $item->pressDate);?></span></li>
-<?php
+ <?php
}
}
-?>
+ ?>
</ul>
</div>
<!-- END most recent press releases -->
-<?php
- }
+ <?php
+}
?>

- <!-- The Contact box -->
- <?php include(HOME . "site/includes/contactbox.php"); ?>
- <!-- END of the Contact box -->
+<!-- The Contact box -->
+<?php include(HOME . "site/includes/contactbox.php"); ?>
+<!-- END of the Contact box -->

<!-- ################ MAIN STRUCTURE ############ -->
<?php include(HOME . "site/includes/closing.php"); ?>

var/widgets/26/public.php

<?php
- require_once 'JaduConstants.php';
- require_once 'directoryBuilder/JaduDirectories.php';
- require_once 'directoryBuilder/JaduDirectoryCategoryTree.php';
- require_once 'directoryBuilder/JaduDirectoryEntries.php';
- require_once 'egov/JaduCL.php';
- require_once 'library/JaduStringFunctions.php';
+require_once 'JaduConstants.php';
+require_once 'directoryBuilder/JaduDirectories.php';
+require_once 'directoryBuilder/JaduDirectoryCategoryTree.php';
+require_once 'directoryBuilder/JaduDirectoryEntries.php';
+require_once 'directoryBuilder/JaduDirectoryFields.php';
+require_once 'egov/JaduCL.php';
+require_once 'library/JaduStringFunctions.php';

- $directoryWidgetTitle = '%TITLE%';
- $directoryWidgetContent = '%DESCRIPTION%';
- $directoryID = '%DIRECTORYID%';
+$directoryWidgetTitle = '%TITLE%';
+$directoryWidgetContent = '%DESCRIPTION%';
+$directoryID = '%DIRECTORYID%';

- if ($directoryWidgetTitle != '' && $directoryWidgetTitle != '%TITLE' . '%') {
+if ($directoryWidgetTitle != '' && $directoryWidgetTitle != '%TITLE' . '%') {
?>
- <h2><?php echo encodeHtml($directoryWidgetTitle); ?></h2>
<?php
+ <h2><?php print encodeHtml($directoryWidgetTitle); ?></h2>
+ <?php

- }
+}

- if ($directoryWidgetContent != '' && $directoryWidgetContent != '%DESCRIPTION' . '%') {
+if ($directoryWidgetContent != '' && $directoryWidgetContent != '%DESCRIPTION' . '%') {
?>
- <p><?php echo encodeHtml($directoryWidgetContent); ?></p>
-<?php
+ <p><?php print encodeHtml($directoryWidgetContent); ?></p>
+ <?php

+}

+$hasMap = getAllDirectoryFieldsByFieldTypeId($directoryID, 6);
+$hasText = getAllDirectoryFieldsByFieldTypeId($directoryID, 1);

- }
?>
- <form method="get" action="<?php echo getSiteRootURL(); ?>/site/scripts/directory_search.php" class="form">
- <input type="hidden" value="<?php echo $directoryID; ?>" name="directoryID">
+<form method="get" action="<?php print getSiteRootURL(); ?>/site/scripts/directory_search.php" class="form">
+ <input type="hidden" value="<?php print $directoryID; ?>" name="directoryID">
<input type="hidden" value="Search" name="search">
+ <?php if (!empty($hasText)) { ?>
<span>
- <label for="keyword_directory<?php echo $directoryID; ?>">Search by keyword...</label>
- <input id="keyword_directory<?php echo $directoryID; ?>" type="text" class="field" placeholder="Search by keyword..." name="keywords">
+ <label for="keyword_directory<?php print $directoryID; ?>">Search by keyword...</label>
+ <input id="keyword_directory<?php print $directoryID; ?>" type="text" class="field" placeholder="Search by keyword..." name="keywords">
<input type="submit" class="button" name="submit" value="Search">
</span>
+ <?php
+ }?>
+ <?php if (!empty($hasMap)) {
+ ?>
<span>
- <label for="postcode_directory<?php echo $directoryID; ?>">Enter your postcode...</label>
- <input id="postcode_directory<?php echo $directoryID; ?>" type="text" class="field" placeholder="Enter your postcode..." name="postcode">
+ <label for="postcode_directory<?php print $directoryID; ?>">Enter your postcode...</label>
+ <input id="postcode_directory<?php print $directoryID; ?>" type="text" class="field" placeholder="Enter your postcode..." name="postcode">
<input type="submit" class="button" name="submit" value="Find">
</span>
- </form>
- <a href="<?php echo getSiteRootURL(); ?>/site/scripts/directory_search.php?directoryID=<?php echo $directoryID; ?>">Advanced search</a>
+ <?php
+ }?>
+</form>
+<a href="<?php print getSiteRootURL(); ?>/site/scripts/directory_search.php?directoryID=<?php print $directoryID; ?>">Advanced search</a>