Added ability to change placeholder text, and make comment replies optional
This commit is contained in:
parent
f4d9ccaf08
commit
9369b56174
|
@ -100,14 +100,34 @@ const CommentWidget = props => {
|
|||
onDelete={props.onRemoveBody}
|
||||
onSaveAndClose={props.onSaveAndClose} />
|
||||
)}
|
||||
|
||||
{ !props.readOnly && props.annotation &&
|
||||
{ comments.length === 0 && !props.readOnly && props.disableReply && props.annotation &&
|
||||
<div className="r6o-widget comment editable">
|
||||
<TextEntryField
|
||||
focus={props.focus}
|
||||
content={draftReply.value}
|
||||
editable={true}
|
||||
placeholder={comments.length > 0 ? i18n.t('Add a reply...') : i18n.t('Add a comment...')}
|
||||
placeholder={props.textPlaceHolder || i18n.t('Add a comment...') }
|
||||
onChange={onEditReply}
|
||||
onSaveAndClose={() => props.onSaveAndClose()}
|
||||
/>
|
||||
{ props.purposeSelector && draftReply.value.length > 0 &&
|
||||
<PurposeSelect
|
||||
editable={true}
|
||||
content={draftReply.purpose}
|
||||
onChange={onChangeReplyPurpose}
|
||||
onSaveAndClose={() => props.onSaveAndClose()}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
{ !props.readOnly && !props.disableReply && props.annotation &&
|
||||
<div className="r6o-widget comment editable">
|
||||
<TextEntryField
|
||||
focus={props.focus}
|
||||
content={draftReply.value}
|
||||
editable={true}
|
||||
placeholder={comments.length > 0 ? i18n.t('Add a reply...') : (props.textPlaceHolder || i18n.t('Add a comment...'))}
|
||||
onChange={onEditReply}
|
||||
onSaveAndClose={() => props.onSaveAndClose()}
|
||||
/>
|
||||
|
|
|
@ -98,7 +98,7 @@ const TagWidget = props => {
|
|||
{!props.readOnly &&
|
||||
<Autocomplete
|
||||
focus={props.focus}
|
||||
placeholder={i18n.t('Add tag...')}
|
||||
placeholder={props.textPlaceHolder || i18n.t('Add tag...')}
|
||||
vocabulary={props.vocabulary || []}
|
||||
onChange={onDraftChange}
|
||||
onSubmit={onSubmit}/>
|
||||
|
|
Loading…
Reference in New Issue