%TMPL:INCLUDE{"view"}%

%TMPL:DEF{"title"}%%HTMLTITLE{"%MAKETEXT{"Change password"}%" separator=" %IF{"defined 'HTMLTITLESEP'" then="%HTMLTITLESEP%" else="-"}% "}%%TMPL:END%

%TMPL:DEF{"DIScontentheader"}%%TMPL:END%
%TMPL:DEF{"topicactions"}%%TMPL:END%
%TMPL:DEF{"revinfo"}%%TMPL:END%
%TMPL:DEF{"newtopictitle"}%%URLPARAM{"newtopictitle"}%%TMPL:END%
%TMPL:DEF{"newtopic"}%%URLPARAM{"newtopic"}%%TMPL:END%

%TMPL:DEF{"content"}%%IF{"context PluggableAuthEnabled or passwords_modifyable"
  then="$percntTMPL:P{\"changepasswordform\"}$percnt"
  else="$percntTMPL:P{\"nochangepassword\"}$percnt"
}%%TMPL:END%

%TMPL:DEF{"sidebar"}%%TMPL:P{"sidebar::usertools"}%%TMPL:END%

%TMPL:DEF{"nochangepassword"}%<div class="foswikiErrorMessage">
%MAKETEXT{"Sorry, passwords can't be changed."}%
</div>%TMPL:END%

%TMPL:DEF{"changepasswordform"}%<noautolink>
%TMPL:P{"formtitle"}%
%TMPL:P{"formstartstep"}%
%TMPL:P{context="isadmin" then="loginstep::admin"}%
%TMPL:P{"oldpasswordstep"}%
%TMPL:P{"newpasswordstep"}%
%TMPL:P{"formbuttons"}%
%TMPL:P{"formendstep"}%
%TMPL:P{"formvalidation"}%
</noautolink>%TMPL:END%

%TMPL:DEF{"formtitle"}%<h1 >%MAKETEXT{"Change password"}%</h1>%TMPL:END%

%TMPL:DEF{"formbuttons"}%<hr /><div class="foswikiFormStep">
%BUTTON{
  "%MAKETEXT{"OK"}%" 
  %IF{"not context passwords_modifyable" then="disabled=\"on\""}% 
  type="submit" 
  icon="fa-check"
}%
%BUTTON{
  "%MAKETEXT{"Cancel"}%"
  icon="fa-times"
  target="%USERSWEB%.%HOMETOPIC%"
}%
</div>%TMPL:END%

%TMPL:DEF{"formstartstep"}%
%TMPL:P{"formstart::%IF{"context PluggableAuthEnabled"
  then="pauth"
  else="%IF{"context PasswordManagementPluginEnabled"
    then="default"
    else="legacy"
  }%"
}%"}%
<div class="foswikiFormSteps">
%TMPL:END%

%TMPL:DEF{"formstart::pauth"}%%JQREQUIRE{"ajaxform"}%
<form class="jqAjaxForm jqValidate" name="changePasswordForm" id="changePasswordForm" action="%SCRIPTURLPATH{"jsonrpc"}%/PluggableAuth/changePassword" method="post" autocomplete="off" data-min-length="%QUERY{"{MinPasswordLength}"}%" data-message="%TRANSLATE{"Changing ..."}%">
%TMPL:P{"messages"}%
<input type="hidden" name="topic" value="%WEB%.%TOPIC%" />
%TMPL:END%

%TMPL:DEF{"formstart::default"}%
<form name="changePasswordForm" id="changePasswordForm" action="%SCRIPTURLPATH{"rest"}%/PasswordManagementPlugin/changePassword" method="post" autocomplete="off" data-min-length="%QUERY{"{MinPasswordLength}"}%">
%TMPL:P{"messages"}%
<input type="hidden" name="topic" value="%WEB%.%TOPIC%" />
%TMPL:END%

%TMPL:DEF{"formstart::legacy"}%
<form name="changePasswordForm" id="changePasswordForm" action="%SCRIPTURLPATH{"manage"}%/%SYSTEMWEB%/%HOMETOPIC%" method="post" autocomplete="off" data-min-length="%QUERY{"{MinPasswordLength}"}%">
%TMPL:P{"messages"}%
<input type="hidden" name="action" value="changePassword" />
<input type="hidden" name="TopicName" value="%TOPIC%" />
%TMPL:END%

%TMPL:DEF{"messages"}%<script id="messages" type="application/json"> {
  oldpassword: {
    required: '%MAKETEXT{"Enter your current password"}%'
  },
  password: {
    "required": "%MAKETEXT{"Enter a new password"}%",
    "minlength": $.validator.format("%MAKETEXT{"Please enter at least [_1] characters" args="{0}"}%"),
    "pwcheck_digits": "%MAKETEXT{"Please use at least one digit"}%",
    "pwcheck_upper": "%MAKETEXT{"Please use upper case characters"}%",
    "pwcheck_lower": "%MAKETEXT{"Please use lower case characters"}%",
    "pwcheck_special": "%MAKETEXT{"Please add at least one special character"}%"
  },
  passwordA: {
    required: '%MAKETEXT{"Repeat your new password"}%',
    equalTo: '%MAKETEXT{"Enter the same password as above"}%'
  }
}</script>%TMPL:END%

%TMPL:DEF{"formendstep"}%</div>%TMPL:P{"formend"}%%TMPL:END%

%TMPL:DEF{"formend"}%</form>

%MAKETEXT{"If you have any questions, please contact [_1]" args="%WIKIWEBMASTER%"}%
<div class="foswikiErrorMessage" id="summary" style="display:none"></div>
%TMPL:END%

%TMPL:DEF{"loginstep::admin"}%<div class="foswikiFormStep">
  <h3 >%MAKETEXT{"Username"}%:</h3>
  <input type="text" name="%IF{"context PluggableAuthEnabled" then="uid" else="username"}%" id="username" value="%URLPARAM{"username" default="%USERNAME%"}%" size="40" class="foswikiInputField" />
  <div class="foswikiFormDescription">
    %MAKETEXT{"Your login name. Note, you can't change your login name. Contact the administrator to do this for you."}%
  </div>
</div>%TMPL:END%

%TMPL:DEF{"oldpasswordstep"}%%IF{"(not context PasswordManagementPluginEnabled or '%SESSION_VARIABLE{"FOSWIKI_PASSWORDRESET"}%' != '1') and not context isadmin"
  then="$percntTMPL:P{\"oldpasswordstep::impl\"}$percnt"
}%%TMPL:END%
%TMPL:DEF{"oldpasswordstep::impl"}%<div class="foswikiFormStep">
  <h3 >%MAKETEXT{"Current password"}%:</h3>
  <input type="password" name="oldpassword" id="oldpassword" value="%URLPARAM{oldpassword}%" size="40" class="foswikiInputField" autocomplete="new-password" />
  <div class="foswikiFormDescription">
    %MAKETEXT{"Enter the current password for the given !LoginName."}%
  </div>
</div>%TMPL:END%

%TMPL:DEF{"newpasswordstep"}%<div class="foswikiFormStep">
  <h3 >%MAKETEXT{"New password"}%:</h3>
  <input type="password" name="password" id="password" size="40" class="foswikiInputField" autocomplete="new-password" />
  %BUTTON{"%MAKETEXT{"Random password"}%" class="jqPasswordGenerator" %TMPL:P{"password::params"}% data_target="#password" style="margin-left:1em;" icon="fa-random" }% 
  <div class="foswikiFormDescription">
    %MAKETEXT{"Enter a new password. Please don't use a trivial password that could easily be guessed."}%
  </div>
</div>
<div class="foswikiFormStep">
  <h3 >%MAKETEXT{"Retype new password"}%:</h3>
  <input type="password" name="passwordA" id="passwordA" size="40" class="foswikiInputField" autocomplete="new-password" />
</div>%TMPL:END%

%TMPL:DEF{"password::params"}%data_length="20" data_capitals="true" data_numbers="true" data_duplicates="true"%TMPL:END%

%TMPL:DEF{"formvalidation"}%%JQREQUIRE{"validate, PasswordGenerator"}%%ADDTOZONE{"script"
  requires="JQUERYPLUGIN::VALIDATE"
  id="NATSKIN::VALIDATE::CHANGEPASSWORD"
  text="<script src='%PUBURLPATH%/%SYSTEMWEB%/NatSkin/build/changepassword.js'></script>"
}%%TMPL:END%
Kontakt
Pädagogische Hochschule Schwyz
Zaystrasse 42
CH-6410 Goldau
T +41 41 859 05 90
info@phsz.ch Dies ist ein Wiki des Fachkerns Medien und Informatik der Pädagogischen Hochschule Schwyz. Für Fragen wenden Sie sich bitte an wikiadmin@phsz.ch
This page was cached on 31 Jan 2025 - 14:50.
This website is using cookies. More info. That's Fine