Skip to content

Commit

Permalink
Item4688: Foswiki password, registration and login options should be …
Browse files Browse the repository at this point in the history
…correctly handled in the registration page, change password and reset password

This completes the ResetPassword and ChangePassword part.
Now continuing with ChangeEmailAddress


git-svn-id: http://svn.foswiki.org/trunk@8188 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
KennethLavrsen authored and KennethLavrsen committed Jul 15, 2010
1 parent e93f3ec commit 0d82094
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 18 deletions.
14 changes: 10 additions & 4 deletions TopicUserMappingContrib/data/System/ChangePassword.txt
@@ -1,8 +1,15 @@
%META:TOPICINFO{author="ProjectContributor" date="1252718741" format="1.1" version="$Rev$"}%
%META:TOPICPARENT{name="UserToolsCategory"}%
---+ %MAKETEXT{"Change Password"}%
%STARTINCLUDE%

%IF{
"context passwords_modifyable"
then="$percentINCLUDE{\"%TOPIC%\" section=\"changePassword\"}$percent"
else="<strong>%CHANGEPASSWORDDISABLEDMESSAGE%</strong>"
}%

<verbatim class="foswikiHidden">
%STARTSECTION{"changePassword"}%
*%MAKETEXT{"Forgotten your password?"}%* %MAKETEXT{"Use [_1] instead." args="ResetPassword"}%

<form name="manage" action="%SCRIPTURLPATH{"manage"}%/%SYSTEMWEB%/%HOMETOPIC%" method="post">
Expand Down Expand Up @@ -37,9 +44,8 @@
* %ICON{info}% %MAKETEXT{"If you have any questions, please contact [_1]" args="%WIKIWEBMASTER%"}%
* %ICON{info}% %MAKETEXT{"[_1] has a list of other Foswiki users" args="%USERSWEB%.%WIKIUSERSTOPIC%"}%
</div>

%STOPINCLUDE%

%ENDSECTION{"changePassword"}%
</verbatim>
---
*%MAKETEXT{"Related topics:"}%* ResetPassword, ChangeEmailAddress, UserToolsCategory, AdminToolsCategory

Expand Down
27 changes: 13 additions & 14 deletions TopicUserMappingContrib/data/System/ResetPassword.txt
@@ -1,35 +1,33 @@
%META:TOPICINFO{author="ProjectContributor" date="1111929255" format="1.0" version="$Rev$"}%
%META:TOPICPARENT{name="ChangePassword"}%
---+ %MAKETEXT{"Reset Password"}%
%STARTINCLUDE%
*%MAKETEXT{"Remember your password?"}%* %MAKETEXT{"Use [_1] instead." args="ChangePassword"}% %MAKETEXT{"Otherwise, use this form to get a new one e-mailed to you."}%

%IF{
"context passwords_modifyable"
then="$percentINCLUDE{\"%TOPIC%\" section=\"resetPassword\"}$percent"
else="<strong>%CHANGEPASSWORDDISABLEDMESSAGE%</strong>"
}%

<verbatim class="foswikiHidden">
%STARTSECTION{"resetPassword"}%
*%MAKETEXT{"Remember your password?"}%* %MAKETEXT{"Use [_1] instead." args="ChangePassword"}% %MAKETEXT{"Otherwise, use this form to get a new one e-mailed to you."}%

<form name="resetpasswd" action="%SCRIPTURLPATH{"resetpasswd"}%/%USERSWEB%/%HOMETOPIC%" method="post">
<div class="foswikiFormSteps">
<div class="foswikiFormStep">

%IF{
"context passwords_modifyable"
then="<strong>%MAKETEXT{"After submitting this form, you will receive an e-mail with your new, *system-generated* password, and a link to a page where you can change it."}%</strong>"
else="<strong>%MAKETEXT{"Sorry, the password system is currently read only, please contact [_1]" args="%WIKIWEBMASTER%"}%</strong>"
}%
<!--
* Set NOTMODIFYABLE = %IF{"context passwords_modifyable" then="" else="DISABLED"}%
-->
<strong>%MAKETEXT{"After submitting this form, you will receive an e-mail with your new, system-generated password, and a link to a page where you can change it."}%</strong>

%X% %MAKETEXT{"you *must* have at least one valid registered e-mail to be able to reset your password. If none of your registered e-mail addresses is valid, and you have forgotten your password, contact [_1]." args="%WIKIWEBMASTER%"}%
</div>
<div class="foswikiFormStep">
%TABLE{databg="transparent" tableborder="0" tablerules="none"}%
|%MAKETEXT{"Fields marked [_1] are required" args="=<font color='red'>**</font>="}% ||
| %MAKETEXT{"Your [_1].LoginName" args="%SYSTEMWEB%"}%: | <input %NOTMODIFYABLE% type="text" name="LoginName" value="%URLPARAM{username}%" size="40" class="foswikiInputField" /> =<font color="red">**</font>= |
| %MAKETEXT{"Your [_1].LoginName" args="%SYSTEMWEB%"}%: | <input type="text" name="LoginName" value="%URLPARAM{username}%" size="40" class="foswikiInputField" /> |
</div><!-- /foswikiFormStep-->
<div class="foswikiFormStep foswikiLast">
<input type="hidden" name="action" value="resetPassword">
<input type="hidden" name="TopicName" value="%TOPIC%" />
<input %NOTMODIFYABLE% type="submit" class="foswikiSubmit" value=" %MAKETEXT{"Reset password"}% " />
<input type="submit" class="foswikiSubmit" value=" %MAKETEXT{"Reset password"}% " />
</div><!-- /foswikiFormStep-->
</div><!-- /foswikiFormSteps-->
</form>
Expand All @@ -38,7 +36,8 @@
* %ICON{info}% %MAKETEXT{"[_1] has a list of other Foswiki users" args="%USERSWEB%.%WIKIUSERSTOPIC%"}%
* %ICON{info}% %MAKETEXT{"If you have any questions, please contact [_1]" args="%WIKIWEBMASTER%"}%
</div>
%STOPINCLUDE%
%ENDSECTION{"resetPassword"}%
</verbatim>

---
*%MAKETEXT{"Related topics:"}%* ChangePassword, ChangeEmailAddress, UserToolsCategory, AdminToolsCategory
Expand Down
5 changes: 5 additions & 0 deletions core/data/System/DefaultPreferences.txt
Expand Up @@ -180,6 +180,11 @@ Preference settings local to your site should be set in [[%LOCALSITEPREFS%]] (th
(for guest driven registration the RegistrationAgent's permissions are used, for logged in user registration of someone else, that user's permissions are used).
* #Set REGISTRATIONGROUPS =

---+++ Change of Password Message

* If password management is not handled by Foswiki this message will be displayed on %SYSTEMWEB%.ChangePassword and %SYSTEMWEB%.ResetPassword. Replace this generic text with a reference to how to change or reset password within your organisation.
* Set CHANGEPASSWORDDISABLEDMESSAGE = %MAKETEXT{"Resetting and setting password is not handled by Foswiki"}%

---+++ HTTP-<nop>EQUIV Settings

* %T% *NOTE:* Changing cache behaviour with these settings should not be necessary and may cause cache-related problems. These settings do not affect proxy caches.
Expand Down

0 comments on commit 0d82094

Please sign in to comment.