-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bulk edit instructions and confirmation modal (#2151)
* add detailed instructions to bulk edit * add bulk confirmation page * transifex fixes * remove comment
- Loading branch information
1 parent
e808f1a
commit 6bc33af
Showing
6 changed files
with
266 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...ponents/AdminPane/Manage/ManageChallenges/EditChallenge/BulkSchemas/InstructionsSchema.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import messages from '../Messages' | ||
|
||
export const jsSchema = (intl) => { | ||
const schemaFields = { | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
type: "object", | ||
properties: { | ||
instruction: { | ||
title: intl.formatMessage(messages.instructionLabel), | ||
type: "string", | ||
minLength: 150, | ||
description: intl.formatMessage(messages.instructionsDescription), | ||
}, | ||
}, | ||
} | ||
|
||
return schemaFields | ||
} | ||
|
||
export const uiSchema = (intl) => { | ||
const uiSchemaFields = { | ||
"ui:order": [ "instruction" ], | ||
instruction: { | ||
"ui:field": "markdown", | ||
"ui:help": intl.formatMessage(messages.instructionDescription), | ||
"ui:previewNote": intl.formatMessage(messages.addMustachePreviewNote), | ||
}, | ||
} | ||
|
||
return uiSchemaFields | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.