mirror of https://github.com/docusealco/docuseal
				
				
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							20 lines
						
					
					
						
							635 B
						
					
					
				
			
		
		
	
	
							20 lines
						
					
					
						
							635 B
						
					
					
				| # frozen_string_literal: true
 | |
| 
 | |
| module Submitters
 | |
|   module FormConfigs
 | |
|     module_function
 | |
| 
 | |
|     def call(submitter)
 | |
|       configs = submitter.submission.template.account.account_configs
 | |
|                          .where(key: [AccountConfig::FORM_COMPLETED_BUTTON_KEY,
 | |
|                                       AccountConfig::ALLOW_TYPED_SIGNATURE])
 | |
| 
 | |
|       completed_button = configs.find { |e| e.key == AccountConfig::FORM_COMPLETED_BUTTON_KEY }&.value || {}
 | |
| 
 | |
|       with_typed_signature = configs.find { |e| e.key == AccountConfig::ALLOW_TYPED_SIGNATURE }&.value != false
 | |
| 
 | |
|       { completed_button:, with_typed_signature: }
 | |
|     end
 | |
|   end
 | |
| end
 |