Skip to content

Commit dd5e443

Browse files
MichelGabrieljosegar74
authored andcommitted
Improve the recover password functions
1 parent 50a084d commit dd5e443

File tree

2 files changed

+9
-25
lines changed

2 files changed

+9
-25
lines changed

web-ui/src/main/resources/catalog/js/LoginController.js

+7
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@
9595
$scope.sendPassword = value;
9696
$('#username').focus();
9797
};
98+
99+
var showForgotPassword = gnUtilityService.getUrlParameter('showforgotpassword');
100+
101+
if ((showForgotPassword) && (showForgotPassword === 'true')) {
102+
$scope.setSendPassword(true);
103+
}
104+
98105
/**
99106
* Register user. An email will be sent to the new
100107
* user and another to the catalog admin if a profile

web-ui/src/main/resources/catalog/templates/top-toolbar-accessible.html

+2-25
Original file line numberDiff line numberDiff line change
@@ -271,36 +271,13 @@
271271
<a class="btn btn-default" href="new.account" data-translate="">createAnAccount</a>
272272
</li>
273273
<li role="separator" class="divider hidden-xs" data-ng-show="isHostDefined()"></li>
274-
<li data-ng-show="isHostDefined()">
274+
<li data-ng-show="isHostDefined()" class="gn-margin-bottom">
275275
<!-- forgot password -->
276276
<b data-translate="">forgetDetails</b>
277-
<!-- <span data-ng-show="sendPassword === false">-->
278277
<span>
279278
<p data-translate="">forgetDetailsInfo</p>
280-
<button type="submit" class="btn btn-default btn-block" data-ng-click="setSendPassword(true)">
281-
<span data-translate="">recoverPassword</span>
282-
</button>
279+
<a class="btn btn-default btn-block" href="catalog.signin?showforgotpassword=true" data-translate="">recoverPassword</a>
283280
</span>
284-
285-
<div data-ng-show="sendPassword === true">
286-
<form class="form-horizontal" id="userinfo" name="gnUserinfo">
287-
<input type="hidden" name="_csrf" value="{{csrf}}"/>
288-
<div class="form-group">
289-
<label data-translate="">username</label>
290-
<input type="text" name="username" id="username"
291-
aria-label="{{'username' | translate}}"
292-
data-ng-model="usernameToRemind"
293-
data-ng-required="" class="form-control"/>
294-
</div>
295-
<button type="submit"
296-
class="btn btn-default btn-block"
297-
data-ng-disabled="usernameToRemind == ''"
298-
data-ng-click="remindMyPassword('#userinfo')">
299-
<i class="fa fa-question-sign"/>
300-
<span data-translate="">sendPasswordLinkToMyEmail</span>
301-
</button>
302-
</form>
303-
</div>
304281
</li>
305282
</ul>
306283
</li>

0 commit comments

Comments
 (0)