From 6aebdd3b44bbee8fe603f0c828fd394e8d208146 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Tue, 25 Apr 2023 12:57:37 -0400 Subject: [PATCH] dev/core#1821 fix custom field option list radio clear link --- .../CRM/Custom/Form/Edit/CustomField.tpl | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/templates/CRM/Custom/Form/Edit/CustomField.tpl b/templates/CRM/Custom/Form/Edit/CustomField.tpl index fbf5ee179e..7a4089fb03 100644 --- a/templates/CRM/Custom/Form/Edit/CustomField.tpl +++ b/templates/CRM/Custom/Form/Edit/CustomField.tpl @@ -16,30 +16,28 @@ {/if} {if $element.options_per_line} - {$formElement.label}{if $element.help_post}{help id=$element.id file="CRM/Custom/Form/CustomField.hlp" title=$element.label}{/if} + {$formElement.label}{if $element.help_post}{help id=$element.id file="CRM/Custom/Form/CustomField.hlp" title=$element.label}{/if} {assign var="count" value="1"} - - - {* sort by fails for option per line. Added a variable to iterate through the element array*} - {assign var="index" value="1"} - {foreach name=outer key=key item=item from=$formElement} - {if $index < 10} - {assign var="index" value=$index+1} - {else} - + {* sort by fails for option per line. Added a variable to iterate through the element array*} + {assign var="index" value="1"} + {foreach name=outer key=key item=item from=$formElement} + {if $index < 10} + {assign var="index" value=`$index+1`} + {else} + {$formElement.$key.html} {if $count == $element.options_per_line} - - - {assign var="count" value="1"} +
+ {assign var="count" value="1"} {else} - {assign var="count" value=$count+1} - {/if} + {assign var="count" value=`$count+1`} {/if} - {/foreach} - -
{$formElement.$key.html}
+ {/if} + {/foreach} + + {if $element.html_type == 'Radio' and $element.is_required == 0} +
+ {/if} {else} -- 2.25.1