Cancel btn in SelectionMap only in subscriptions. Added title
This commit is contained in:
parent
815bbb48fe
commit
2e09100bdc
2 changed files with 8 additions and 2 deletions
|
|
@ -242,6 +242,7 @@ class SelectionMap extends Component {
|
||||||
{ this.props.sndBtn && this.props.onSndBtn &&
|
{ this.props.sndBtn && this.props.onSndBtn &&
|
||||||
<Button
|
<Button
|
||||||
bsStyle="warning"
|
bsStyle="warning"
|
||||||
|
title={this.props.sndBtnTitle}
|
||||||
onClick={event => this.onSndBtn(event)}
|
onClick={event => this.onSndBtn(event)}
|
||||||
>
|
>
|
||||||
{this.props.sndBtn.match(/^fa-/) ? <i className={`fa ${this.props.sndBtn}`} /> : this.props.sndBtn }
|
{this.props.sndBtn.match(/^fa-/) ? <i className={`fa ${this.props.sndBtn}`} /> : this.props.sndBtn }
|
||||||
|
|
@ -266,7 +267,8 @@ class SelectionMap extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
SelectionMap.defaultProps = {
|
SelectionMap.defaultProps = {
|
||||||
zoom: 11
|
zoom: 11,
|
||||||
|
sndBtnTitle: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
SelectionMap.propTypes = {
|
SelectionMap.propTypes = {
|
||||||
|
|
@ -280,6 +282,7 @@ SelectionMap.propTypes = {
|
||||||
onFstBtn: PropTypes.func.isRequired,
|
onFstBtn: PropTypes.func.isRequired,
|
||||||
sndBtn: PropTypes.string,
|
sndBtn: PropTypes.string,
|
||||||
onSndBtn: PropTypes.func,
|
onSndBtn: PropTypes.func,
|
||||||
|
sndBtnTitle: PropTypes.string,
|
||||||
onRemove: PropTypes.func,
|
onRemove: PropTypes.func,
|
||||||
action: PropTypes.number.isRequired,
|
action: PropTypes.number.isRequired,
|
||||||
loadingSubs: PropTypes.bool.isRequired,
|
loadingSubs: PropTypes.bool.isRequired,
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import Gkeys from '/imports/startup/client/Gkeys';
|
||||||
import CenterInMyPosition from '/imports/ui/components/CenterInMyPosition/CenterInMyPosition';
|
import CenterInMyPosition from '/imports/ui/components/CenterInMyPosition/CenterInMyPosition';
|
||||||
import LocationAutocomplete from '/imports/ui/components/LocationAutocomplete/LocationAutocomplete';
|
import LocationAutocomplete from '/imports/ui/components/LocationAutocomplete/LocationAutocomplete';
|
||||||
import { isNotHomeAndMobile } from '/imports/ui/components/Utils/isMobile';
|
import { isNotHomeAndMobile } from '/imports/ui/components/Utils/isMobile';
|
||||||
|
import { isHome } from '/imports/ui/components/Utils/location';
|
||||||
|
|
||||||
class FireSubscription extends React.Component {
|
class FireSubscription extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
|
@ -104,8 +105,9 @@ class FireSubscription extends React.Component {
|
||||||
distance={this.state.distance}
|
distance={this.state.distance}
|
||||||
fstBtn={this.props.subsBtn}
|
fstBtn={this.props.subsBtn}
|
||||||
onFstBtn={state => this.onSubs(state)}
|
onFstBtn={state => this.onSubs(state)}
|
||||||
sndBtn="fa-times"
|
sndBtn={isHome() ? null : 'fa-times'}
|
||||||
onSndBtn={this.onCancel}
|
onSndBtn={this.onCancel}
|
||||||
|
sndBtnTitle={this.props.t('Cancelar')}
|
||||||
onSelection={state => this.onSelection(state)}
|
onSelection={state => this.onSelection(state)}
|
||||||
action={action.add}
|
action={action.add}
|
||||||
disableFstBtn={this.props.disableFstBtn}
|
disableFstBtn={this.props.disableFstBtn}
|
||||||
|
|
@ -116,6 +118,7 @@ class FireSubscription extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
FireSubscription.propTypes = {
|
FireSubscription.propTypes = {
|
||||||
|
t: PropTypes.func.isRequired,
|
||||||
center: PropTypes.arrayOf(PropTypes.number),
|
center: PropTypes.arrayOf(PropTypes.number),
|
||||||
zoom: PropTypes.number,
|
zoom: PropTypes.number,
|
||||||
distance: PropTypes.number,
|
distance: PropTypes.number,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue