From ca640e6bb68cf3e38fadbb0911fcf14654122084 Mon Sep 17 00:00:00 2001 From: chrisala Date: Mon, 8 Jan 2024 15:05:31 +1100 Subject: [PATCH] Fixed typo #219 --- .../taglib/au/org/ala/ecodata/forms/ModelJSTagLib.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grails-app/taglib/au/org/ala/ecodata/forms/ModelJSTagLib.groovy b/grails-app/taglib/au/org/ala/ecodata/forms/ModelJSTagLib.groovy index 86e83ee..ea8dd03 100644 --- a/grails-app/taglib/au/org/ala/ecodata/forms/ModelJSTagLib.groovy +++ b/grails-app/taglib/au/org/ala/ecodata/forms/ModelJSTagLib.groovy @@ -746,13 +746,13 @@ class ModelJSTagLib { boolean userAddedRows = Boolean.valueOf(viewModel?.userAddedRows) def defaultRows = [] model.defaultRows?.eachWithIndex { row, i -> - defaultRows << INDENT*5 + "rowInitalisers.push(${ctx.propertyPath}.${model.name}.addRow(${row.toString()}));" + defaultRows << INDENT*5 + "rowInitialisers.push(${ctx.propertyPath}.${model.name}.addRow(${row.toString()}));" } def insertDefaultModel = defaultRows.join('\n') // If there are no default rows, insert a single blank row and make it available for editing. if (attrs.edit && model.defaultRows == null) { - insertDefaultModel = "rowInitalisers.push(${ctx.propertyPath}.${model.name}.addRow());" + insertDefaultModel = "rowInitialisers.push(${ctx.propertyPath}.${model.name}.addRow());" } out << """var context = _.extend({}, context, {parent:self, listName:'${model.name}'});""" @@ -760,7 +760,7 @@ class ModelJSTagLib { observableArray(ctx, [extender], false) out << """ ${ctx.propertyPath}.${model.name}.loadDefaults = function() { - var rowInitalisers = []; + var rowInitialisers = []; ${insertDefaultModel} return rowInitialisers; };