From b0cf737f82c4dbb3f224dc1588594a554dbfa548 Mon Sep 17 00:00:00 2001
From: Guy Sartorelli <guy.sartorelli@gmail.com>
Date: Wed, 2 Oct 2024 16:25:08 +1300
Subject: [PATCH] API Update references to API which has been renamed

---
 code/Forms/UsedOnTable.php                                    | 4 ++--
 .../Admin/Includes/CMSProfileController_EditForm.ss           | 4 ++--
 templates/SilverStripe/Admin/Includes/LeftAndMain_EditForm.ss | 4 ++--
 tests/php/ModelAdminTest.php                                  | 2 +-
 themes/cms-forms/templates/RightLabelledFieldHolder.ss        | 2 +-
 themes/cms-forms/templates/SilverStripe/Forms/CMSTabSet.ss    | 4 ++--
 .../templates/SilverStripe/Forms/CheckboxField_holder.ss      | 2 +-
 .../SilverStripe/Forms/CheckboxField_holder_small.ss          | 2 +-
 .../cms-forms/templates/SilverStripe/Forms/CompositeField.ss  | 2 +-
 .../templates/SilverStripe/Forms/CompositeField_holder.ss     | 2 +-
 .../SilverStripe/Forms/CompositeField_holder_buttongroup.ss   | 2 +-
 .../SilverStripe/Forms/CompositeField_holder_small.ss         | 4 ++--
 .../templates/SilverStripe/Forms/DatetimeField_holder.ss      | 2 +-
 themes/cms-forms/templates/SilverStripe/Forms/FieldGroup.ss   | 2 +-
 .../SilverStripe/Forms/FieldGroup_DefaultFieldHolder.ss       | 2 +-
 .../templates/SilverStripe/Forms/FieldGroup_holder.ss         | 2 +-
 .../templates/SilverStripe/Forms/FormAction_holder_small.ss   | 2 +-
 .../templates/SilverStripe/Forms/FormField_holder.ss          | 2 +-
 .../templates/SilverStripe/Forms/FormField_holder_small.ss    | 2 +-
 .../cms-forms/templates/SilverStripe/Forms/Includes/Form.ss   | 4 ++--
 themes/cms-forms/templates/SilverStripe/Forms/MoneyField.ss   | 4 ++--
 .../templates/SilverStripe/Forms/OptionsetField_holder.ss     | 2 +-
 .../cms-forms/templates/SilverStripe/Forms/SelectionGroup.ss  | 4 ++--
 themes/cms-forms/templates/SilverStripe/Forms/TabSet.ss       | 4 ++--
 24 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/code/Forms/UsedOnTable.php b/code/Forms/UsedOnTable.php
index 5897e0012..3f95e54f0 100644
--- a/code/Forms/UsedOnTable.php
+++ b/code/Forms/UsedOnTable.php
@@ -185,8 +185,8 @@ public function setRecord($record)
     public function getAttributes()
     {
         $attributes = [
-            'class' => $this->extraClass(),
-            'id' => $this->ID(),
+            'class' => $this->getExtraClass(),
+            'id' => $this->getID(),
             'data-schema' => json_encode($this->getSchemaData()),
             'data-state' => json_encode($this->getSchemaState()),
         ];
diff --git a/templates/SilverStripe/Admin/Includes/CMSProfileController_EditForm.ss b/templates/SilverStripe/Admin/Includes/CMSProfileController_EditForm.ss
index 927dd9aa5..847c58a69 100644
--- a/templates/SilverStripe/Admin/Includes/CMSProfileController_EditForm.ss
+++ b/templates/SilverStripe/Admin/Includes/CMSProfileController_EditForm.ss
@@ -10,7 +10,7 @@
 		<fieldset>
 			<% if $Legend %><legend>$Legend</legend><% end_if %>
 			<% loop $Fields %>
-				$FieldHolder
+				$renderFieldHolder
 			<% end_loop %>
 			<div class="clear"><!-- --></div>
 		</fieldset>
@@ -20,7 +20,7 @@
 		<% if $Actions %>
 		<div class="btn-toolbar">
 			<% loop $Actions %>
-				$Field
+				$renderField
 			<% end_loop %>
 		</div>
 		<% end_if %>
diff --git a/templates/SilverStripe/Admin/Includes/LeftAndMain_EditForm.ss b/templates/SilverStripe/Admin/Includes/LeftAndMain_EditForm.ss
index 86d4bd6c0..9930684ff 100644
--- a/templates/SilverStripe/Admin/Includes/LeftAndMain_EditForm.ss
+++ b/templates/SilverStripe/Admin/Includes/LeftAndMain_EditForm.ss
@@ -37,7 +37,7 @@
 		<fieldset>
 			<% if $Legend %><legend>$Legend</legend><% end_if %>
 			<% loop $Fields %>
-				$FieldHolder
+				$renderFieldHolder
 			<% end_loop %>
 			<div class="clear"><!-- --></div>
 		</fieldset>
@@ -47,7 +47,7 @@
 		<% if $Actions %>
 		<div class="btn-toolbar">
 			<% loop $Actions %>
-				$FieldHolder
+				$renderFieldHolder
 			<% end_loop %>
 			<% if $Controller.LinkPreview %>
 			<a href="$Controller.LinkPreview" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
diff --git a/tests/php/ModelAdminTest.php b/tests/php/ModelAdminTest.php
index 817d5bc9f..b1e66855c 100644
--- a/tests/php/ModelAdminTest.php
+++ b/tests/php/ModelAdminTest.php
@@ -136,7 +136,7 @@ public function testGetGridField()
 
         $this->assertStringContainsString(
             'OverridenModelAdmin',
-            $field->extraClass(),
+            $field->getExtraClass(),
             'OverridenModelAdmin has added an extra class to the grid field'
         );
         $this->assertStringContainsString(
diff --git a/themes/cms-forms/templates/RightLabelledFieldHolder.ss b/themes/cms-forms/templates/RightLabelledFieldHolder.ss
index 06cb8e0a6..aff33a39e 100644
--- a/themes/cms-forms/templates/RightLabelledFieldHolder.ss
+++ b/themes/cms-forms/templates/RightLabelledFieldHolder.ss
@@ -1,5 +1,5 @@
 <p id="$Name" class="field $Type">
-	$Field
+	$renderField
 	<label class="right" for="$id">$Title</label>
 	<% if $Message %><span class="alert $AlertType">$Message</span><% end_if %>
 </p>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/CMSTabSet.ss b/themes/cms-forms/templates/SilverStripe/Forms/CMSTabSet.ss
index c63450e54..fc14105d1 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/CMSTabSet.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/CMSTabSet.ss
@@ -8,11 +8,11 @@
 	<div class="tab-content">
         <% loop $Tabs %>
             <% if $Tabs %>
-                $FieldHolder
+                $renderFieldHolder
             <% else %>
                 <div $getAttributesHTML("class") class="tab-pane $extraClass">
                     <% loop $Fields %>
-                        $FieldHolder
+                        $renderFieldHolder
                     <% end_loop %>
                 </div>
             <% end_if %>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/CheckboxField_holder.ss b/themes/cms-forms/templates/SilverStripe/Forms/CheckboxField_holder.ss
index 887769249..fedadd040 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/CheckboxField_holder.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/CheckboxField_holder.ss
@@ -1,7 +1,7 @@
 <div id="$HolderID" class="form-group field<% if $extraClass %> $extraClass<% end_if %>">
     <div class="form__field-holder form-check">
         <label class="form-check-label">
-            $Field
+            $renderField
             $Title
         </label>
         <% if $Message %><p class="alert $AlertType" role="alert" id="message-$ID">$Message</p><% end_if %>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/CheckboxField_holder_small.ss b/themes/cms-forms/templates/SilverStripe/Forms/CheckboxField_holder_small.ss
index e98e33ebc..2b2547acb 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/CheckboxField_holder_small.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/CheckboxField_holder_small.ss
@@ -1,6 +1,6 @@
 <div id="$HolderID" class="form__fieldgroup-item checkboxfield-small form-check field field--small<% if $extraClass %> $extraClass<% end_if %>">
 	<label class="form-check-label">
-		$Field
+		$renderField
 		$Title
         $RightTitle
 	</label>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/CompositeField.ss b/themes/cms-forms/templates/SilverStripe/Forms/CompositeField.ss
index 702c7b286..e14e9468d 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/CompositeField.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/CompositeField.ss
@@ -2,5 +2,5 @@
 	<legend>$Legend</legend>
 <% end_if %>
 <% loop $FieldList %>
-	$FieldHolder
+	$renderFieldHolder
 <% end_loop %>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/CompositeField_holder.ss b/themes/cms-forms/templates/SilverStripe/Forms/CompositeField_holder.ss
index e3c6df17e..c3caecaa8 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/CompositeField_holder.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/CompositeField_holder.ss
@@ -7,7 +7,7 @@
 			<% if not $Title %> form__field-holder--no-label<% end_if %>
 			<% if $Zebra %> form__fieldgroup-zebra<% end_if %>"
 	>
-		$Field
+		$renderField
 		<% if $Message %><p class="alert $AlertType" role="alert" id="message-$ID">$Message</p><% end_if %>
         <% if $Description %><p class="form__field-description form-text" id="describes-$ID">$Description</p><% end_if %>
 	</$Tag>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/CompositeField_holder_buttongroup.ss b/themes/cms-forms/templates/SilverStripe/Forms/CompositeField_holder_buttongroup.ss
index 550e027e7..049443d6a 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/CompositeField_holder_buttongroup.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/CompositeField_holder_buttongroup.ss
@@ -1,3 +1,3 @@
 <div role="group" id="$HolderID" class="btn-group<% if $extraClass %> $extraClass<% end_if %>">
-	$Field
+	$renderField
 </div>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/CompositeField_holder_small.ss b/themes/cms-forms/templates/SilverStripe/Forms/CompositeField_holder_small.ss
index 70f086cd0..9d7011b2d 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/CompositeField_holder_small.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/CompositeField_holder_small.ss
@@ -9,9 +9,9 @@
 			<% if $Zebra %> form__fieldgroup-zebra<% end_if %>
 			<% if $extraClass %> $extraClass<% end_if %>"
 	>
-		<%-- Note: _holder_small.ss overrides CompositeField.ss to force nested $SmallFieldHolder --%>
+		<%-- Note: _holder_small.ss overrides CompositeField.ss to force nested $renderSmallFieldHolder --%>
 		<% loop $FieldList %>
-			$SmallFieldHolder
+			$renderSmallFieldHolder
 		<% end_loop %>
 	</$Tag>
 </div>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/DatetimeField_holder.ss b/themes/cms-forms/templates/SilverStripe/Forms/DatetimeField_holder.ss
index 5d634ce95..fac4c1e38 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/DatetimeField_holder.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/DatetimeField_holder.ss
@@ -7,7 +7,7 @@
 			<% if not $Title %> form__field-holder--no-label<% end_if %>
 			<% if $extraClass %> $extraClass<% end_if %>"
 	>
-		$Field
+		$renderField
 		<% if $Message %><p class="alert $AlertType" role="alert" id="message-$ID">$Message</p><% end_if %>
         <% if $Description %><p class="form__field-description form-text" id="describes-$ID">$Description</p><% end_if %>
 	</div>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/FieldGroup.ss b/themes/cms-forms/templates/SilverStripe/Forms/FieldGroup.ss
index c0dc9971a..b93342ca5 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/FieldGroup.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/FieldGroup.ss
@@ -1,3 +1,3 @@
 <% loop $FieldList %>
-	$SmallFieldHolder
+	$renderSmallFieldHolder
 <% end_loop %>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/FieldGroup_DefaultFieldHolder.ss b/themes/cms-forms/templates/SilverStripe/Forms/FieldGroup_DefaultFieldHolder.ss
index d280a0c55..e023b3304 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/FieldGroup_DefaultFieldHolder.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/FieldGroup_DefaultFieldHolder.ss
@@ -1,5 +1,5 @@
 <% loop $FieldList %>
 	<div class="form__fieldgroup-item">
-		$FieldHolder
+		$renderFieldHolder
 	</div>
 <% end_loop %>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/FieldGroup_holder.ss b/themes/cms-forms/templates/SilverStripe/Forms/FieldGroup_holder.ss
index d7a0fbcca..21decda60 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/FieldGroup_holder.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/FieldGroup_holder.ss
@@ -8,7 +8,7 @@
 			<% if $Zebra %> form__fieldgroup-zebra<% end_if %>
 			<% if $extraClass %> $extraClass<% end_if %>"
 	>
-		$Field
+		$renderField
 		<% if $Message %><p class="alert $AlertType" role="alert" id="message-$ID">$Message</p><% end_if %>
         <% if $Description %><p class="form__field-description form-text" id="describes-$ID">$Description</p><% end_if %>
 	</div>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/FormAction_holder_small.ss b/themes/cms-forms/templates/SilverStripe/Forms/FormAction_holder_small.ss
index 433fcfaec..4164230e8 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/FormAction_holder_small.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/FormAction_holder_small.ss
@@ -1,3 +1,3 @@
 <div id="$HolderID" class="form__fieldgroup-item field field--small action">
-	$Field
+	$renderField
 </div>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/FormField_holder.ss b/themes/cms-forms/templates/SilverStripe/Forms/FormField_holder.ss
index 73b908d87..1c1ac0fe6 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/FormField_holder.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/FormField_holder.ss
@@ -3,7 +3,7 @@
         <label for="$ID" id="title-$ID" class="form__field-label">$Title</label>
     <% end_if %>
     <div class="form__field-holder<% if not $Title %> form__field-holder--no-label<% end_if %>">
-        $Field
+        $renderField
         <% if $Message %><p class="alert $AlertType" role="alert" id="message-$ID">$Message</p><% end_if %>
         <% if $Description %><p class="form__field-description form-text" id="describes-$ID">$Description</p><% end_if %>
     </div>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/FormField_holder_small.ss b/themes/cms-forms/templates/SilverStripe/Forms/FormField_holder_small.ss
index 6d05f86fd..cffe0d2e1 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/FormField_holder_small.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/FormField_holder_small.ss
@@ -2,5 +2,5 @@
 	<% if $Title %>
 		<label for="$ID" id="title-$ID" class="form__fieldgroup-label">$Title</label>
 	<% end_if %>
-	$Field
+	$renderField
 </div>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/Includes/Form.ss b/themes/cms-forms/templates/SilverStripe/Forms/Includes/Form.ss
index 24a0dcfb2..e137bbf5d 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/Includes/Form.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/Includes/Form.ss
@@ -10,7 +10,7 @@
 	<fieldset>
 		<% if $Legend %><legend>$Legend</legend><% end_if %>
 		<% loop $Fields %>
-			$FieldHolder
+			$renderFieldHolder
 		<% end_loop %>
 		<div class="clear"><!-- --></div>
 	</fieldset>
@@ -18,7 +18,7 @@
 	<% if $Actions %>
 	<div class="btn-toolbar">
 		<% loop $Actions %>
-			$Field
+			$renderField
 		<% end_loop %>
 	</div>
 	<% end_if %>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/MoneyField.ss b/themes/cms-forms/templates/SilverStripe/Forms/MoneyField.ss
index 564cb795b..df7b301e2 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/MoneyField.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/MoneyField.ss
@@ -1,4 +1,4 @@
 <div class="form__fieldgroup <% if $extraClass %>$extraClass<% end_if %>" id="$ID" <% include SilverStripe/Forms/AriaAttributes %>>
-	$CurrencyField.SmallFieldHolder
-	$AmountField.SmallFieldHolder
+	$CurrencyField.renderSmallFieldHolder
+	$AmountField.renderSmallFieldHolder
 </div>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/OptionsetField_holder.ss b/themes/cms-forms/templates/SilverStripe/Forms/OptionsetField_holder.ss
index 73b908d87..1c1ac0fe6 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/OptionsetField_holder.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/OptionsetField_holder.ss
@@ -3,7 +3,7 @@
         <label for="$ID" id="title-$ID" class="form__field-label">$Title</label>
     <% end_if %>
     <div class="form__field-holder<% if not $Title %> form__field-holder--no-label<% end_if %>">
-        $Field
+        $renderField
         <% if $Message %><p class="alert $AlertType" role="alert" id="message-$ID">$Message</p><% end_if %>
         <% if $Description %><p class="form__field-description form-text" id="describes-$ID">$Description</p><% end_if %>
     </div>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/SelectionGroup.ss b/themes/cms-forms/templates/SilverStripe/Forms/SelectionGroup.ss
index 203a65f61..e2bab0f36 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/SelectionGroup.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/SelectionGroup.ss
@@ -8,7 +8,7 @@
 					<% if $FieldList %>
 						<div class="selection-group selection-group__item__fieldlist" id="$ID">
 							<% loop $FieldList %>
-								$Fieldholder
+								$renderFieldholder
 							<% end_loop %>
 						</div>
 					<% end_if %>
@@ -23,7 +23,7 @@
 				<% if $FieldList %>
 					<div class="selection-group selection-group__item__fieldlist" id="$ID">
 						<% loop $FieldList %>
-							$FieldHolder
+							$renderFieldHolder
 						<% end_loop %>
 					</div>
 				<% end_if %>
diff --git a/themes/cms-forms/templates/SilverStripe/Forms/TabSet.ss b/themes/cms-forms/templates/SilverStripe/Forms/TabSet.ss
index 83803a5da..107add485 100644
--- a/themes/cms-forms/templates/SilverStripe/Forms/TabSet.ss
+++ b/themes/cms-forms/templates/SilverStripe/Forms/TabSet.ss
@@ -10,11 +10,11 @@
 	<div class="tab-content">
 	  <% loop $Tabs %>
 		  <% if $Tabs %>
-			$FieldHolder
+			$renderFieldHolder
 		  <% else %>
 			<div $getAttributesHTML("class") class="tab-pane $extraClass">
 				<% loop $Fields %>
-					$FieldHolder
+					$renderFieldHolder
 				<% end_loop %>
 			</div>
 		  <% end_if %>