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 &&
|
||||
<Button
|
||||
bsStyle="warning"
|
||||
title={this.props.sndBtnTitle}
|
||||
onClick={event => this.onSndBtn(event)}
|
||||
>
|
||||
{this.props.sndBtn.match(/^fa-/) ? <i className={`fa ${this.props.sndBtn}`} /> : this.props.sndBtn }
|
||||
|
|
@ -266,7 +267,8 @@ class SelectionMap extends Component {
|
|||
}
|
||||
|
||||
SelectionMap.defaultProps = {
|
||||
zoom: 11
|
||||
zoom: 11,
|
||||
sndBtnTitle: ''
|
||||
};
|
||||
|
||||
SelectionMap.propTypes = {
|
||||
|
|
@ -280,6 +282,7 @@ SelectionMap.propTypes = {
|
|||
onFstBtn: PropTypes.func.isRequired,
|
||||
sndBtn: PropTypes.string,
|
||||
onSndBtn: PropTypes.func,
|
||||
sndBtnTitle: PropTypes.string,
|
||||
onRemove: PropTypes.func,
|
||||
action: PropTypes.number.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 LocationAutocomplete from '/imports/ui/components/LocationAutocomplete/LocationAutocomplete';
|
||||
import { isNotHomeAndMobile } from '/imports/ui/components/Utils/isMobile';
|
||||
import { isHome } from '/imports/ui/components/Utils/location';
|
||||
|
||||
class FireSubscription extends React.Component {
|
||||
constructor(props) {
|
||||
|
|
@ -104,8 +105,9 @@ class FireSubscription extends React.Component {
|
|||
distance={this.state.distance}
|
||||
fstBtn={this.props.subsBtn}
|
||||
onFstBtn={state => this.onSubs(state)}
|
||||
sndBtn="fa-times"
|
||||
sndBtn={isHome() ? null : 'fa-times'}
|
||||
onSndBtn={this.onCancel}
|
||||
sndBtnTitle={this.props.t('Cancelar')}
|
||||
onSelection={state => this.onSelection(state)}
|
||||
action={action.add}
|
||||
disableFstBtn={this.props.disableFstBtn}
|
||||
|
|
@ -116,6 +118,7 @@ class FireSubscription extends React.Component {
|
|||
}
|
||||
|
||||
FireSubscription.propTypes = {
|
||||
t: PropTypes.func.isRequired,
|
||||
center: PropTypes.arrayOf(PropTypes.number),
|
||||
zoom: PropTypes.number,
|
||||
distance: PropTypes.number,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue