mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 06:42:32 -05:00
implement submission page
This commit is contained in:
1 parent
587be1bb67
commit
1da67011c4
17 files changed
+231
-130
No files matched your search
@@ -1,4 +1,20 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Templates
|
||||
module_function
|
||||
|
||||
def build_field_areas_index(template)
|
||||
hash = {}
|
||||
|
||||
template.fields.each do |field|
|
||||
(field['areas'] || []).each do |area|
|
||||
hash[area['attachment_uuid']] ||= {}
|
||||
acc = (hash[area['attachment_uuid']][area['page']] ||= [])
|
||||
|
||||
acc << [area, field]
|
||||
end
|
||||
end
|
||||
|
||||
hash
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user