Remove references to invalid action
authorEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 15 Sep 2023 03:01:56 +0000 (15:01 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 15 Sep 2023 03:01:56 +0000 (15:01 +1200)
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
templates/CRM/UF/Form/Fields.tpl
templates/CRM/common/jcalendar.tpl

index eba3e6be0e7aaf50cdd576db4a2cc1c89069d73c..43e4511a9c4d86255c4115f1866cfcb1a4fe3f47 100644 (file)
@@ -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}
       <div class="messages help">{$field.groupHelpPost}</div>
     {/if}
 
@@ -25,7 +25,7 @@
       </div>
     {/if}
 
-    {if $mode ne 8 && $action neq 1028 && !$hideFieldset}
+    {if $mode ne 8 && !$hideFieldset}
     </fieldset>
     {/if}
 
index 2dc383fda3e89b3ac730f50a22e4bebfb7fac112..4cf2a9f1a0402b107debbf70e888d1100746bbd9 100644 (file)
@@ -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}
       <fieldset class="crm-profile crm-profile-id-{$field.group_id} crm-profile-name-{$field.groupName}"><legend>{$field.groupDisplayTitle}</legend>
     {/if}
 
     {/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}
       <div class="messages help">{$field.groupHelpPre}</div>
     {/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}
       <div class="crm-section helprow-{$profileFieldName}-section helprow-pre" id="helprow-{$rowIdentifier}">
         <div class="content description">{$field.help_pre}</div>
       </div>
         <div class="clear"></div>
       </div>
     {/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}
       <div class="crm-section helprow-{$profileFieldName}-section helprow-post" id="helprow-{$rowIdentifier}">
         <div class="content description">{$field.help_post}</div>
       </div>
index 64153189bb293f0e3382b1e15474da68f30668ef..e5c2b07cca655508ad3c50b5674e925cd6d79f79 100644 (file)
@@ -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}
-    <input type="text" name="{$displayDate}" id="{$displayDate}" class="dateplugin" autocomplete="off"/>
-{/if}
+<input type="text" name="{$displayDate}" id="{$displayDate}" class="dateplugin" autocomplete="off"/>
 
 {if $batchUpdate AND $timeElement AND $tElement}
     &nbsp;&nbsp;{$form.field.$elementIndex.$tElement.label}&nbsp;&nbsp;{$form.field.$elementIndex.$tElement.html|crmAddClass:six}
@@ -49,9 +47,8 @@
     {$form.$timeElement.html|crmAddClass:six}
 {/if}
 
-{if $action neq 1028}
-    <a href="#" class="crm-hover-button crm-clear-link" title="{ts}Clear{/ts}"><i class="crm-i fa-times" aria-hidden="true"></i></a>
-{/if}
+
+ <a href="#" class="crm-hover-button crm-clear-link" title="{ts}Clear{/ts}"><i class="crm-i fa-times" aria-hidden="true"></i></a>
 
 <script type="text/javascript">
     {literal}