homeflowjs 1.0.65 → 1.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -93,7 +93,33 @@ export default class DraggableMap {
|
|
93
93
|
// is a design feature
|
94
94
|
this.initControlsMobile();
|
95
95
|
}
|
96
|
-
|
96
|
+
|
97
|
+
if (this.noLocationfound) {
|
98
|
+
/**
|
99
|
+
* If no location is found but if properties
|
100
|
+
* are found (i.e search without a location)
|
101
|
+
* run the setToMarkeredBounds
|
102
|
+
*/
|
103
|
+
const properties = this.getProperties();
|
104
|
+
if(properties) this.setToMarkeredBounds();
|
105
|
+
|
106
|
+
/**
|
107
|
+
* If no location and properties are found, the setToMarkeredBounds
|
108
|
+
* will return null as it can't find any bounds. In turn
|
109
|
+
* this causes the map to error because it can't set a center point.
|
110
|
+
* If this is case, we need to grab the last center point and zoom
|
111
|
+
* from the last drag event and use that to set the map view.
|
112
|
+
*
|
113
|
+
* (properties are not found if the map
|
114
|
+
* re-renders because of a parent component and
|
115
|
+
* the user has dragged out of site of any properties)
|
116
|
+
*/
|
117
|
+
const lastDragEvent = Homeflow.get('last_map_drag_event');
|
118
|
+
if(!properties) {
|
119
|
+
this.map.setView(lastDragEvent.center, lastDragEvent.zoom);
|
120
|
+
}
|
121
|
+
}
|
122
|
+
|
97
123
|
if (Homeflow.get('custom_map_zoom')) {
|
98
124
|
this.map.setZoom(Homeflow.get('custom_map_zoom'));
|
99
125
|
}
|
@@ -508,6 +534,14 @@ export default class DraggableMap {
|
|
508
534
|
// no drag allowed.
|
509
535
|
if (Homeflow.get('disable_draggable_map') || this.drawableMapInitialized) return;
|
510
536
|
|
537
|
+
// Acts as a fallback in the init if the map is re-rendered without any properties
|
538
|
+
const center = this.map.getCenter();
|
539
|
+
const zoom = this.map.getZoom();
|
540
|
+
Homeflow.set('last_map_drag_event', {
|
541
|
+
center,
|
542
|
+
zoom
|
543
|
+
})
|
544
|
+
|
511
545
|
// drag map but no fetching properties within the new boundaries.
|
512
546
|
if(this.dragWithoutUpdate) return null;
|
513
547
|
|
@@ -70,11 +70,47 @@
|
|
70
70
|
margin: 0 auto;
|
71
71
|
}
|
72
72
|
|
73
|
+
&__checkbox-group {
|
74
|
+
font-size: 12px;
|
75
|
+
width: 100%;
|
76
|
+
|
77
|
+
@media (min-width: 700px) {
|
78
|
+
width: 30rem;
|
79
|
+
}
|
80
|
+
|
81
|
+
.input-group {
|
82
|
+
display: flex;
|
83
|
+
align-items: flex-start;
|
84
|
+
margin-bottom: 1rem;
|
85
|
+
|
86
|
+
// Overriding the input and label components here for checkbox input and labels.
|
87
|
+
.checkbox-input {
|
88
|
+
height: 10px;
|
89
|
+
width: 10px;
|
90
|
+
}
|
91
|
+
|
92
|
+
.checkbox-label {
|
93
|
+
text-align: left;
|
94
|
+
margin-left: .5rem;
|
95
|
+
&:before {
|
96
|
+
display: none;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
.register-button {
|
103
|
+
@media (min-width: 700px) {
|
104
|
+
margin-right: 100%;
|
105
|
+
margin-bottom: 1rem;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
73
109
|
&__submit {
|
74
110
|
padding: 8px 20px;
|
75
111
|
margin-top: 10px;
|
76
112
|
border-radius: 0;
|
77
|
-
border: solid 1px gray
|
113
|
+
border: solid 1px gray;
|
78
114
|
}
|
79
115
|
|
80
116
|
&__forgot-link {
|
@@ -40,9 +40,54 @@ const RegisterForm = ({ localUser, registering }) => (
|
|
40
40
|
<UserInput name="password_confirmation" required />
|
41
41
|
<label htmlFor="user-input-password_confirmation" className={localUser.password_confirmation ? 'shrink' : ''}>Confirm password</label>
|
42
42
|
</div>
|
43
|
-
|
43
|
+
<div className='profile-register-form__checkbox-group'>
|
44
|
+
<div className='input-group'>
|
45
|
+
<UserInput
|
46
|
+
name="opt_in_marketing_url"
|
47
|
+
unmappedValue={window.location.href}
|
48
|
+
type="checkbox"
|
49
|
+
className="checkbox-input"
|
50
|
+
/>
|
51
|
+
<label htmlFor="opt_in_marketing_url" className='checkbox-label'>
|
52
|
+
Get emails with the latest news and information on the local property market,
|
53
|
+
our products and services. You can unsubscribe at any time.
|
54
|
+
</label>
|
55
|
+
</div>
|
56
|
+
<div className='input-group'>
|
57
|
+
<UserInput
|
58
|
+
name="create_account"
|
59
|
+
type="checkbox"
|
60
|
+
className="checkbox-input"
|
61
|
+
/>
|
62
|
+
<label htmlFor="create_account" className='checkbox-label'>
|
63
|
+
Create an account to view your saved properties and searches and keep
|
64
|
+
your personal details up-to-date.
|
65
|
+
</label>
|
66
|
+
</div>
|
67
|
+
<div className='input-group'>
|
68
|
+
<UserInput
|
69
|
+
name="terms-links"
|
70
|
+
type="checkbox"
|
71
|
+
className="checkbox-input"
|
72
|
+
required
|
73
|
+
/>
|
74
|
+
<label htmlFor="terms-links" className='checkbox-label'>
|
75
|
+
I have read and agree to the
|
76
|
+
{' '}
|
77
|
+
<a href="/pages/terms-of-use">Terms and Conditions</a>
|
78
|
+
,
|
79
|
+
{' '}
|
80
|
+
<a href="/pages/privacy-policy">Privacy Policy</a>
|
81
|
+
{' '}
|
82
|
+
and
|
83
|
+
{' '}
|
84
|
+
<a href="/pages/cookies">Cookies Policy</a>
|
85
|
+
.
|
86
|
+
</label>
|
87
|
+
</div>
|
88
|
+
</div>
|
44
89
|
<button
|
45
|
-
className="profile-register-form__submit"
|
90
|
+
className="profile-register-form__submit register-button"
|
46
91
|
role="button"
|
47
92
|
type="submit"
|
48
93
|
disabled={registering}
|