fix replace default value variable

This commit is contained in:
DocuSeal
2023-11-06 13:36:38 +02:00
committed by Pete Matsyburka
parent c227a1988a
commit 0025928a35
+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