Skip to content

Commit

Permalink
Small fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
antonkatz committed Mar 7, 2014
1 parent 14f0321 commit 33b819d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 30 deletions.
6 changes: 3 additions & 3 deletions ui/src/main/resources/PhenoTips/Skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<author>xwiki:XWiki.Admin</author>
<customClass/>
<contentAuthor>xwiki:XWiki.Admin</contentAuthor>
<creationDate>1393954171000</creationDate>
<date>1394052871000</date>
<contentUpdateDate>1394052871000</contentUpdateDate>
<creationDate>1320960181000</creationDate>
<date>1324085422000</date>
<contentUpdateDate>1324085422000</contentUpdateDate>
<version>1.1</version>
<title/>
<defaultTemplate/>
Expand Down
29 changes: 2 additions & 27 deletions ui/src/main/resources/PhenomeCentral/register.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -166,8 +165,7 @@ $xwiki.jsfx.use('uicomponents/widgets/validation/uniquenessvalidation.js')##
'comments' : $!{request.comments},
'escapetool' : $escapetool
})
##[email protected]
$xwiki.mailsender.sendMessageFromTemplate("PhenomeCentral &lt;noreply@${request.serverName}&gt;", '[email protected]', ${NULL}, ${NULL}, $context.language, 'PhenomeCentral.RequestAccountMailForAdmins', {
$xwiki.mailsender.sendMessageFromTemplate("PhenomeCentral &lt;noreply@${request.serverName}&gt;", '[email protected]', ${NULL}, ${NULL}, $context.language, 'PhenomeCentral.RequestAccountMailForAdmins', {
'firstName' : $!{request.firstName},
'lastName' : $!{request.lastName},
'affiliation' : $!{request.affiliation},
Expand All @@ -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
Expand All @@ -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
&lt;input type="hidden" name="request" value="1"/&gt;
&lt;dl&gt;
&lt;dt class="username"&gt;&lt;label for="username" class="required"&gt;Username&lt;/label&gt;&lt;/dt&gt;
&lt;dd class="username"&gt;&lt;input type="text" name="username" id="username" placeholder="Username" class="required check-unique" value="$!{escapetool.xml($request.username)}"/&gt;&lt;/dd&gt;
&lt;dt class="firstName"&gt;&lt;label for="firstName" class="required"&gt;First name&lt;/label&gt;&lt;/dt&gt;
&lt;dd class="firstName"&gt;&lt;input type="text" name="firstName" id="firstName" placeholder="First name" class="required" value="$!{escapetool.xml($request.firstName)}"/&gt;&lt;/dd&gt;
&lt;dt class="lastName"&gt;&lt;label for="lastName" class="required"&gt;Last name&lt;/label&gt;&lt;/dt&gt;
Expand Down

0 comments on commit 33b819d

Please sign in to comment.