diff --git a/applications/content/template/cms/CMSContentEdit.ftl b/applications/content/template/cms/CMSContentEdit.ftl index 1e7ae65e11..b6a083b626 100644 --- a/applications/content/template/cms/CMSContentEdit.ftl +++ b/applications/content/template/cms/CMSContentEdit.ftl @@ -151,7 +151,7 @@ under the License. <#macro renderTextData content textData > - <#assign contentId=content.contentId!/> + <#local contentId=content.contentId!/> diff --git a/applications/order/template/entry/catalog/CategoryDetail.ftl b/applications/order/template/entry/catalog/CategoryDetail.ftl index eb122c4558..5043e6d76d 100644 --- a/applications/order/template/entry/catalog/CategoryDetail.ftl +++ b/applications/order/template/entry/catalog/CategoryDetail.ftl @@ -41,7 +41,7 @@ under the License. <#macro paginationControls> - <#assign viewIndexMax = Static["java.lang.Math"].ceil((listSize)?double / viewSize?double)> + <#local viewIndexMax = Static["java.lang.Math"].ceil((listSize)?double / viewSize?double)> <#if (viewIndexMax?int > 0)>
diff --git a/applications/order/template/entry/catalog/ProductDetail.ftl b/applications/order/template/entry/catalog/ProductDetail.ftl index 29f58cce5a..f0ead3240a 100644 --- a/applications/order/template/entry/catalog/ProductDetail.ftl +++ b/applications/order/template/entry/catalog/ProductDetail.ftl @@ -646,9 +646,9 @@ ${virtualJavaScript!} <#-- Upgrades/Up-Sell/Cross-Sell --> <#macro associated assocProducts beforeName showName afterName formNamePrefix targetRequestName> - <#assign targetRequest = "product"> + <#local targetRequest = "product"> <#if targetRequestName?has_content> - <#assign targetRequest = targetRequestName> + <#local targetRequest = targetRequestName> <#if assocProducts?has_content>

${beforeName!}<#if "Y" == showName>${productContentWrapper.get("PRODUCT_NAME", "html")!}${afterName!}

diff --git a/applications/order/template/order/OrderPaymentInfo.ftl b/applications/order/template/order/OrderPaymentInfo.ftl index 438488f9f1..596ff0f1ae 100644 --- a/applications/order/template/order/OrderPaymentInfo.ftl +++ b/applications/order/template/order/OrderPaymentInfo.ftl @@ -17,17 +17,17 @@ specific language governing permissions and limitations under the License. --> <#macro maskSensitiveNumber cardNumber> - <#assign cardNumberDisplay = ""> + <#local cardNumberDisplay = ""> <#if cardNumber?has_content> - <#assign size = cardNumber?length - 4> + <#local size = cardNumber?length - 4> <#if (size > 0)> <#list 0 .. size-1 as foo> - <#assign cardNumberDisplay = cardNumberDisplay + "*"> + <#local cardNumberDisplay = cardNumberDisplay + "*"> - <#assign cardNumberDisplay = cardNumberDisplay + cardNumber[size .. size + 3]> + <#local cardNumberDisplay = cardNumberDisplay + cardNumber[size .. size + 3]> <#else> <#-- but if the card number has less than four digits (ie, it was entered incorrectly), display it in full --> - <#assign cardNumberDisplay = cardNumber> + <#local cardNumberDisplay = cardNumber> ${cardNumberDisplay!} diff --git a/applications/order/template/return/ReturnItems.ftl b/applications/order/template/return/ReturnItems.ftl index 12b6e6e97f..4c62a5f130 100644 --- a/applications/order/template/return/ReturnItems.ftl +++ b/applications/order/template/return/ReturnItems.ftl @@ -18,8 +18,8 @@ under the License. --> <#macro displayReturnAdjustment returnAdjustment adjEditable> - <#assign returnHeader = returnAdjustment.getRelatedOne("ReturnHeader", false)> - <#assign adjReturnType = returnAdjustment.getRelatedOne("ReturnType", false)!> + <#local returnHeader = returnAdjustment.getRelatedOne("ReturnHeader", false)> + <#local adjReturnType = returnAdjustment.getRelatedOne("ReturnType", false)!> <#if (adjEditable)> @@ -61,10 +61,10 @@ under the License. <#if (adjEditable)> - <#assign rowCount = rowCount + 1> - <#assign rowCountForAdjRemove = rowCountForAdjRemove + 1> + <#local rowCount = rowCount + 1> + <#local rowCountForAdjRemove = rowCountForAdjRemove + 1> - <#assign returnTotal = returnTotal + returnAdjustment.amount?default(0)> + <#local returnTotal = returnTotal + returnAdjustment.amount?default(0)> diff --git a/applications/order/template/return/ReturnReportBody.fo.ftl b/applications/order/template/return/ReturnReportBody.fo.ftl index 7b4aecba0f..5928febd22 100644 --- a/applications/order/template/return/ReturnReportBody.fo.ftl +++ b/applications/order/template/return/ReturnReportBody.fo.ftl @@ -18,8 +18,8 @@ under the License. --> <#escape x as x?xml> <#macro displayReturnAdjustment returnAdjustment> - <#assign returnHeader = returnAdjustment.getRelatedOne("ReturnHeader", false)> - <#assign adjReturnType = returnAdjustment.getRelatedOne("ReturnType", false)!> + <#local returnHeader = returnAdjustment.getRelatedOne("ReturnHeader", false)> + <#local adjReturnType = returnAdjustment.getRelatedOne("ReturnType", false)!> @@ -32,7 +32,7 @@ under the License. <@ofbizCurrency amount=returnAdjustment.amount isoCode=returnHeader.currencyUomId/> <#if returnAdjustment.amount?has_content> - <#assign total = total + returnAdjustment.get("amount")> + <#local total = total + returnAdjustment.get("amount")> diff --git a/applications/party/template/party/profileblocks/PaymentMethods.ftl b/applications/party/template/party/profileblocks/PaymentMethods.ftl index da686c8ae5..baad09333b 100644 --- a/applications/party/template/party/profileblocks/PaymentMethods.ftl +++ b/applications/party/template/party/profileblocks/PaymentMethods.ftl @@ -18,17 +18,17 @@ under the License. --> <#macro maskSensitiveNumber cardNumber> - <#assign cardNumberDisplay = ""> + <#local cardNumberDisplay = ""> <#if cardNumber?has_content> - <#assign size = cardNumber?length - 4> + <#local size = cardNumber?length - 4> <#if (size > 0)> <#list 0 .. size-1 as foo> - <#assign cardNumberDisplay = cardNumberDisplay + "*"> + <#local cardNumberDisplay = cardNumberDisplay + "*"> - <#assign cardNumberDisplay = cardNumberDisplay + cardNumber[size .. size + 3]> + <#local cardNumberDisplay = cardNumberDisplay + cardNumber[size .. size + 3]> <#else> <#-- but if the card number has less than four digits (ie, it was entered incorrectly), display it in full --> - <#assign cardNumberDisplay = cardNumber> + <#local cardNumberDisplay = cardNumber> ${cardNumberDisplay!} diff --git a/framework/webtools/template/datafile/ViewDataFile.ftl b/framework/webtools/template/datafile/ViewDataFile.ftl index 3d1c12ac2b..0144a8f396 100644 --- a/framework/webtools/template/datafile/ViewDataFile.ftl +++ b/framework/webtools/template/datafile/ViewDataFile.ftl @@ -73,9 +73,9 @@ under the License. <#macro displayrecords records> - <#assign lastRecordName = null> + <#local lastRecordName = null> <#list records as record> - <#assign modelRecord = record.getModelRecord()> + <#local modelRecord = record.getModelRecord()> <#-- if record is different than the last displayed, make a new table and header row --> <#if !(modelRecord.name == lastRecordName)> <#if lastRecordName??> @@ -101,7 +101,7 @@ under the License. <#list modelRecord.fields as modelField> - <#assign value = record.get(modelField.name)> + <#local value = record.get(modelField.name)> <#if value?has_content> <#else>
diff --git a/applications/order/template/entry/cart/ShowCartItems.ftl b/applications/order/template/entry/cart/ShowCartItems.ftl index f9004fef0b..21148b084f 100644 --- a/applications/order/template/entry/cart/ShowCartItems.ftl +++ b/applications/order/template/entry/cart/ShowCartItems.ftl @@ -19,8 +19,8 @@ under the License. <#-- Continuation of showcart.ftl: List of order items and forms to modify them. --> <#macro showAssoc productAssoc> - <#assign productAssocType = (delegator.findOne("ProductAssocType", {"productAssocTypeId" : productAssoc.productAssocTypeId}, false))/> - <#assign assocProduct = (delegator.findOne("Product", {"productId" : productAssoc.productIdTo}, false))/> + <#local productAssocType = (delegator.findOne("ProductAssocType", {"productAssocTypeId" : productAssoc.productAssocTypeId}, false))/> + <#local assocProduct = (delegator.findOne("Product", {"productId" : productAssoc.productIdTo}, false))/> <#if assocProduct?has_content> ${productAssoc.productIdTo} - ${(assocProduct.productName)!}(${(productAssocType.description)?default("Unknown")})
 
 
${value}