SalesforceFoundation / Volunteers-for-Salesforce

Volunteers for Salesforce managed package
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

Volunteers Personal Site: The DateFormat URL parameter does not persist when navigating across Personal Site pages #488

Open jamesbsfdc opened 4 years ago

jamesbsfdc commented 4 years ago

The Volunteers Personal Site should be able to cater for international users who expect elements of the page to display with their correct locale settings. Specifically, date fields on the Personal Site pages should be displayed in the relevant locale of the user.

Currently the Personal Site Contact page relies on two URL parameters to correctly display all of the dates on the page in the European date format i.e Language=en-gb&DateFormat=dd/MM/yyyy

The issue however is once the user lands on the page, if they browse to other pages within the site, and indeed back to the Personal Site Contact Info page, the DateFormat parameter is not preserved in the URL so dates will default back to the non-European date format.

By default the Personal Site navigation contains links to the following VFS pages

The URL links for each of these pages in the Personal Site contain the Language parameter by default, however they do not contain the DateFormat parameter.

If a user navigates to the Personal Site via a URL such as .... Language=en-gb&DateFormat=dd/MM/yyyy they will notice that the Language parameter for each Personal Site page contains the parameter as Language=en-gb.

When a user clicks on the Volunteer Jobs page the format of the dates will be in the non-European date format, as the URL does not contain the parameter DateFormat=dd/MM/yyyy

As the Job Calendar does not display date fields by default, there is no immediate issue however the Job Calendar does list jobs and if the user clicks on any of these jobs there will be taken to the Volunteer Jobs page which again will default to the non-European date format.

The Report Hours page seems to use the Language parameter rather than the DateFormat parameter to set the date format of any job selected from the Volunteer Job dropdown and so as this parameter is preserved in the URL the dates do display correctly.

Additionally because the DateFormat parameter does not persist in any of the links above if the user browses around the Personal Site and then back to the Personal Site Contact Info page from any other page, some of the dates on the page will again default to a non-European date format

jamesbsfdc commented 4 years ago

**lurch: add

LurchTheButler commented 4 years ago

Tracking W-041033

abulfazalSF commented 4 years ago

1 - Clone the personal site template visualforce page. You will need to change some of the page references when cloning or you will get errors (as shown near the bottom of https://powerofus.force.com/s/article/V4S-Customize-Vol-Personal-Site-Pages)

2 - add '&dateformat=dd/MM/yyyy' to the url for each button (see image below)

3 - add the same string to the link that gets sent to volunteers when they sign up (I created a formula field that does this so I don’t need to mess about with merge fields in email templates)

4 - The date will now be in the UK format

image

Also, this date format will remain even if a user clicks on the other tabs Hope this helps, let me know if you need more information :)

jamesbsfdc commented 4 years ago

Thanks for the reply @abulfazalSF - good to know. I logged the issue in the hope this can be changed in the package itself without requiring the need to clone the page, as this is beyond some users :)