fix replace default value variable

This commit is contained in:
DocuSeal authored and Pete Matsyburka committed 2023-11-06 13:40:40 +02:00
1 parent c227a1988a
commit 0025928a35
1 file changed
+8 -4
+8 -4
View File
@@ -105,12 +105,16 @@ module Submitters
when 'time'
if with_time
I18n.l(Time.current.in_time_zone(template.account.timezone), format: :long, locale: template.account.locale)
else
e
end
when 'date'
I18n.l(Time.current.in_time_zone(template.account.timezone).to_date) if with_time
when 'name', 'full_name'
"#{attrs['first_name']} #{attrs['last_name']}".strip.presence || e
when 'role', 'email', 'phone'
if with_time
I18n.l(Time.current.in_time_zone(template.account.timezone).to_date)
else
e
end
when 'role', 'email', 'phone', 'name'
attrs[key] || e
else
e