Fixing bug in text box display.

This commit is contained in:
David Jay
2016-12-22 11:01:59 -08:00
parent 7c999e2cc8
commit 5e01fe4025
4 changed files with 9 additions and 14 deletions
+2 -2
View File
@@ -240,7 +240,7 @@ hr {
.coral-plugin-flags-popup-radio-label {
margin:5px;
font-weight: 700;
font-size: 1.16rem;
font-size: .9rem;
}
.coral-plugin-flags-popup-counter {
@@ -254,7 +254,7 @@ hr {
margin-top: 10px;
}
.coral-plugin-flags-other-text {
.coral-plugin-flags-reason-text {
margin-left: 20px;
margin-top: 5px;
width: 75%;
+1 -1
View File
@@ -18,7 +18,7 @@ const getPopupMenu = [
{val: 'other', text: lang.t('other')}
],
button: lang.t('continue'),
sets: 'detail'
sets: 'reason'
};
},
() => {
+5 -10
View File
@@ -40,7 +40,7 @@ class FlagButton extends Component {
// If itemType and reason are both set, post the action
if (itemType && reason && !posted) {
// Set the text from the "other" field if it exists.
let item_id;
switch(itemType) {
@@ -71,11 +71,6 @@ class FlagButton extends Component {
onPopupOptionClick = (sets) => (e) => {
// If the "other" option is clicked, show the other textbox
if(sets === 'reason' && e.target.value === 'other') {
this.setState({showOther: true});
}
// If flagging a user, indicate that this is referencing the username rather than the bio
if(sets === 'itemType' && e.target.value === 'user') {
this.setState({field: 'username'});
@@ -93,7 +88,7 @@ class FlagButton extends Component {
this.setState({[sets]: e.target.value});
}
onOtherTextChange = (e) => {
onNoteTextChange = (e) => {
this.setState({note: e.target.value});
}
@@ -147,11 +142,11 @@ class FlagButton extends Component {
<label htmlFor={'note'} className={`${name}-popup-radio-label`}>
{lang.t('flag-reason')}
</label><br/>
<textarea
className={`${name}-other-text`}
<textarea
className={`${name}-reason-text`}
id="note"
rows={4}
onChange={this.onOtherTextChange}
onChange={this.onNoteTextChange}
value={this.state.note}/>
</div>
}
+1 -1
View File
@@ -36,7 +36,7 @@ const getPopupMenu = [
header: lang.t('step-2-header'),
options,
button: lang.t('continue'),
sets: 'detail'
sets: 'reason'
};
},
() => {