stabilizing redact required behavior

pull/150/merge^2
iozeey 2 years ago
parent e67daa42cf
commit 15fe135ce7

@ -68,7 +68,7 @@
@blur="onNameBlur"
>{{ optionIndexText }} {{ field.name || defaultName }}</span>
<div
v-if="isNameFocus && !['checkbox', 'phone'].includes(field.type)"
v-if="isNameFocus && !['checkbox', 'phone', 'redact'].includes(field.type)"
class="flex items-center ml-1.5"
>
<input

@ -611,6 +611,9 @@ export default {
...this.dragField
}
if (['redact'].includes(field.type)) {
field.required = 'false'
}
if (['select', 'multiple', 'radio'].includes(field.type)) {
field.options = [{ value: '', uuid: v4() }]
}

@ -31,7 +31,7 @@
/>
</div>
<div
v-if="isNameFocus"
v-if="isNameFocus && !['redact'].includes(field.type)"
class="flex items-center relative"
>
<template v-if="field.type != 'phone'">

@ -250,7 +250,9 @@ export default {
submitter_uuid: this.selectedSubmitter.uuid,
type
}
if (['redact'].includes(type)) {
field.required = 'false'
}
if (['select', 'multiple', 'radio'].includes(type)) {
field.options = [{ value: '', uuid: v4() }]
}

@ -9,7 +9,8 @@
<%= render 'banner' %>
<% (@submitter.submission.template_schema || @submitter.submission.template.schema).each do |item| %>
<% document = @submitter.submission.template_schema_documents.find { |a| a.uuid == item['attachment_uuid'] } %>
<% document_annots_index = document.metadata.dig('pdf', 'annotations')&.group_by { |e| e['page'] } || {} %>
<% document_annots_index = document.metadata.dig('pdf', 'annotations')&.group_by { |e| e['page'] } || {} %>
<% document.preview_secured_images.load %>
<% preview_images_index = document.preview_secured_images.loaded? ? document.preview_secured_images.index_by { |e| e.filename.base.to_i } : {} %>
<% lazyload_metadata = document.preview_secured_images.last.metadata %>
<% (document.metadata.dig('pdf', 'number_of_pages') || (document.preview_secured_images.loaded? ? preview_images_index.size : document.preview_secured_images.size)).times do |index| %>

@ -117,6 +117,7 @@
const template = this.getAttribute('data-template')
setTimeout(function () {
window.location.href = template
document.getElementById('loader').style.display = 'none'
}, 3000)
})
}

Loading…
Cancel
Save