Skip to content

Commit a526b15

Browse files
committed
feat: state for partial replacements in file form
1 parent f08b9b5 commit a526b15

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

assets/js/Components/Forms/FileForm.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,33 @@ export default function FileForm ({
239239
</div>
240240
}
241241

242+
{!activeFile.reviewed && activeFile.replacement &&
243+
<>
244+
<div className={`resolve-option ${activeOption === FORM_OPTIONS.MARK_AS_REVIEWED ? 'selected' : ''}`}>
245+
<label className={`option-label` + (isDisabled ? ' disabled' : '')}>
246+
<input
247+
type="radio"
248+
id={FORM_OPTIONS.MARK_AS_REVIEWED}
249+
name="altTextOption"
250+
tabIndex="0"
251+
checked={activeOption === FORM_OPTIONS.MARK_AS_REVIEWED}
252+
disabled={isDisabled}
253+
onChange={() => {
254+
handleOptionChange(FORM_OPTIONS.MARK_AS_REVIEWED)
255+
}} />
256+
{t('form.file.mark_review')}
257+
</label>
258+
</div>
259+
<div className='callout-container'>
260+
<div className='p-2 flex-column justify-content-center align-items-center text-center'>
261+
<h3 className="mt-0">{t('form.file.failed_replacement')}</h3>
262+
<div className="instructions">{t('form.file.failed_instruction')}</div>
263+
</div>
264+
</div>
265+
266+
</>
267+
}
268+
242269
{activeFile.reviewed && !activeFile.replacement &&
243270
<div className='callout-container'>
244271
<div className='p-2 flex-column justify-content-center align-items-center text-center'>

translations/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,9 @@
503503
"form.file.revert_instructions": "You will be reverting the file references to have the original file: {file}",
504504
"form.file.revert_label": "Revert Changes",
505505
"form.file.marked_review": "Marked as Reviewed",
506+
"form.file.mark_review": "Mark as Reviewed",
507+
"form.file.failed_replacement": "Failed to Replace some Instances",
508+
"form.file.failed_instruction": "Unfortunately we failed to replace the file in some of the content items. Please manually replace the files in the content items where it is still labeled as original.",
506509
"form.file.marked_review_instruction": "This file has been checked for accessibility and marked as reviewed. Mark the file has unreviewed if you believe it is inaccessible and needs changes",
507510
"form.file.keep_current": "Keep Current File",
508511
"form.file.upload_instructions": "Click or drag and drop here to upload a new file.",

0 commit comments

Comments
 (0)