From b0cf737f82c4dbb3f224dc1588594a554dbfa548 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli 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 @@
<% if $Legend %>$Legend<% end_if %> <% loop $Fields %> - $FieldHolder + $renderFieldHolder <% end_loop %>
@@ -20,7 +20,7 @@ <% if $Actions %>
<% loop $Actions %> - $Field + $renderField <% end_loop %>
<% 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 @@
<% if $Legend %>$Legend<% end_if %> <% loop $Fields %> - $FieldHolder + $renderFieldHolder <% end_loop %>
@@ -47,7 +47,7 @@ <% if $Actions %>
<% loop $Actions %> - $FieldHolder + $renderFieldHolder <% end_loop %> <% if $Controller.LinkPreview %> 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 @@

- $Field + $renderField <% if $Message %>$Message<% end_if %>

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 @@
<% loop $Tabs %> <% if $Tabs %> - $FieldHolder + $renderFieldHolder <% else %>
<% loop $Fields %> - $FieldHolder + $renderFieldHolder <% end_loop %>
<% 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 @@
<% if $Message %><% 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 @@
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 <% 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 %><% end_if %> <% if $Description %>

$Description

<% end_if %> 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 @@
- $Field + $renderField
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 %>
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 %><% end_if %> <% if $Description %>

$Description

<% end_if %>
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 %>
- $FieldHolder + $renderFieldHolder
<% 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 %><% end_if %> <% if $Description %>

$Description

<% end_if %>
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 @@
- $Field + $renderField
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 @@ <% end_if %>
- $Field + $renderField <% if $Message %><% end_if %> <% if $Description %>

$Description

<% end_if %>
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 %> <% end_if %> - $Field + $renderField
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 @@
<% if $Legend %>$Legend<% end_if %> <% loop $Fields %> - $FieldHolder + $renderFieldHolder <% end_loop %>
@@ -18,7 +18,7 @@ <% if $Actions %>
<% loop $Actions %> - $Field + $renderField <% end_loop %>
<% 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 @@
> - $CurrencyField.SmallFieldHolder - $AmountField.SmallFieldHolder + $CurrencyField.renderSmallFieldHolder + $AmountField.renderSmallFieldHolder
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 @@ <% end_if %>
- $Field + $renderField <% if $Message %><% end_if %> <% if $Description %>

$Description

<% end_if %>
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 %>
<% loop $FieldList %> - $Fieldholder + $renderFieldholder <% end_loop %>
<% end_if %> @@ -23,7 +23,7 @@ <% if $FieldList %>
<% loop $FieldList %> - $FieldHolder + $renderFieldHolder <% end_loop %>
<% 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 @@
<% loop $Tabs %> <% if $Tabs %> - $FieldHolder + $renderFieldHolder <% else %>
<% loop $Fields %> - $FieldHolder + $renderFieldHolder <% end_loop %>
<% end_if %>