<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> <#-- Macros and functions for form controls --> <#-- Output: html notifying the user that the browser is an unsupported version --> <#macro unsupportedBrowser urlsBase>
${i18n().alert_icon}

${i18n().unsupported_ie_version}

<#--Given an edit configuration template object, get the current value for a uri field using the field name--> <#function getEditConfigLiteralValue config varName> <#local literalValues = config.existingLiteralValues > <#if (literalValues?keys?seq_contains(varName)) && (literalValues[varName]?size > 0)> <#return literalValues[varName][0] > <#return ""> <#--Given an edit configuration template object, get the current value for a literal field using the field name--> <#function getEditConfigUriValue config varName> <#local uriValues = config.existingUriValues /> <#if (uriValues?keys?seq_contains(varName)) && (uriValues[varName]?size > 0)> <#return uriValues[varName][0] > <#return ""> <#--Now check whether a given value returns either a uri or a literal value, if one empty then use other and return - returns empty string if no value found--> <#function getEditConfigValue config varName> <#local returnValue = getEditConfigUriValue(config, varName) /> <#if (returnValue?length = 0)> <#local returnValue = getEditConfigLiteralValue(config, varName) /> <#return returnValue> <#--Given edit submission object find values--> <#function getEditSubmissionLiteralValue submission varName> <#local literalValues = submission.literalsFromForm > <#if (literalValues?keys?seq_contains(varName)) && (literalValues[varName]?size > 0)> <#return literalValues[varName][0] > <#return ""> <#--Given an edit configuration template object, get the current value for a literal field using the field name--> <#function getEditSubmissionUriValue submission varName> <#local uriValues = submission.urisFromForm /> <#if (uriValues?keys?seq_contains(varName)) && (uriValues[varName]?size > 0)> <#return uriValues[varName][0] > <#return ""> <#--Get edit submission value for either literal or uri--> <#function getEditSubmissionValue submission varName> <#local returnValue = getEditSubmissionUriValue(submission, varName) /> <#if (returnValue?length = 0)> <#local returnValue = getEditSubmissionLiteralValue(submission, varName) /> <#return returnValue> <#--Get the value for the form field, checking edit submission first and then edit configuration--> <#function getFormFieldValue submission config varName> <#local returnValue = ""> <#if submission?has_content && submission.submissionExists = true> <#local returnValue = getEditSubmissionValue(submission varName)> <#else> <#local returnValue = getEditConfigValue(config varName)> <#return returnValue> <#--Check if submission error exists for a field name--> <#function submissionErrorExists editSubmission fieldName> <#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content> <#if editSubmission.validationErrors?keys?seq_contains(fieldName)> <#return true> <#return false>