diff --git a/YACOSWeb/WebContent/WEB-INF/classes/messages.properties b/YACOSWeb/WebContent/WEB-INF/classes/messages.properties index d88d4af..3467d8f 100644 --- a/YACOSWeb/WebContent/WEB-INF/classes/messages.properties +++ b/YACOSWeb/WebContent/WEB-INF/classes/messages.properties @@ -96,6 +96,7 @@ form.forgotPassword.email=E-Mail address for your account : form.forgotPassword.submit=Request new password form.forgotPassword.help=Please enter the email address you used for your YACOS account.\nA new password will be generated and sent into your mailbox. forgotPassword.title=Reset your password +forgotPassword.submitted=A new password has been successfully generated for your account.\nIt has been sent to your email address. ################### # MESSAGE ERROR @@ -174,6 +175,8 @@ evaluation.choose=Choose an title to evaluation from the list invitation.send=Send an invitation +conference.error.noTokenLeft=You have no conference creation token left !\nPlease contact the administrator + #Validation messages for errors submissionArticle.title=The title should not be null submissionArticle.theme=The theme should not be null diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/denied.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/denied.jsp index 30ae70e..0803e99 100644 --- a/YACOSWeb/WebContent/WEB-INF/jsp/denied.jsp +++ b/YACOSWeb/WebContent/WEB-INF/jsp/denied.jsp @@ -4,7 +4,12 @@ + Acces denied. Sorry for this inconvenience. +
+ ${message} +
+ \ No newline at end of file diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/forgotPassword.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/forgotPassword.jsp index 4aafbbf..47953b9 100644 --- a/YACOSWeb/WebContent/WEB-INF/jsp/forgotPassword.jsp +++ b/YACOSWeb/WebContent/WEB-INF/jsp/forgotPassword.jsp @@ -10,6 +10,13 @@

+ + +

+ +

+
+

@@ -22,6 +29,8 @@

"/> + + diff --git a/YACOSWeb/WebContent/images/errorSymbol.png b/YACOSWeb/WebContent/images/errorSymbol.png new file mode 100644 index 0000000..dead6ce Binary files /dev/null and b/YACOSWeb/WebContent/images/errorSymbol.png differ diff --git a/YACOSWeb/WebContent/images/formHelpSymbol.png b/YACOSWeb/WebContent/images/formHelpSymbol.png new file mode 100644 index 0000000..e75170f Binary files /dev/null and b/YACOSWeb/WebContent/images/formHelpSymbol.png differ diff --git a/YACOSWeb/WebContent/images/formOkSymbol.png b/YACOSWeb/WebContent/images/formOkSymbol.png new file mode 100644 index 0000000..d0749e4 Binary files /dev/null and b/YACOSWeb/WebContent/images/formOkSymbol.png differ diff --git a/YACOSWeb/WebContent/stylesheets/base.css b/YACOSWeb/WebContent/stylesheets/base.css index 85ddc59..a3b3bb9 100644 --- a/YACOSWeb/WebContent/stylesheets/base.css +++ b/YACOSWeb/WebContent/stylesheets/base.css @@ -33,11 +33,35 @@ form { } .formHelp { + min-height: 30px; padding: 5px; + padding-left: 35px; + border: thin solid #94ff90; + background: #dfffe4 url(../images/formHelpSymbol.png) no-repeat 2px 5px; +} + +.formOk { + min-height: 30px; + background-image: url(../images/formOkSymbol.png); + background-repeat: no-repeat; + background-position: 2px 5px; + padding: 5px; + padding-left: 35px; border: thin solid #94ff90; background-color: #dfffe4; } +.errorBox { + min-height: 30px; + background-image: url(../images/errorSymbol.png); + background-repeat: no-repeat; + background-position: 2px 5px; + padding: 5px; + padding-left: 35px; + border: thin solid rgb(255,0,12); + background-color: rgb(255,188,182); +} + .formError{ color: #ff0000; } @@ -229,6 +253,7 @@ form { } #maincontent > * { + margin-top: 10px; margin-right: 10px; } diff --git a/YACOSWeb/src/org/yacos/web/chairman/controller/AddConferenceController.java b/YACOSWeb/src/org/yacos/web/chairman/controller/AddConferenceController.java index f93fe7b..b6a23bc 100644 --- a/YACOSWeb/src/org/yacos/web/chairman/controller/AddConferenceController.java +++ b/YACOSWeb/src/org/yacos/web/chairman/controller/AddConferenceController.java @@ -25,6 +25,7 @@ import org.yacos.core.conferences.IConferenceManager; import org.yacos.core.evaluation.Criterion; import org.yacos.core.evaluation.IEvaluationManager; import org.yacos.core.exceptions.ConferenceDoesntExistException; +import org.yacos.core.exceptions.NoConferenceCreationTokenLeftException; import org.yacos.core.users.IUserManager; import org.yacos.core.users.User; import org.yacos.core.users.Role.RoleType; @@ -424,15 +425,22 @@ public class AddConferenceController extends AbstractWizardFormController { if (action == null || action.equals("")) { - Conference conf = conferenceManager.addConference( - conference.getTitle(), - conference.getDescription(), - conference.getOtherInformations(), - conference.getDateArticleParsed(), - conference.getDateArticleParsed(), - conference.getDateEvaluationParsed(), - conference.getDateStartParsed(), - conference.getDateEndParsed()); + Conference conf = null; + + try { + conf = conferenceManager.addConference( + conference.getTitle(), + SessionService.getInstance().getCurrentUserLogin(), + conference.getDescription(), + conference.getOtherInformations(), + conference.getDateArticleParsed(), + conference.getDateArticleParsed(), + conference.getDateEvaluationParsed(), + conference.getDateStartParsed(), + conference.getDateEndParsed()); + } catch (NoConferenceCreationTokenLeftException e1) { + return new ModelAndView("denied","message",getMessageSourceAccessor().getMessage("conference.error.noTokenLeft")); + } conference.setConferenceId(conf.getId()); SessionService.getInstance().setCurrentConference(conf); diff --git a/YACOSWeb/src/org/yacos/web/system/controller/ForgotPasswordController.java b/YACOSWeb/src/org/yacos/web/system/controller/ForgotPasswordController.java index b8ab02a..ed16dc2 100644 --- a/YACOSWeb/src/org/yacos/web/system/controller/ForgotPasswordController.java +++ b/YACOSWeb/src/org/yacos/web/system/controller/ForgotPasswordController.java @@ -42,8 +42,6 @@ public class ForgotPasswordController extends SimpleFormController { String newPassword = YACOSUtils.generate(12); user.setPassword(User.hashPassword(newPassword)); - System.out.println(newPassword); - userManager.UpdateUser(user); String mailSubject = "Your new YACOS password"; @@ -54,7 +52,9 @@ public class ForgotPasswordController extends SimpleFormController { MailSenderService.getInstance().sendEMail(email, mailSubject, mailBody); - return new ModelAndView(getSuccessView()); + request.setAttribute("success", true); + + return showNewForm(request, response); } }