diff options
Diffstat (limited to 'animism-align/frontend/app/views/align/components/annotations/annotation.form.js')
| -rw-r--r-- | animism-align/frontend/app/views/align/components/annotations/annotation.form.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/animism-align/frontend/app/views/align/components/annotations/annotation.form.js b/animism-align/frontend/app/views/align/components/annotations/annotation.form.js index 8ca3c3f..92b5a5f 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotation.form.js +++ b/animism-align/frontend/app/views/align/components/annotations/annotation.form.js @@ -14,6 +14,8 @@ import { annotationFormLookup } from './annotationForms' const ANNOTATION_TYPES = [ 'sentence', 'section_heading', 'heading_text', 'pullquote_credit', 'paragraph_end', + 'footnote', + 'text_plate', 'video', 'image', 'gallery', 'carousel', 'grid', 'vitrine', @@ -21,6 +23,10 @@ const ANNOTATION_TYPES = [ 'curtain', 'intro', 'schedule', ].map(name => ({ name, label: capitalize(name.replace('_', ' ')) })) +const annotationTextTypes = new Set([ + 'sentence', 'section_heading', 'heading_text', 'pullquote_credit', 'footnote', 'text_plate', +]) + class AnnotationForm extends Component { constructor(props){ super(props) @@ -129,10 +135,7 @@ class AnnotationForm extends Component { }} > {this.renderButtons()} - {annotation.type === 'sentence' && this.renderTextarea()} - {annotation.type === 'section_heading' && this.renderTextarea()} - {annotation.type === 'heading_text' && this.renderTextarea()} - {annotation.type === 'pullquote_credit' && this.renderTextarea()} + {annotationTextTypes.has(annotation.type) && this.renderTextarea()} {(annotation.type in annotationFormLookup) && this.renderElementForm()} </div> ) |
