| Line 27... |
Line 27... |
| 27 |
</div>
|
27 |
</div>
|
| 28 |
|
28 |
|
| 29 |
<div id="partnerBlock" style="display:none;">
|
29 |
<div id="partnerBlock" style="display:none;">
|
| 30 |
<label>Partner Name</label>
|
30 |
<label>Partner Name</label>
|
| 31 |
<div class="form-group">
|
31 |
<div class="form-group">
|
| 32 |
<input type="text" class="typeahead form-control" placeholder="Search Partner" id="typeaheadpartner" name="partner" data-provide="typeahead" autocomplete="off">
|
32 |
<input type="text" class="typeahead form-control" placeholder="Search Partner by name" id="typeaheadpartner" name="partner" data-provide="typeahead" autocomplete="off">
|
| 33 |
<input type="hidden" id="retailerId" value="0">
|
33 |
<input type="hidden" id="retailerId" value="0">
|
| 34 |
<small id="selectedPartnerLabel" style="color:#22c55e;"></small>
|
34 |
<small id="selectedPartnerLabel" style="color:#22c55e;"></small>
|
| 35 |
</div>
|
35 |
</div>
|
| - |
|
36 |
<label>Or Store Code / Retailer ID</label>
|
| - |
|
37 |
<div class="form-group">
|
| - |
|
38 |
<input type="text" class="form-control" placeholder="e.g. HRKN025 or 175135707" id="partnerKey" autocomplete="off">
|
| - |
|
39 |
<small style="color:#94a3b8;">Used only if no partner is picked above.</small>
|
| - |
|
40 |
</div>
|
| 36 |
</div>
|
41 |
</div>
|
| 37 |
|
42 |
|
| 38 |
<label>New Password</label>
|
43 |
<label>New Password</label>
|
| 39 |
<div class="form-group pass_show">
|
44 |
<div class="form-group pass_show">
|
| 40 |
<input type="password" class="form-control" placeholder="New Password" id="newPassword">
|
45 |
<input type="password" class="form-control" placeholder="New Password" id="newPassword">
|
| Line 100... |
Line 105... |
| 100 |
}
|
105 |
}
|
| 101 |
|
106 |
|
| 102 |
var params = {"type": type, "newPassword": newPassword};
|
107 |
var params = {"type": type, "newPassword": newPassword};
|
| 103 |
if (type === 'PARTNER') {
|
108 |
if (type === 'PARTNER') {
|
| 104 |
var retailerId = $('#retailerId').val();
|
109 |
var retailerId = $('#retailerId').val();
|
| - |
|
110 |
var partnerKey = ($('#partnerKey').val() || '').trim();
|
| 105 |
if (!retailerId || retailerId === '0') {
|
111 |
if ((!retailerId || retailerId === '0') && !partnerKey) {
|
| 106 |
alert('Please select a partner from the suggestions');
|
112 |
alert('Pick a partner from suggestions, or enter a Store Code / Retailer ID');
|
| 107 |
return;
|
113 |
return;
|
| 108 |
}
|
114 |
}
|
| - |
|
115 |
if (retailerId && retailerId !== '0') {
|
| 109 |
params.retailerId = retailerId;
|
116 |
params.retailerId = retailerId;
|
| - |
|
117 |
} else {
|
| - |
|
118 |
params.partnerKey = partnerKey;
|
| - |
|
119 |
}
|
| 110 |
} else {
|
120 |
} else {
|
| 111 |
var identifier = $('#identifier').val();
|
121 |
var identifier = $('#identifier').val();
|
| 112 |
if (!identifier) {
|
122 |
if (!identifier) {
|
| 113 |
alert('Please enter an email or mobile');
|
123 |
alert('Please enter an email or mobile');
|
| 114 |
return;
|
124 |
return;
|