Move Save button to top of edit view
This commit is contained in:
parent
d408978165
commit
8eb0923098
@ -211,7 +211,6 @@ const withCopyEdit = (WrappedComponent) => {
|
||||
action={`/edit/${this.props.slug}/${this.props.building.building_id}`}
|
||||
method="POST"
|
||||
onSubmit={this.handleSubmit}>
|
||||
<ErrorBox msg={this.state.error} />
|
||||
{
|
||||
(this.props.inactive) ?
|
||||
<InfoBox
|
||||
@ -219,6 +218,24 @@ const withCopyEdit = (WrappedComponent) => {
|
||||
/>
|
||||
: null
|
||||
}
|
||||
{
|
||||
(this.props.mode === 'edit' && !this.props.inactive) ?
|
||||
<Fragment>
|
||||
<ErrorBox msg={this.state.error} />
|
||||
{
|
||||
this.props.slug === 'like' ? // special-case for likes
|
||||
null :
|
||||
<div className="buttons-container with-space">
|
||||
<button
|
||||
type="submit"
|
||||
className="btn btn-primary">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
</Fragment>
|
||||
: null
|
||||
}
|
||||
<WrappedComponent
|
||||
building={this.state.building}
|
||||
building_like={this.props.building_like}
|
||||
@ -229,23 +246,6 @@ const withCopyEdit = (WrappedComponent) => {
|
||||
onLike={this.handleLike}
|
||||
onUpdate={this.handleUpdate}
|
||||
/>
|
||||
{
|
||||
(this.props.mode === 'edit' && !this.props.inactive) ?
|
||||
<Fragment>
|
||||
{
|
||||
this.props.slug === 'like' ? // special-case for likes
|
||||
null :
|
||||
<div className="buttons-container">
|
||||
<button
|
||||
type="submit"
|
||||
className="btn btn-primary">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
</Fragment>
|
||||
: null
|
||||
}
|
||||
</form>
|
||||
:
|
||||
<form>
|
||||
|
@ -28,7 +28,7 @@ label {
|
||||
}
|
||||
.buttons-container.with-space {
|
||||
margin-top: 1rem;
|
||||
padding: 0 0.75rem;
|
||||
/* padding: 0 0.75rem; */
|
||||
}
|
||||
.buttons-container .btn {
|
||||
margin-bottom: 0.25rem;
|
||||
|
Loading…
Reference in New Issue
Block a user