diff --git a/src/main/java/info/bukova/isspst/services/users/UserService.java b/src/main/java/info/bukova/isspst/services/users/UserService.java index d5f729ce..d574c9db 100644 --- a/src/main/java/info/bukova/isspst/services/users/UserService.java +++ b/src/main/java/info/bukova/isspst/services/users/UserService.java @@ -27,5 +27,6 @@ public interface UserService extends UserDetailsService, Service { public void setUserSettings(UserSettingsData settings); public void setAuthMethod(AuthMethod method); public AuthMethod getAuthMethod(); + public List getUsersForCombo(); } diff --git a/src/main/java/info/bukova/isspst/services/users/UserServiceImpl.java b/src/main/java/info/bukova/isspst/services/users/UserServiceImpl.java index 514b1978..25faf30b 100644 --- a/src/main/java/info/bukova/isspst/services/users/UserServiceImpl.java +++ b/src/main/java/info/bukova/isspst/services/users/UserServiceImpl.java @@ -230,4 +230,12 @@ public class UserServiceImpl extends AbstractService implements UserServic } } + @SuppressWarnings("unchecked") + @Override + @Transactional + public List getUsersForCombo() { + Query q = dao.getQuery("from User u order by u.lastName"); + return q.list(); + } + } diff --git a/src/main/java/info/bukova/isspst/ui/requirement/RequirementSubpage.java b/src/main/java/info/bukova/isspst/ui/requirement/RequirementSubpage.java index 780b41d8..42f59983 100644 --- a/src/main/java/info/bukova/isspst/ui/requirement/RequirementSubpage.java +++ b/src/main/java/info/bukova/isspst/ui/requirement/RequirementSubpage.java @@ -25,7 +25,7 @@ public class RequirementSubpage extends ListViewModel public List getAllUsers() { - return userService.getAll(); + return userService.getUsersForCombo(); } private BigDecimalConverter bigDecimalConverter; diff --git a/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementForm.java b/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementForm.java index ecaae786..a39ec9fe 100644 --- a/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementForm.java +++ b/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementForm.java @@ -42,7 +42,7 @@ public class TripRequirementForm extends FormViewModel { public void init() { tripRequirementService.loadType(getDataBean()); centres = reqTypeService.filterCentres(getDataBean().getType(), workgroupService.getUserCentres(userService.getCurrent())); - users = userService.getAll(); + users = userService.getUsersForCombo(); passengers = getDataBean().getPassengers(); validator = new TripRequirementFormValidator(); } diff --git a/src/main/webapp/WEB-INF/locales/zk-label.properties b/src/main/webapp/WEB-INF/locales/zk-label.properties index 7caf1dca..f4ccef91 100644 --- a/src/main/webapp/WEB-INF/locales/zk-label.properties +++ b/src/main/webapp/WEB-INF/locales/zk-label.properties @@ -312,6 +312,7 @@ DateTimeFormat=dd. MM. yyyy, HH:MM:ss AddItem=Přidat položku SelectGroup=Vybrat skupinu... RemoveItem=Smazat +Confirm=Potvrdit StudentProject = Studentský projekt StudentProjectAbr = St. projekt diff --git a/src/main/webapp/main/trips/requirements/requirementsForm.zul b/src/main/webapp/main/trips/requirements/requirementsForm.zul index 8e916917..4402d87f 100644 --- a/src/main/webapp/main/trips/requirements/requirementsForm.zul +++ b/src/main/webapp/main/trips/requirements/requirementsForm.zul @@ -129,7 +129,7 @@ -