-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
5 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,7 +133,6 @@ $xwiki.ssx.use('PhenomeCentral.logo')## | |
$xwiki.ssx.use('PhenomeCentral.login')## | ||
$xwiki.ssfx.use('uicomponents/widgets/validation/livevalidation.css', true)## | ||
$xwiki.jsfx.use('uicomponents/widgets/validation/livevalidation_prototype.js')## | ||
$xwiki.jsfx.use('uicomponents/widgets/validation/uniquenessvalidation.js')## | ||
#if ("$!{request.get('request')}" == '1') | ||
#if ("$!{request.confirmation}" == '') | ||
#set ($missingConfirmation = true) | ||
|
@@ -166,8 +165,7 @@ $xwiki.jsfx.use('uicomponents/widgets/validation/uniquenessvalidation.js')## | |
'comments' : $!{request.comments}, | ||
'escapetool' : $escapetool | ||
}) | ||
##[email protected] | ||
$xwiki.mailsender.sendMessageFromTemplate("PhenomeCentral <noreply@${request.serverName}>", '[email protected]', ${NULL}, ${NULL}, $context.language, 'PhenomeCentral.RequestAccountMailForAdmins', { | ||
$xwiki.mailsender.sendMessageFromTemplate("PhenomeCentral <noreply@${request.serverName}>", '[email protected]', ${NULL}, ${NULL}, $context.language, 'PhenomeCentral.RequestAccountMailForAdmins', { | ||
'firstName' : $!{request.firstName}, | ||
'lastName' : $!{request.lastName}, | ||
'affiliation' : $!{request.affiliation}, | ||
|
@@ -177,26 +175,7 @@ $xwiki.jsfx.use('uicomponents/widgets/validation/uniquenessvalidation.js')## | |
'comments' : $!{request.comments}, | ||
'escapetool' : $escapetool | ||
}) | ||
|
||
## Creating an inactive user. | ||
## -------------------------- | ||
#set ($newUserDoc = $xwiki.getDocument("XWiki.$!{request.username}")) | ||
#if ($newUserDoc.isNew()) | ||
#set ($newUser = $newUserDoc.newObject("XWiki.XWikiUsers")) | ||
$newUser.set("first_name", $!{request.firstName}) | ||
$newUser.set("last_name", $!{request.lastName}) | ||
$newUser.set("email", $!{request.email}) | ||
$newUser.set("company", $!{request.affiliation}) | ||
$newUser.set("comment", "$!{request.referral}\n$!{request.comments}") | ||
$newUser.set("active", 0) | ||
|
||
$newUserDoc.save() | ||
$xwiki.save() | ||
#set ($success = true) | ||
#else | ||
#set ($userExists = true) | ||
#set ($success = false) | ||
#end | ||
#set ($success = true) | ||
#end | ||
#end | ||
## #end | ||
|
@@ -214,16 +193,12 @@ $xwiki.jsfx.use('uicomponents/widgets/validation/uniquenessvalidation.js')## | |
#elseif ("$!{request.get('request')}" == '1') | ||
#if ($missingConfirmation) | ||
#error('PhenomeCentral is targeted to clinicians and scientists working in the rare disorder community. You should not request an account on PhenomeCentral unless you can confirm that you are a doctor, clinical geneticist or scientist working with patients affected by rare disorders.') | ||
#elseif ($userExists) | ||
#error('User already exists.') | ||
#else | ||
#error('Please provide all the required information.') | ||
#end | ||
#end | ||
<input type="hidden" name="request" value="1"/> | ||
<dl> | ||
<dt class="username"><label for="username" class="required">Username</label></dt> | ||
<dd class="username"><input type="text" name="username" id="username" placeholder="Username" class="required check-unique" value="$!{escapetool.xml($request.username)}"/></dd> | ||
<dt class="firstName"><label for="firstName" class="required">First name</label></dt> | ||
<dd class="firstName"><input type="text" name="firstName" id="firstName" placeholder="First name" class="required" value="$!{escapetool.xml($request.firstName)}"/></dd> | ||
<dt class="lastName"><label for="lastName" class="required">Last name</label></dt> | ||
|