From 1087099beef81da3d95ab3045812f7375c6b088b Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 15 Sep 2023 15:01:56 +1200 Subject: [PATCH] Remove references to invalid action All these references refer to comparing action to 1028. The comments make is clear that they are looking for 'preview' mode - but preview mode is 1024. The checks are all does-not-equal. So, they would have always been true for a very long time. Copy & paste is dead long live copy & paste --- templates/CRM/UF/Form/Block.tpl | 4 ++-- templates/CRM/UF/Form/Fields.tpl | 14 +++++++------- templates/CRM/common/jcalendar.tpl | 9 +++------ 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/templates/CRM/UF/Form/Block.tpl b/templates/CRM/UF/Form/Block.tpl index eba3e6be0e..43e4511a9c 100644 --- a/templates/CRM/UF/Form/Block.tpl +++ b/templates/CRM/UF/Form/Block.tpl @@ -15,7 +15,7 @@ {assign var=fieldset value=$zeroField} {include file="CRM/UF/Form/Fields.tpl"} - {if $field.groupHelpPost && $action neq 4 && $action neq 1028} + {if $field.groupHelpPost && $action neq 4}
{$field.groupHelpPost}
{/if} @@ -25,7 +25,7 @@ {/if} - {if $mode ne 8 && $action neq 1028 && !$hideFieldset} + {if $mode ne 8 && !$hideFieldset} {/if} diff --git a/templates/CRM/UF/Form/Fields.tpl b/templates/CRM/UF/Form/Fields.tpl index 2dc383fda3..4cf2a9f1a0 100644 --- a/templates/CRM/UF/Form/Fields.tpl +++ b/templates/CRM/UF/Form/Fields.tpl @@ -22,7 +22,7 @@ {/if} {/if} - {if $mode ne 8 && $action ne 1028 && $action ne 4 && !$hideFieldset} + {if $mode ne 8 && $action ne 4 && !$hideFieldset}
{$field.groupDisplayTitle} {/if} @@ -31,18 +31,18 @@ {/if} {assign var=fieldset value=`$field.groupTitle`} {assign var=groupHelpPost value=`$field.groupHelpPost`} - {if $field.groupHelpPre && $action neq 4 && $action neq 1028} + {if $field.groupHelpPre && $action neq 4}
{$field.groupHelpPre}
{/if} {/if} {if $field.field_type eq "Formatting"} - {if $action neq 4 && $action neq 1028} + {if $action neq 4} {$field.help_pre} {/if} {elseif $profileFieldName} - {* Show explanatory text for field if not in 'view' or 'preview' modes *} - {if $field.help_pre && $action neq 4 && $action neq 1028} + {* Show explanatory text for field if not in 'view' mode *} + {if $field.help_pre && $action neq 4}
{$field.help_pre}
@@ -141,8 +141,8 @@
{/if} - {* Show explanatory text for field if not in 'view' or 'preview' modes *} - {if $field.help_post && $action neq 4 && $action neq 1028} + {* Show explanatory text for field if not in 'view' mode *} + {if $field.help_post && $action neq 4}
{$field.help_post}
diff --git a/templates/CRM/common/jcalendar.tpl b/templates/CRM/common/jcalendar.tpl index 64153189bb..e5c2b07cca 100644 --- a/templates/CRM/common/jcalendar.tpl +++ b/templates/CRM/common/jcalendar.tpl @@ -36,9 +36,7 @@ {* CRM-15804 - CiviEvent Date Picker broken in modal dialog *} {assign var='displayDate' value=$elementId|cat:"_display"|cat:"_$string"|uniqid} -{if $action neq 1028} - -{/if} + {if $batchUpdate AND $timeElement AND $tElement}   {$form.field.$elementIndex.$tElement.label}  {$form.field.$elementIndex.$tElement.html|crmAddClass:six} @@ -49,9 +47,8 @@ {$form.$timeElement.html|crmAddClass:six} {/if} -{if $action neq 1028} - -{/if} + +