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.
		
		
		
		
		
			
		
			
				
					
					
						
							43 lines
						
					
					
						
							2.3 KiB
						
					
					
				
			
		
		
	
	
							43 lines
						
					
					
						
							2.3 KiB
						
					
					
				| <div class="flex flex-wrap space-y-4 md:flex-nowrap md:space-y-0">
 | |
|   <%= render 'shared/settings_nav' %>
 | |
|   <div class="flex-grow max-w-xl mx-auto">
 | |
|     <h1 class="text-4xl font-bold mb-4">Storage</h1>
 | |
|     <p class="mb-4">
 | |
|       Select files storage option (TODO)
 | |
|     </p>
 | |
|     <% value = @encrypted_config.value || { 'service' => 'disk' } %>
 | |
|     <% configs = value['configs'] || {} %>
 | |
|     <%= form_for @encrypted_config, url: settings_storage_index_path, method: :post, html: { autocomplete: 'off', class: 'w-full' } do |f| %>
 | |
|       <% options = [['Disk', 'disk'], ['AWS S3', 'aws_s3'], ['Google Cloud', 'google'], ['Azure', 'azure']] %>
 | |
|       <toggle-visible data-element-ids="<%= options.map(&:last).to_json %>" class="block relative">
 | |
|         <ul class="items-center w-full text-sm font-medium text-gray-900 space-y-2 sm:space-y-0 sm:flex sm:space-x-2">
 | |
|           <% options.each do |(label, val)| %>
 | |
|             <li class="w-full border border-neutral-focus rounded-xl hover:bg-neutral hover:text-white">
 | |
|               <div class="flex items-center pl-3">
 | |
|                 <%= f.radio_button :selected, val, checked: value['service'] == val, data: { action: 'change:toggle-visible#trigger' }, class: 'base-radio' %>
 | |
|                 <%= f.label :selected, label, value: val, class: 'w-full py-3 ml-2 text-sm font-medium' %>
 | |
|               </div>
 | |
|             </li>
 | |
|           <% end %>
 | |
|         </ul>
 | |
|       </toggle-visible>
 | |
|       <disable-hidden id="disk" class="block my-4 <%= 'hidden' if value['service'] != 'disk' %>">
 | |
|         <%= render "disk_form", f: f %>
 | |
|       </disable-hidden>
 | |
|       <disable-hidden id="aws_s3" class="block my-4 <%= 'hidden' if value['service'] != 'aws_s3' %>">
 | |
|         <%= render "aws_form", f: f, configs: configs, value: value %>
 | |
|       </disable-hidden>
 | |
|       <disable-hidden id="google" class="block my-4 <%= 'hidden' if value['service'] != 'google' %>">
 | |
|         <%= render "google_cloud_form", f: f, configs: configs, value: value %>
 | |
|       </disable-hidden>
 | |
|       <disable-hidden id="azure" class="block my-4 <%= 'hidden' if value['service'] != 'azure' %>">
 | |
|         <%= render "azure_form", f: f, configs: configs, value: value %>
 | |
|       </disable-hidden>
 | |
|       <div class="form-control">
 | |
|         <%= f.button button_title(title: 'Save', disabled_with: 'Saving'), class: 'base-button' %>
 | |
|       </div>
 | |
|     <% end %>
 | |
|   </div>
 | |
|   <div class="w-0 md:w-52"></div>
 | |
| </div>
 |