mirror of https://github.com/docusealco/docuseal
parent
8b760281d2
commit
7234915818
@ -1,10 +1,8 @@
|
||||
<div class="max-w-6xl mx-auto px-2 py-3">
|
||||
<%= link_to 'Create Template', new_template_path, data: { turbo_frame: :modal } %>
|
||||
<% @templates.each do |template| %>
|
||||
<div>
|
||||
<%= template.name %> |
|
||||
<a href="<%= template_path(template) %>">edit</a> |
|
||||
<a href="<%= template_submissions_path(template) %>">submissions</a> |
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% @templates.each do |template| %>
|
||||
<div>
|
||||
<%= template.name %> |
|
||||
<a href="<%= template_path(template) %>">edit</a> |
|
||||
<a href="<%= template_submissions_path(template) %>">submissions</a> |
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@ -1,17 +1,19 @@
|
||||
<div class="max-w-6xl mx-auto">
|
||||
<div class="flex space-x-8">
|
||||
<%= render 'shared/settings_nav' %>
|
||||
<div class="mt-4">
|
||||
<%= form_for '', url: settings_esign_index_path, method: :post do |f| %>
|
||||
<file-dropzone data-name="verify_attachments">
|
||||
<label for="file">
|
||||
<input id="attachment_uuid" name="attachment_uuid" class="hidden" data-target="file-dropzone.valueField" type="text" autocomplete="off">
|
||||
<input id="file" class="hidden" data-action="change:file-dropzone#onSelectFiles" data-target="file-dropzone.input" type="file">
|
||||
LCick to upload
|
||||
</label>
|
||||
</file-dropzone>
|
||||
<%= f.button button_title %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="flex flex-wrap space-y-4 md:flex-nowrap md:space-y-0 md:space-x-16">
|
||||
<%= render 'shared/settings_nav' %>
|
||||
<div class="flex-grow max-w-xl">
|
||||
<h1 class="text-4xl font-bold mb-4">eSign</h1>
|
||||
<p>
|
||||
Upload your electronic signature
|
||||
</p>
|
||||
<%= form_for '', url: settings_esign_index_path, method: :post do |f| %>
|
||||
<file-dropzone data-name="verify_attachments" class="">
|
||||
<label for="file">
|
||||
<input id="attachment_uuid" name="attachment_uuid" class="hidden" data-target="file-dropzone.valueField" type="text" autocomplete="off">
|
||||
<input id="file" class="hidden" data-action="change:file-dropzone#onSelectFiles" data-target="file-dropzone.input" type="file">
|
||||
Cick to upload
|
||||
</label>
|
||||
</file-dropzone>
|
||||
<%= f.button button_title %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,28 +1,32 @@
|
||||
<%= f.fields_for :value do |ff| %>
|
||||
<%= ff.hidden_field :service, value: 'aws_s3' %>
|
||||
<%= ff.fields_for :configs, configs do |fff| %>
|
||||
<div>
|
||||
<%= fff.label :access_key_id, 'Access key ID' %>
|
||||
<%= fff.text_field :access_key_id, value: configs['access_key_id'], required: true %>
|
||||
<div class="grid md:grid-cols-2 gap-4">
|
||||
<div class="form-control">
|
||||
<%= fff.label :access_key_id, 'Access key ID', class: 'label' %>
|
||||
<%= fff.text_field :access_key_id, value: configs['access_key_id'], required: true, class: 'base-input' %>
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<%= fff.label :secret_access_key, class: 'label' %>
|
||||
<%= fff.password_field :secret_access_key, value: configs['secret_access_key'], required: true, class: 'base-input' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid md:grid-cols-2 gap-4">
|
||||
<div class="form-control">
|
||||
<%= fff.label :region, class: 'label' %>
|
||||
<%= fff.text_field :region, value: configs['region'], required: true, class: 'base-input' %>
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<%= fff.label :bucket, class: 'label' %>
|
||||
<%= fff.text_field :bucket, value: value['service'] == 'aws_s3' ? configs['bucket'] : '', required: true, class: 'base-input' %>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :secret_access_key %>
|
||||
<%= fff.password_field :secret_access_key, value: configs['secret_access_key'], required: true %>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :region %>
|
||||
<%= fff.text_field :region, value: configs['region'], required: true %>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :bucket %>
|
||||
<%= fff.text_field :bucket, value: value['service'] == 'aws_s3' ? configs['bucket'] : '', required: true %>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :endpoint %>
|
||||
<%= fff.text_field :endpoint, value: configs['endpoint'], type: :url %>
|
||||
<small>
|
||||
For AWS S3 compantiable APIs like Minio.
|
||||
</small>
|
||||
<div class="form-control">
|
||||
<%= fff.label :endpoint, class: 'label' %>
|
||||
<%= fff.text_field :endpoint, value: configs['endpoint'], type: :url, class: 'base-input' %>
|
||||
<label class="label">
|
||||
<span class="label-text-alt">For AWS S3 compantiable APIs like Minio.</span>
|
||||
</label>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@ -1,10 +1,17 @@
|
||||
<%= f.fields_for :value do |ff| %>
|
||||
<%= ff.hidden_field :service, value: 'disk' %>
|
||||
<% end %>
|
||||
<div class="text-center max-w-xl mx-auto my-8 text-xl font-medium leading-9">
|
||||
Store all files on disk
|
||||
<br>
|
||||
No configs are needed but make sure your disk is persistent
|
||||
<br>
|
||||
(not suitable for Heroku and other PaaS)
|
||||
<div class="alert my-4">
|
||||
<div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
<div>
|
||||
<h3 class="font-bold"> Store all files on disk</h3>
|
||||
<p class="text-gray-700">
|
||||
No configs are needed but make sure your disk is persistent
|
||||
<br>
|
||||
<i>(not suitable for Heroku and other PaaS)</i>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,17 +1,19 @@
|
||||
<%= f.fields_for :value do |ff| %>
|
||||
<%= ff.hidden_field :service, value: 'google' %>
|
||||
<%= ff.fields_for :configs, configs do |fff| %>
|
||||
<div>
|
||||
<%= fff.label :project, 'Project' %>
|
||||
<%= fff.text_field :project, value: configs['project'], required: true %>
|
||||
<div class="grid md:grid-cols-2 gap-4">
|
||||
<div class="form-control">
|
||||
<%= fff.label :project, 'Project', class: 'label' %>
|
||||
<%= fff.text_field :project, value: configs['project'], required: true, class: 'base-input' %>
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<%= fff.label :bucket, class: 'label' %>
|
||||
<%= fff.text_field :bucket, value: value['service'] == 'google' ? configs['bucket'] : '', required: true , class: 'base-input' %>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :bucket %>
|
||||
<%= fff.text_field :bucket, value: value['service'] == 'google' ? configs['bucket'] : '', required: true %>
|
||||
</div>
|
||||
<div>
|
||||
<%= fff.label :credentials, 'Credentials (JSON key content)' %>
|
||||
<%= fff.text_area :credentials, value: configs['credentials'], required: true %>
|
||||
<div class="form-control">
|
||||
<%= fff.label :credentials, 'Credentials (JSON key content)', class: 'label' %>
|
||||
<%= fff.text_area :credentials, value: configs['credentials'], required: true, class: 'base-input' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@ -1,36 +1,36 @@
|
||||
<div class="flex flex-wrap space-y-4 md:flex-nowrap md:space-y-0 md:space-x-16">
|
||||
<%= render 'shared/settings_nav' %>
|
||||
<div class="flex-grow max-w-xl">
|
||||
<h1 class="text-4xl font-bold mb-4">Storage</h1>
|
||||
<p class="mb-4">
|
||||
Select files torage 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']] %>
|
||||
<toggle-visible data-element-ids="<%= options.map(&:last).to_json %>" class="block relative">
|
||||
<div class="flex space-x-2 relative">
|
||||
<% [['Disk', 'disk'], ['AWS S3', 'aws_s3'], ['Google Cloud', 'google']].each do |(label, val)| %>
|
||||
<%= f.label :selected, value: val, class: 'w-full flex flex-1 items-center space-x-2 btn btn-outline rounded-xl' do %>
|
||||
<%= f.radio_button :selected, val, checked: value['service'] == val, data: { action: 'change:toggle-visible#trigger' }, class: 'base-radio' %>
|
||||
<span><%= label %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</toggle-visible>
|
||||
<disable-hidden id="disk" class="<%= 'hidden' if value['service'] != 'disk' %>">
|
||||
<%= render "disk_form", f: f %>
|
||||
</disable-hidden>
|
||||
<disable-hidden id="aws_s3" class="<%= 'hidden' if value['service'] != 'aws_s3' %>">
|
||||
<%= render "aws_form", f: f, configs: configs, value: value %>
|
||||
</disable-hidden>
|
||||
<disable-hidden id="google" class="<%= 'hidden' if value['service'] != 'google' %>">
|
||||
<%= render "google_cloud", f: f, configs: configs, value: value %>
|
||||
</disable-hidden>
|
||||
<div class="form-control">
|
||||
<%= f.button button_title('OK'), class: 'base-button' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<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']] %>
|
||||
<toggle-visible data-element-ids="<%= options.map(&:last).to_json %>" class="block relative">
|
||||
<div class="flex space-x-2 relative">
|
||||
<% [['Disk', 'disk'], ['AWS S3', 'aws_s3'], ['Google Cloud', 'google']].each do |(label, val)| %>
|
||||
<%= f.label :selected, value: val, class: 'w-full flex flex-1 items-center space-x-2 btn btn-outline rounded-xl' do %>
|
||||
<%= f.radio_button :selected, val, checked: value['service'] == val, data: { action: 'change:toggle-visible#trigger' }, class: 'base-radio' %>
|
||||
<span><%= label %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</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", f: f, configs: configs, value: value %>
|
||||
</disable-hidden>
|
||||
<div class="form-control">
|
||||
<%= f.button button_title('OK'), class: 'base-button' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in new issue