Save button in Segments moved below rules (as per #511).
This commit is contained in:
parent
557ee83705
commit
6eead89fef
2 changed files with 17 additions and 16 deletions
1
client/src/lib/bootstrap-components.js
vendored
1
client/src/lib/bootstrap-components.js
vendored
|
@ -67,7 +67,6 @@ class Icon extends Component {
|
|||
@withComponentMixins([
|
||||
withErrorHandling
|
||||
])
|
||||
|
||||
class Button extends Component {
|
||||
static propTypes = {
|
||||
onClickAsync: PropTypes.func,
|
||||
|
|
|
@ -355,19 +355,6 @@ export default class CUD extends Component {
|
|||
<Title>{isEdit ? t('editSegment') : t('createSegment')}</Title>
|
||||
|
||||
<Form stateOwner={this} onSubmitAsync={::this.submitAndLeave}>
|
||||
{isEdit ?
|
||||
<ButtonRow format="wide" className={`col-xs-12 ${styles.toolbar}`}>
|
||||
<FormButton type="submit" className="btn-primary" icon="check" label={t('saveAndStay')} onClickAsync={::this.submitAndStay}/>
|
||||
<FormButton type="submit" className="btn-primary" icon="check" label={t('saveAndLeave')}/>
|
||||
|
||||
<NavButton className="btn-danger" icon="trash-alt" label={t('delete')} linkTo={`/lists/${this.props.list.id}/segments/${this.props.entity.id}/delete`}/>
|
||||
</ButtonRow>
|
||||
:
|
||||
<ButtonRow format="wide" className={`col-xs-12 ${styles.toolbar}`}>
|
||||
<FormButton type="submit" className="btn-primary" icon="check" label={t('save')}/>
|
||||
</ButtonRow>
|
||||
}
|
||||
|
||||
<h3>{t('segmentOptions')}</h3>
|
||||
|
||||
<InputField id="name" label={t('name')} />
|
||||
|
@ -380,8 +367,8 @@ export default class CUD extends Component {
|
|||
<div className={styles.leftPane}>
|
||||
<div className={styles.leftPaneInner}>
|
||||
<Toolbar>
|
||||
<Button className="btn-primary" label={t('addCompositeRule')} onClickAsync={::this.addCompositeRule}/>
|
||||
<Button className="btn-primary" label={t('addRule')} onClickAsync={::this.addPrimitiveRule}/>
|
||||
<Button className="btn-secondary" label={t('addCompositeRule')} onClickAsync={::this.addCompositeRule}/>
|
||||
<Button className="btn-secondary" label={t('addRule')} onClickAsync={::this.addPrimitiveRule}/>
|
||||
</Toolbar>
|
||||
|
||||
<h3>{t('rules')}</h3>
|
||||
|
@ -418,6 +405,21 @@ export default class CUD extends Component {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
{isEdit ?
|
||||
<ButtonRow format="wide" className={`col-xs-12 ${styles.toolbar}`}>
|
||||
<Button type="submit" className="btn-primary" icon="check" label={t('saveAndStay')} onClickAsync={::this.submitAndStay}/>
|
||||
<Button type="submit" className="btn-primary" icon="check" label={t('saveAndLeave')} onClickAsync={::this.submitAndLeave}/>
|
||||
|
||||
<NavButton className="btn-danger" icon="trash-alt" label={t('delete')} linkTo={`/lists/${this.props.list.id}/segments/${this.props.entity.id}/delete`}/>
|
||||
</ButtonRow>
|
||||
:
|
||||
<ButtonRow format="wide" className={`col-xs-12 ${styles.toolbar}`}>
|
||||
<Button type="submit" className="btn-primary" icon="check" label={t('save')} onClickAsync={::this.submitAndLeave}/>
|
||||
</ButtonRow>
|
||||
}
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue