Commit bab71ebc by Tuukka Kivilahti

option to disable photo on kiosk

1 parent 09d7c4c1
......@@ -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),
;
......
......@@ -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>
......
......@@ -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;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!