Commit bab71ebc by Tuukka Kivilahti

option to disable photo on kiosk

1 parent 09d7c4c1
...@@ -47,6 +47,7 @@ public enum LanEventPropertyKey { ...@@ -47,6 +47,7 @@ public enum LanEventPropertyKey {
ETICKETMAIL_SUBJECT(Type.TEXT, "Your etickets to Moya Online Youth Accumulator"), 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}"), ETICKETMAIL_CONTENT(Type.TEXT, "Hello {1},\n\nYou can find your etickets to an event from: {0}"),
MAP_QUEUE(Type.BOOL, null), MAP_QUEUE(Type.BOOL, null),
DISABLE_PHOTO_ON_KIOSK(Type.BOOL, null),
; ;
......
...@@ -19,9 +19,12 @@ ...@@ -19,9 +19,12 @@
</h:link> </h:link>
<span style="width: 6em;"> &nbsb; <span style="width: 6em;"> &nbsb;
</span> </span>
<p:outputPanel rendered="#{!userView.kioskPhotoDisabled}">
<h:link styleClass="touchItem" outcome="/admin/adduser/login"> <h:link styleClass="touchItem" outcome="/admin/adduser/login">
<div>#{i18n['adduser.update']}</div> <div>#{i18n['adduser.update']}</div>
</h:link> </h:link>
</p:outputPanel>
</div> </div>
</h:panelGroup> </h:panelGroup>
</h:panelGrid> </h:panelGrid>
......
...@@ -447,8 +447,20 @@ public class UserView extends GenericCDIView { ...@@ -447,8 +447,20 @@ public class UserView extends GenericCDIView {
public String createUserAdduserView() { public String createUserAdduserView() {
userbean.createNewUser(user, getPassword()); 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()); authView.executeAdduserAutoLogin(user, getPassword());
return "/admin/adduser/update"; return "/admin/adduser/update";
} }
public String createAdminUser() { public String createAdminUser() {
...@@ -516,6 +528,11 @@ public class UserView extends GenericCDIView { ...@@ -516,6 +528,11 @@ public class UserView extends GenericCDIView {
this.image = image; this.image = image;
} }
public boolean isKioskPhotoDisabled() {
return eventbean.getPropertyBoolean(LanEventPropertyKey.DISABLE_PHOTO_ON_KIOSK);
}
public CroppedImage getCroppedImage() { public CroppedImage getCroppedImage() {
return croppedImage; return croppedImage;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!