Commit e42ca5ab by Tuukka Kivilahti

Merge branch 'usertab' into 'master'

Admin usertab fix

User tab was broken some time ago. Replace old implementation with primefaces one.

See merge request !339
2 parents cb3e883a 5f4dc4b6
#edit { float: left; width:100%; border-bottom: 1px solid black; }
#usertabnav { font-size: 90%; }
ul#usertabnav { float:left; width: 100%; border:1px solid rgba(200,200,200,0); background:rgba(200,200,200,0); border-radius: 16px 16px 0 0; }
ul#usertabnav li {display:inline; list-style:none; }
ul#usertabnav li a {display:block; line-height: 1.7em; float:left; padding:2px 5px 2px 5px; color:rgb(125,125,125); text-decoration:none; font-size:120%; background-color:rgba(100,100,100,0.3); color: rgba(0,0,0,1); border-radius: 12px 12px 0 0; border: 1px solid rgba(0,0,0,0.1); border-bottom: none;}
ul#usertabnava:hover {text-decoration:none; color:rgb(50,50,50);}
ul#usertabnav li.active {font-weight: bold; background-color:rgba(250,250,250,0.4); color: rgba(0,0,0,1); border-radius: 12px 12px 0 0; border: 1px solid black; border-bottom: none }
#edit {
clear: both;
}
\ No newline at end of file
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:composite="http://java.sun.com/jsf/composite" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:tools="http://java.sun.com/jsf/composite/tools">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:tools="http://java.sun.com/jsf/composite/tools"
xmlns:p="http://primefaces.org/ui">
<composite:interface>
<composite:attribute name="tabId" type="java.lang.String" required="true" />
<composite:attribute name="tabId" type="java.lang.String"
required="true" />
</composite:interface>
<composite:implementation>
<h:outputStylesheet library="templates/#{sessionHandler.templateName}/css" name="tabnav.css" />
<h3>
<h:outputText value="#{i18n['usertitle.managingUser']}: #{userView.user.nick} / #{userView.user.wholeName} " />
<h:outputText
value="#{i18n['usertitle.managingUser']}: #{userView.user.nick} / #{userView.user.wholeName} " />
</h3>
<h3>
<h:outputText value="#{i18n['user.cardPower']}: #{userView.usersCardtemplate.name}" />
<h:outputText
value="#{i18n['user.cardPower']}: #{userView.usersCardtemplate.name}" />
</h3>
<div id="#{cc.attrs.tabId}">
<ul id="usertabnav">
<li class="edit"><h:link outcome="/useradmin/edit" value="#{i18n['user.edit']}">
<f:param name="userid" value="#{userView.user.user.id}" />
</h:link></li>
<p:tabMenu activeIndex="#{userView.tabIdx(cc.attrs.tabId)}">
<li class="shop"><h:link outcome="/shop/shopToUser" value="#{i18n['submenu.user.shop']}">
<f:param name="userid" value="#{userView.user.user.id}" />
</h:link></li>
<p:menuitem outcome="/useradmin/edit" value="#{i18n['user.edit']}">
<f:param name="userid" value="#{userView.user.user.id}" />
</p:menuitem>
<li class="accountevents"><h:link outcome="/useradmin/accountEvents" value="#{i18n['submenu.user.accountEvents']}">
<f:param name="userid" value="#{userView.user.user.id}" />
</h:link></li>
<p:menuitem outcome="/shop/shopToUser"
value="#{i18n['submenu.user.shop']}">
<f:param name="userid" value="#{userView.user.user.id}" />
</p:menuitem>
<p:menuitem outcome="/useradmin/accountEvents"
value="#{i18n['submenu.user.accountEvents']}">
<f:param name="userid" value="#{userView.user.user.id}" />
</p:menuitem>
<li class="groups"><h:link outcome="/place/adminGroups" value="#{i18n['submenu.place.myGroups']}">
<f:param name="userid" value="#{userView.user.user.id}" />
</h:link></li>
<p:menuitem outcome="/place/adminGroups"
value="#{i18n['submenu.place.myGroups']}">
<f:param name="userid" value="#{userView.user.user.id}" />
</p:menuitem>
<li class="picture"><h:link outcome="/useradmin/sendPicture" value="#{i18n['submenu.user.sendPicture']}">
<f:param name="userid" value="#{userView.user.user.id}" />
</h:link></li>
<li class="foodwave"><h:link outcome="/useradmin/foodwaveshop" value="#{i18n['submenu.user.foodwave']}">
<f:param name="userid" value="#{userView.user.user.id}" />
</h:link></li>
<p:menuitem outcome="/useradmin/sendPicture"
value="#{i18n['submenu.user.sendPicture']}">
<f:param name="userid" value="#{userView.user.user.id}" />
</p:menuitem>
</ul>
</div>
<div style="clear: both;">&nbsp;</div>
<p:menuitem outcome="/useradmin/foodwaveshop"
value="#{i18n['submenu.user.foodwave']}">
<f:param name="userid" value="#{userView.user.user.id}" />
</p:menuitem>
</p:tabMenu>
</composite:implementation>
</html>
#edit { float: left; width:100%; border-bottom: 1px solid black; }
#usertabnav { font-size: 90%; }
ul#usertabnav { float:left; width: 100%; border:1px solid rgba(200,200,200,0); background:rgba(200,200,200,0); border-radius: 16px 16px 0 0; }
ul#usertabnav li {display:inline; list-style:none; }
ul#usertabnav li a {display:block; line-height: 1.7em; float:left; padding:2px 5px 2px 5px; color:rgb(125,125,125); text-decoration:none; font-size:120%; background-color:rgba(100,100,100,0.3); color: rgba(0,0,0,1); border-radius: 12px 12px 0 0; border: 1px solid rgba(0,0,0,0.1); border-bottom: none;}
ul#usertabnava:hover {text-decoration:none; color:rgb(50,50,50);}
ul#usertabnav li.active {font-weight: bold; background-color:rgba(250,250,250,0.4); color: rgba(0,0,0,1); border-radius: 12px 12px 0 0; border: 1px solid black; border-bottom: none }
#edit {
clear: both;
}
\ No newline at end of file
/* begin css tabs */
ul#usertabnav { /* general settings */
text-align: left; /* set to left, right or center */
margin: 1em 0 1em 0; /* set margins as desired */
font: bold 11px verdana, arial, sans-serif; /* set font as desired */
border-bottom: 1px solid #7DAC0C; /* set border COLOR as desired */
list-style-type: none;
padding: 3px 10px 4px 10px; /* THIRD number must change with respect to padding-top (X) below */
}
ul#usertabnav li { /* do not change */
display: inline;
}
div#edit li.edit,
div#chpass li.chpass,
div#accountevents li.accountevents,
div#groups li.groups,
div#token li.token,
div#picture li.picture
{ /* settings for selected tab */
border-bottom: 1px solid #fff; /* set border color to page background color */
background-color: #fff; /* set background color to match above border color */
}
div#edit li.edit a,
div#chpass li.chpass a,
div#accountevents li.accountevents a,
div#groups li.groups a,
div#token li.token a,
div#picture li.picture a{ /* settings for selected tab link */
background-color: #FFF; /* set selected tab background color as desired */
color: #000; /* set selected tab link color as desired */
position: relative;
top: 1px;
padding-top: 4px; /* must change with respect to padding (X) above and below */
}
ul#usertabnav li a { /* settings for all tab links */
padding: 4px 5px; /* set padding (tab size) as desired; FIRST number must change with respect to padding-top (X) above */
border: 1px solid #7DAC0C; /* set border COLOR as desired; usually matches border color specified in #usertabnav */
background-color: #37bce6; /* set unselected tab background color as desired */
color: #0f3541; /* set unselected tab link color as desired */
margin-right: 0px; /* set additional spacing between tabs as desired */
text-decoration: none;
border-bottom: none;
border-top-right-radius: 7px;
border-top-left-radius: 7px;
}
ul#usertabnav a:hover { /* settings for hover effect */
background: #b8f7ff; /* set desired hover color */
}
/* end css tabs */
\ No newline at end of file
/* begin css tabs */
ul#usertabnav { /* general settings */
text-align: left; /* set to left, right or center */
margin: 1em 0 1em 0; /* set margins as desired */
font: bold 11px verdana, arial, sans-serif; /* set font as desired */
border-bottom: 1px solid #7DAC0C; /* set border COLOR as desired */
list-style-type: none;
padding: 3px 10px 4px 10px; /* THIRD number must change with respect to padding-top (X) below */
}
ul#usertabnav li { /* do not change */
display: inline;
}
div#edit li.edit,
div#chpass li.chpass,
div#accountevents li.accountevents,
div#groups li.groups,
div#foodwave li.foodwave,
div#token li.token,
div#picture li.picture
{ /* settings for selected tab */
border-bottom: 1px solid #fff; /* set border color to page background color */
background-color: #fff; /* set background color to match above border color */
}
div#edit li.edit a,
div#chpass li.chpass a,
div#accountevents li.accountevents a,
div#groups li.groups a,
div#foodwave li.foodwave a,
div#token li.token a,
div#picture li.picture a{ /* settings for selected tab link */
background-color: #FFF; /* set selected tab background color as desired */
color: #000; /* set selected tab link color as desired */
position: relative;
top: 1px;
padding-top: 4px; /* must change with respect to padding (X) above and below */
}
ul#usertabnav li a { /* settings for all tab links */
padding: 4px 5px; /* set padding (tab size) as desired; FIRST number must change with respect to padding-top (X) above */
border: 1px solid #7DAC0C; /* set border COLOR as desired; usually matches border color specified in #usertabnav */
background-color: #37bce6; /* set unselected tab background color as desired */
color: #0f3541; /* set unselected tab link color as desired */
margin-right: 0px; /* set additional spacing between tabs as desired */
text-decoration: none;
border-bottom: none;
border-top-right-radius: 7px;
border-top-left-radius: 7px;
}
ul#usertabnav a:hover { /* settings for hover effect */
background: #b8f7ff; /* set desired hover color */
}
/* end css tabs */
\ No newline at end of file
/*
TABNAV
*/
#edit { float: left; width:100%; border-bottom: 1px solid black; }
ul#usertabnav li {
display:inline;
list-style:none;
}
ul#usertabnav li a {
display:inline-block;
text-decoration:none;
padding: 15px 20px;
background: #70cbc3;
color: #FFF;
}
ul#usertabnava:hover {text-decoration:none; color:rgb(50,50,50);}
ul#usertabnav li.active {font-weight: bold; background-color:rgba(250,250,250,0.4); color: rgba(0,0,0,1); border-radius: 12px 12px 0 0; border: 1px solid black; border-bottom: none }
\ No newline at end of file
#edit { float: left; width:100%; border-bottom: 1px solid black; }
#usertabnav { font-size: 90%; }
ul#usertabnav { float:left; width: 100%; border:1px solid rgba(200,200,200,0); background:rgba(200,200,200,0); border-radius: 16px 16px 0 0; }
ul#usertabnav li {display:inline; list-style:none; }
ul#usertabnav li a {display:block; line-height: 1.7em; float:left; padding:2px 5px 2px 5px; color:rgb(125,125,125); text-decoration:none; font-size:120%; background-color:rgba(100,100,100,0.3); color: rgba(0,0,0,1); border-radius: 12px 12px 0 0; border: 1px solid rgba(0,0,0,0.1); border-bottom: none;}
ul#usertabnava:hover {text-decoration:none; color:rgb(50,50,50);}
ul#usertabnav li.active {font-weight: bold; background-color:rgba(250,250,250,0.4); color: rgba(0,0,0,1); border-radius: 12px 12px 0 0; border: 1px solid black; border-bottom: none }
#edit {
clear: both;
}
\ No newline at end of file
#edit { float: left; width:100%; border-bottom: 1px solid black; }
ul#usertabnav { float:left; width: 100%; border:1px solid rgba(200,200,200,0); background:rgba(200,200,200,0); border-radius: 16px 16px 0 0; }
ul#usertabnav li {display:inline; list-style:none; }
ul#usertabnav li a {display:block; line-height: 1.7em; float:left; padding:2px 5px 2px 5px; color:rgb(125,125,125); text-decoration:none; font-size:120%; background-color:rgba(100,100,100,0.3); color: rgba(0,0,0,1); border-radius: 12px 12px 0 0; border: 1px solid rgba(0,0,0,0.1); border-bottom: none;}
ul#usertabnava:hover {text-decoration:none; color:rgb(50,50,50);}
ul#usertabnav li .active {font-weight: bold; background-color:rgba(250,250,250,0.4); color: rgba(0,0,0,1); border-radius: 12px 12px 0 0; border: 1px solid black; border-bottom: none }
#edit {
clear: both;
}
\ No newline at end of file
/* begin css tabs */
ul#usertabnav { /* general settings */
text-align: left; /* set to left, right or center */
margin: 1em 0 1em 0; /* set margins as desired */
font: bold 11px verdana, arial, sans-serif; /* set font as desired */
border-bottom: 1px solid #7DAC0C; /* set border COLOR as desired */
list-style-type: none;
padding: 3px 10px 4px 10px; /* THIRD number must change with respect to padding-top (X) below */
}
ul#usertabnav li { /* do not change */
display: inline;
}
div#edit li.edit,
div#chpass li.chpass,
div#accountevents li.accountevents,
div#groups li.groups,
div#token li.token,
div#picture li.picture
{ /* settings for selected tab */
border-bottom: 1px solid #fff; /* set border color to page background color */
background-color: #fff; /* set background color to match above border color */
}
div#edit li.edit a,
div#chpass li.chpass a,
div#accountevents li.accountevents a,
div#groups li.groups a,
div#token li.token a,
div#picture li.picture a{ /* settings for selected tab link */
background-color: #FFF; /* set selected tab background color as desired */
color: #000; /* set selected tab link color as desired */
position: relative;
top: 1px;
padding-top: 4px; /* must change with respect to padding (X) above and below */
}
ul#usertabnav li a { /* settings for all tab links */
padding: 4px 5px; /* set padding (tab size) as desired; FIRST number must change with respect to padding-top (X) above */
border: 1px solid #7DAC0C; /* set border COLOR as desired; usually matches border color specified in #usertabnav */
background-color: #37bce6; /* set unselected tab background color as desired */
color: #0f3541; /* set unselected tab link color as desired */
margin-right: 0px; /* set additional spacing between tabs as desired */
text-decoration: none;
border-bottom: none;
border-top-right-radius: 7px;
border-top-left-radius: 7px;
}
ul#usertabnav a:hover { /* settings for hover effect */
background: #b8f7ff; /* set desired hover color */
}
/* end css tabs */
\ No newline at end of file
/* begin css tabs */
ul#usertabnav { /* general settings */
text-align: left; /* set to left, right or center */
margin: 1em 0 1em 0; /* set margins as desired */
font: bold 11px verdana, arial, sans-serif; /* set font as desired */
border-bottom: 1px solid #7DAC0C; /* set border COLOR as desired */
list-style-type: none;
padding: 3px 10px 4px 10px; /* THIRD number must change with respect to padding-top (X) below */
}
ul#usertabnav li { /* do not change */
display: inline;
}
div#edit li.edit,
div#chpass li.chpass,
div#accountevents li.accountevents,
div#groups li.groups,
div#token li.token,
div#picture li.picture
{ /* settings for selected tab */
border-bottom: 1px solid #fff; /* set border color to page background color */
background-color: #fff; /* set background color to match above border color */
}
div#edit li.edit a,
div#chpass li.chpass a,
div#accountevents li.accountevents a,
div#groups li.groups a,
div#token li.token a,
div#picture li.picture a{ /* settings for selected tab link */
background-color: #FFF; /* set selected tab background color as desired */
color: #000; /* set selected tab link color as desired */
position: relative;
top: 1px;
padding-top: 4px; /* must change with respect to padding (X) above and below */
}
ul#usertabnav li a { /* settings for all tab links */
padding: 4px 5px; /* set padding (tab size) as desired; FIRST number must change with respect to padding-top (X) above */
border: 1px solid #7DAC0C; /* set border COLOR as desired; usually matches border color specified in #usertabnav */
background-color: #37bce6; /* set unselected tab background color as desired */
color: #0f3541; /* set unselected tab link color as desired */
margin-right: 0px; /* set additional spacing between tabs as desired */
text-decoration: none;
border-bottom: none;
border-top-right-radius: 7px;
border-top-left-radius: 7px;
}
ul#usertabnav a:hover { /* settings for hover effect */
background: #b8f7ff; /* set desired hover color */
}
/* end css tabs */
\ No newline at end of file
#edit { float: left; width:100%; border-bottom: 1px solid black; }
#usertabnav { font-size: 90%; }
ul#usertabnav { float:left; width: 100%; border:1px solid rgba(200,200,200,0); background:rgba(200,200,200,0); border-radius: 16px 16px 0 0; }
ul#usertabnav li {display:inline; list-style:none; }
ul#usertabnav li a {display:block; line-height: 1.7em; float:left; padding:2px 5px 2px 5px; color:rgb(125,125,125); text-decoration:none; font-size:120%; background-color:rgba(100,100,100,0.3); color: rgba(0,0,0,1); border-radius: 12px 12px 0 0; border: 1px solid rgba(0,0,0,0.1); border-bottom: none;}
ul#usertabnava:hover {text-decoration:none; color:rgb(50,50,50);}
ul#usertabnav li.active {font-weight: bold; background-color:rgba(250,250,250,0.4); color: rgba(0,0,0,1); border-radius: 12px 12px 0 0; border: 1px solid black; border-bottom: none }
#edit {
clear: both;
}
\ No newline at end of file
......@@ -29,7 +29,7 @@
<p:column headerText="#{i18n['vip.hostsName']}" filterBy="#{vip.host.wholeName}" filterMatchMode="contains" style="width: 140px;">
<!-- p:column headerText="#{i18n['vip.hostsName']}" style="width: 140px;" -->
<h:link outcome="/useradmin/edit" value="#{vip.host.wholeName}" >
<h:link id="viphostsname" outcome="/useradmin/edit" value="#{vip.host.wholeName}" >
<f:param name="id" value="#{vip.host.id}" />
</h:link>
<p:tooltip id="viphostsnamephone" for="viphostsname" value="#{vip.host.phone}" />
......
......@@ -83,7 +83,25 @@ public class UserView extends GenericCDIView {
@EJB
private transient UserBeanLocal userbean;
public int tabIdx(String name) {
switch (name) {
case "edit":
return 0;
case "shop":
return 1;
case "accountevents":
return 2;
case "groups":
return 3;
case "picture":
return 4;
case "foodwave":
return 5;
default:
}
return 0;
}
@EJB
private transient ReaderBeanLocal readerbean;
......@@ -102,8 +120,7 @@ public class UserView extends GenericCDIView {
private transient ReaderView readerView;
public String getConversationId() {
if (conversation != null)
{
if (conversation != null) {
return conversation.getId();
}
return null;
......@@ -113,7 +130,6 @@ public class UserView extends GenericCDIView {
private String username;
private String password;
private String emailCheck;
private String passwordcheck;
......@@ -147,8 +163,7 @@ public class UserView extends GenericCDIView {
return printedCard;
}
public void setPrintedCard(PrintedCard card)
{
public void setPrintedCard(PrintedCard card) {
printedCard = card;
}
......@@ -205,19 +220,14 @@ public class UserView extends GenericCDIView {
return user;
}
public String saveRoles()
{
public String saveRoles() {
rolebean.saveRoles(user, usersRoles);
usersRoles = null;
return null;
}
public List<Role> getUserSelectableRoles() {
if (userSelectableRoles == null && user != null)
{
if (userSelectableRoles == null && user != null) {
userSelectableRoles = rolebean.getRoles(getSelectedUser());
}
return userSelectableRoles;
......@@ -225,16 +235,14 @@ public class UserView extends GenericCDIView {
}
public List<Role> getUsersRoles() {
if (usersRoles == null && user != null)
{
if (usersRoles == null && user != null) {
usersRoles = rolebean.getRoles(getSelectedUser());
}
return usersRoles;
}
public String crop()
{
public String crop() {
// UserImage img = userbean.uploadImage(user, "image/jpg",
// croppedImage.getBytes(), "cropped" +
......@@ -246,13 +254,12 @@ public class UserView extends GenericCDIView {
return null;
logger.info("Cropped image {}x{}", croppedImage.getLeft(), croppedImage.getTop());
logger.info("Cropped data bytesize {}, type {}", croppedImage.getBytes().length, croppedImage.getOriginalFilename());
logger.info("Cropped data bytesize {}, type {}", croppedImage.getBytes().length,
croppedImage.getOriginalFilename());
try {
UserImage newImage =
userbean.saveCroppedImage(user.getUser().getCurrentImage(),
croppedImage.getLeft(), croppedImage.getTop(),
croppedImage.getWidth(), croppedImage.getHeight());
UserImage newImage = userbean.saveCroppedImage(user.getUser().getCurrentImage(), croppedImage.getLeft(),
croppedImage.getTop(), croppedImage.getWidth(), croppedImage.getHeight());
user = userbean.getEventUser(newImage.getUser(), false);
} catch (IOException e) {
......@@ -266,7 +273,8 @@ public class UserView extends GenericCDIView {
try {
mpr = cardPrintBean.getUserCardAsPrintablePdf(getSelectedUser().getId());
ByteArrayInputStream pdfstream = new ByteArrayInputStream(mpr.getPdf());
setStreamedFile(new DefaultStreamedContent(pdfstream, "application/pdf", "user_" + getSelectedUser().getId() + "_card.pdf"));
setStreamedFile(new DefaultStreamedContent(pdfstream, "application/pdf",
"user_" + getSelectedUser().getId() + "_card.pdf"));
logger.info("user_" + getSelectedUser().getId() + "_card.pdf");
} catch (Exception e) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(e.getMessage()));
......@@ -283,11 +291,9 @@ public class UserView extends GenericCDIView {
}
}
public String makeCard()
{
public String makeCard() {
printedCard = cardBean.checkPrintedCard(user);
if (printedCard != null)
{
if (printedCard != null) {
user = printedCard.getUser();
}
......@@ -300,7 +306,8 @@ public class UserView extends GenericCDIView {
} else {
InputStream istr = getImage().getInputstream();
UserImage userimage = userbean.uploadImage(user, getImage().getContentType(), getImage().getInputstream(), getImage().getFileName(), "");
UserImage userimage = userbean.uploadImage(user, getImage().getContentType(), getImage().getInputstream(),
getImage().getFileName(), "");
user = userbean.getEventUser(userimage.getUser(), false);
super.addFaceMessage("user.imageUploaded");
}
......@@ -342,16 +349,13 @@ public class UserView extends GenericCDIView {
super.requirePermissions(UserPermission.VIEW_ALL);
}
public boolean canManage()
{
public boolean canManage() {
return permbean.hasPermission(UserPermission.MODIFY);
}
public String validateUser()
{
public String validateUser() {
user = userbean.validateUser(username, password);
if (user != null)
{
if (user != null) {
super.beginConversation();
return "shopToUser";
}
......@@ -380,25 +384,21 @@ public class UserView extends GenericCDIView {
return "edit";
}
public CardTemplate getUsersCardtemplate()
{
public CardTemplate getUsersCardtemplate() {
CardTemplate ret = cardBean.getUsersCardtype(user);
logger.info("Users cardtemplate is {}", ret);
return ret;
}
public boolean isCurrentUser()
{
public boolean isCurrentUser() {
return permbean.isCurrentUser(user);
}
public boolean isHasPrintedCard()
{
public boolean isHasPrintedCard() {
return getPrintedCard() != null;
}
public String setCardState()
{
public String setCardState() {
printedCard = cardBean.saveCard(printedCard);
return null;
}
......@@ -437,7 +437,7 @@ public class UserView extends GenericCDIView {
public String createUser() {
userbean.createNewUser(user, getPassword());
if(!permbean.isLoggedIn()) {
if (!permbean.isLoggedIn()) {
authView.setLogin(user.getLogin());
authView.setPassword(getPassword());
navihandler.saveNavigation("/user/created");
......@@ -450,12 +450,11 @@ public class UserView extends GenericCDIView {
public String createUserAdduserView() {
userbean.createNewUser(user, getPassword());
if(eventbean.getPropertyBoolean(LanEventPropertyKey.DISABLE_PHOTO_ON_KIOSK)) {
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");
// navihandler.forward("/admin/adduser/index?faces-redirect=true");
addFaceMessage("user.createdmessage");
return "/admin/adduser/index";
}
......@@ -530,7 +529,6 @@ public class UserView extends GenericCDIView {
this.image = image;
}
public boolean isKioskPhotoDisabled() {
return eventbean.getPropertyBoolean(LanEventPropertyKey.DISABLE_PHOTO_ON_KIOSK);
}
......@@ -589,8 +587,7 @@ public class UserView extends GenericCDIView {
this.captureForwardUrl = captureForwardUrl;
}
public CardState[] getPrintedCardStates()
{
public CardState[] getPrintedCardStates() {
return CardState.values();
}
......@@ -604,11 +601,12 @@ public class UserView extends GenericCDIView {
// we should readlly fix this facesmessages -shit
private boolean saveSuccess = false;
public boolean isSaveSuccess() {
return saveSuccess;
}
public void saveUserSelectableRoles()
{
public void saveUserSelectableRoles() {
rolebean.saveUserSelectableRoles(user, userSelectableRoles);
addFaceMessage("user.saveSuccessfull");
userSelectableRoles = null;
......@@ -621,10 +619,8 @@ public class UserView extends GenericCDIView {
private Boolean shirtEnabled;
public boolean isShirtEnabled()
{
if (shirtEnabled == null)
{
public boolean isShirtEnabled() {
if (shirtEnabled == null) {
LanEventProperty re = eventbean.getProperty(LanEventPropertyKey.GATHER_SHIRT_SIZE);
if (re != null) {
shirtEnabled = re.isBooleanValue();
......@@ -656,7 +652,6 @@ public class UserView extends GenericCDIView {
return "";
}
public String getEmailCheck() {
return emailCheck;
}
......
......@@ -32,7 +32,7 @@
<logback.version>1.1.3</logback.version>
<testng.version>6.8.21</testng.version>
<javamelody.version>1.58.0</javamelody.version>
<primefaces.version>5.3</primefaces.version>
<primefaces.version>6.0</primefaces.version>
<primefaces.themeversion>1.0.10</primefaces.themeversion>
<primefaces.extensions>4.0.0</primefaces.extensions>
</properties>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!