Changes for page Registration
Last modified by teamwire004 on 2025/04/01 07:23
From version 3.1
edited by teamwire004
on 2024/07/12 13:06
on 2024/07/12 13:06
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-administration-ui/15.10.10]
To version 2.1
edited by teamwire004
on 2024/01/16 09:32
on 2024/01/16 09:32
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-administration-ui/14.10.13]
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Class properties (2 modified, 2 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -18,8 +18,8 @@ 18 18 ## If this document is changed such that it must have programming permission in order to run, change this to false. 19 19 #set($sandbox = true) 20 20 ## 21 - # set($registrationConfig=$NULL)22 - # _loadConfig($registrationConfig)21 + ## Load the configuration from a seperate document. 22 + #loadConfig('XWiki.RegistrationConfig') 23 23 ## 24 24 #* 25 25 * You may include this document in other documents using {{include reference="XWiki.Registration"/}} ... ... @@ -125,8 +125,7 @@ 125 125 'label' : $services.localization.render('core.register.firstName'), 126 126 'params' : { 127 127 'type' : 'text', 128 - 'size' : '60', 129 - 'autocomplete' : 'given-name' 128 + 'size' : '60' 130 130 } 131 131 }) 132 132 #set($discard = $fields.add($field)) ... ... @@ -137,8 +137,7 @@ 137 137 'label' : $services.localization.render('core.register.lastName'), 138 138 'params' : { 139 139 'type' : 'text', 140 - 'size' : '60', 141 - 'autocomplete' : 'family-name' 139 + 'size' : '60' 142 142 } 143 143 }) 144 144 #set($discard = $fields.add($field)) ... ... @@ -150,8 +150,7 @@ 150 150 'params' : { 151 151 'type' : 'text', 152 152 'onfocus' : 'prepareName(document.forms.register);', 153 - 'size' : '60', 154 - 'autocomplete' : 'username' 151 + 'size' : '60' 155 155 }, 156 156 'validate' : { 157 157 'mandatory' : { ... ... @@ -174,7 +174,7 @@ 174 174 ## 175 175 ##The password field, mandatory and must be at least 6 characters long. 176 176 ##The confirm password field, mandatory, must match password field, and must also be 6+ characters long. 177 - #definePasswordFields($fields, 'register_password', 'register2_password', $ registrationConfig.passwordOptions)174 + #definePasswordFields($fields, 'register_password', 'register2_password', $passwordOptions) 178 178 ## 179 179 ## The email address field, regex checked with an email pattern. Mandatory if registration uses email verification 180 180 #set($field = ... ... @@ -182,8 +182,7 @@ 182 182 'label' : $services.localization.render('core.register.email'), 183 183 'params' : { 184 184 'type' : 'text', 185 - 'size' : '60', 186 - 'autocomplete' : 'email' 182 + 'size' : '60' 187 187 }, 188 188 'validate' : { 189 189 'regex' : { ... ... @@ -192,7 +192,7 @@ 192 192 } 193 193 } 194 194 }) 195 - #if($ registrationConfig.useEmailVerification)191 + #if($xwiki.getXWikiPreferenceAsInt('use_email_verification', 0) == 1) 196 196 #set($field.validate.mandatory = {'failureMessage' : $services.localization.render('core.validation.required.message')}) 197 197 #end 198 198 #set($discard = $fields.add($field)) ... ... @@ -238,7 +238,7 @@ 238 238 #if($services.captcha 239 239 && !$invited 240 240 && $xcontext.getUser() == "XWiki.XWikiGuest" 241 - && $re gistrationConfig.requireCaptcha)237 + && $requireCaptcha) 242 242 ## The CAPTCHA field, programmatically checked to make sure the CAPTCHA is right. 243 243 ## Not checked by javascript because javascript can't check the CAPTCHA and the Ok message because it passes the 244 244 ## mandatory test is misleading. ... ... @@ -299,7 +299,7 @@ 299 299 #end 300 300 ## 301 301 ## Display the heading 302 - $ registrationConfig.heading298 + $heading 303 303 ## If the submit button has been pressed, then we test the input and maybe create the user. 304 304 #if($request.getParameter('xwikiname')) 305 305 ## Do server side validation of input fields. ... ... @@ -313,7 +313,7 @@ 313 313 ## If the registration was not successful or if the user hasn't submitted the info yet 314 314 ## Then we display the registration form. 315 315 #if(!$registrationDone) 316 - $ registrationConfig.welcomeMessage312 + $welcomeMessage 317 317 318 318 {{html clean="false"}} 319 319 <form id="register" action="$xwiki.relativeRequestURL" method="post" class="xform half"> ... ... @@ -381,9 +381,6 @@ 381 381 {{translation key="core.register.userAlreadyExists"/}} 382 382 #elseif($reg == -4) 383 383 {{translation key="core.register.invalidUsername"/}} 384 - #elseif ($reg == -9) 385 - {{translation key="core.register.invalidCaptcha"/}} 386 - ## Note that -10 is reserved already (see api.XWiki#createUser) 387 387 #elseif($reg == -11) 388 388 {{translation key="core.register.mailSenderWronglyConfigured"/}} 389 389 #else ... ... @@ -411,16 +411,16 @@ 411 411 #if("$!request.getParameter($redirectParam)" != '') 412 412 #set($redirect = $request.getParameter($redirectParam)) 413 413 #else 414 - #set($redirect = $ registrationConfig.defaultRedirect)407 + #set($redirect = $defaultRedirect) 415 415 #end 416 416 ## Display a "registration successful" message 417 417 418 - #evaluate($registration Config.registrationSuccessMessage)411 + #evaluate($registrationSuccessMessage) 419 419 420 420 ## Empty line prevents message from being forced into a <p> block. 421 421 422 422 ## Give the user a login button which posts their username and password to loginsubmit 423 - #if($ registrationConfig.loginButton)416 + #if($loginButton) 424 424 425 425 {{html clean=false wiki=false}} 426 426 <form id="loginForm" action="$loginURL" method="post"> ... ... @@ -435,7 +435,7 @@ 435 435 </div> 436 436 </form> 437 437 ## We don't want autoLogin if we are administrators adding users... 438 - #if ($ registrationConfig.autoLogin && $request.xpage != 'registerinline')431 + #if ($autoLogin && $request.xpage != 'registerinline') 439 439 <script> 440 440 document.observe('xwiki:dom:loaded', function() { 441 441 document.forms['loginForm'].submit();
- liveValidation_defaultFieldOkMessage
-
- Number
-
... ... @@ -1,0 +1,1 @@ 1 +4 - Size
-
... ... @@ -1,0 +1,1 @@ 1 +30 - Pretty Name
-
... ... @@ -1,0 +1,1 @@ 1 +Default field okay message - Name
-
... ... @@ -1,0 +1,1 @@ 1 +liveValidation_defaultFieldOkMessage - Use Suggest
-
... ... @@ -1,0 +1,1 @@ 1 +0
- liveValidation_enabled
-
- Number
-
... ... @@ -1,0 +1,1 @@ 1 +3 - Pretty Name
-
... ... @@ -1,0 +1,1 @@ 1 +Enable Javascript field validation - Name
-
... ... @@ -1,0 +1,1 @@ 1 +liveValidation_enabled - Display Form Type
-
... ... @@ -1,0 +1,1 @@ 1 +checkbox
- registrationSuccessMessage
-
- Restricted
-
... ... @@ -1,1 +1,0 @@ 1 -0
- welcomeMessage
-
- Restricted
-
... ... @@ -1,1 +1,0 @@ 1 -0