Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bab71ebc
authored
Dec 26, 2014
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
option to disable photo on kiosk
1 parent
09d7c4c1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
code/moya-database/src/main/java/fi/codecrew/moya/model/LanEventPropertyKey.java
code/moya-web/WebContent/admin/adduser/index.xhtml
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/user/UserView.java
code/moya-database/src/main/java/fi/codecrew/moya/model/LanEventPropertyKey.java
View file @
bab71eb
...
...
@@ -47,6 +47,7 @@ public enum LanEventPropertyKey {
ETICKETMAIL_SUBJECT
(
Type
.
TEXT
,
"Your etickets to Moya Online Youth Accumulator"
),
ETICKETMAIL_CONTENT
(
Type
.
TEXT
,
"Hello {1},\n\nYou can find your etickets to an event from: {0}"
),
MAP_QUEUE
(
Type
.
BOOL
,
null
),
DISABLE_PHOTO_ON_KIOSK
(
Type
.
BOOL
,
null
),
;
...
...
code/moya-web/WebContent/admin/adduser/index.xhtml
View file @
bab71eb
...
...
@@ -19,9 +19,12 @@
</h:link>
<span
style=
"width: 6em;"
>
&nbsb;
</span>
<p:outputPanel
rendered=
"#{!userView.kioskPhotoDisabled}"
>
<h:link
styleClass=
"touchItem"
outcome=
"/admin/adduser/login"
>
<div>
#{i18n['adduser.update']}
</div>
</h:link>
</p:outputPanel>
</div>
</h:panelGroup>
</h:panelGrid>
...
...
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/user/UserView.java
View file @
bab71eb
...
...
@@ -447,8 +447,20 @@ public class UserView extends GenericCDIView {
public
String
createUserAdduserView
()
{
userbean
.
createNewUser
(
user
,
getPassword
());
if
(
eventbean
.
getPropertyBoolean
(
LanEventPropertyKey
.
DISABLE_PHOTO_ON_KIOSK
))
{
// we should not be in, but logout just in case
authView
.
executeLogoutNoRedirect
();
// navihandler.forward("/admin/adduser/index?faces-redirect=true");
addFaceMessage
(
"user.createdmessage"
);
return
"/admin/adduser/index"
;
}
authView
.
executeAdduserAutoLogin
(
user
,
getPassword
());
return
"/admin/adduser/update"
;
}
public
String
createAdminUser
()
{
...
...
@@ -516,6 +528,11 @@ public class UserView extends GenericCDIView {
this
.
image
=
image
;
}
public
boolean
isKioskPhotoDisabled
()
{
return
eventbean
.
getPropertyBoolean
(
LanEventPropertyKey
.
DISABLE_PHOTO_ON_KIOSK
);
}
public
CroppedImage
getCroppedImage
()
{
return
croppedImage
;
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment