3262 Improve feedback when students submit/updates their own idea
This commit is contained in:
parent
17306630c5
commit
cabdc5bfce
view/src/main/java/se/su/dsv/scipro/match
@ -1,9 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:wicket="http://wicket.apache.org">
|
||||
<body>
|
||||
<wicket:extend>
|
||||
<div class="row"></div>
|
||||
<div wicket:id="submissionPanel"></div>
|
||||
<wicket:extend>
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-xl-6" wicket:id="submissionPanel"></div>
|
||||
</div>
|
||||
</wicket:extend>
|
||||
</body>
|
||||
</html>
|
@ -4,6 +4,7 @@ import org.apache.wicket.ajax.AjaxRequestTarget;
|
||||
import org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
|
||||
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
|
||||
import org.apache.wicket.markup.html.WebMarkupContainer;
|
||||
import org.apache.wicket.markup.html.basic.Label;
|
||||
import org.apache.wicket.markup.html.form.*;
|
||||
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
|
||||
import org.apache.wicket.markup.html.link.ExternalLink;
|
||||
@ -116,7 +117,7 @@ public class ProjectIdeaSubmissionPanel extends GenericPanel<Idea> {
|
||||
addResearchAreaAndKeywordsSelection();
|
||||
addContract();
|
||||
addDeleteButton();
|
||||
add(new Button("save"));
|
||||
add(new Label("save", isNewIdea ? new ResourceModel("save") : new ResourceModel("update")));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -321,8 +322,13 @@ public class ProjectIdeaSubmissionPanel extends GenericPanel<Idea> {
|
||||
|
||||
@Override
|
||||
protected void onSubmit() {
|
||||
ideaService.saveStudentIdea(getModelObject(), creator, programDropDownChoice.getModelObject(), new HashSet<>(coAuthorChoice.getModelObject()),
|
||||
Idea idea = ideaService.saveStudentIdea(getModelObject(), creator, programDropDownChoice.getModelObject(), new HashSet<>(coAuthorChoice.getModelObject()),
|
||||
new ArrayList<>(keywords), isNewIdea);
|
||||
if (isNewIdea) {
|
||||
getSession().success(getString("ideaSubmitted", Model.of(idea)));
|
||||
} else {
|
||||
getSession().success(getString("ideaUpdated", Model.of(idea)));
|
||||
}
|
||||
setResponsePage(ProjectIdeaStartPage.class);
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,10 @@ too.many.authors= Too many authors for a ${name}-idea. May not be more than ${ma
|
||||
too.few.authors= Too few authors for a ${name}-idea. Must be at least ${minAuthors} including yourself.
|
||||
keywordError= You need to select between 1 and 5 keywords.
|
||||
submissionFailed= Idea could not be submitted.
|
||||
ideaSubmitted= You have successfully submitted your ${projectType.name} student idea, for the application period \
|
||||
${applicationPeriod.name}.
|
||||
ideaUpdated= You have successfully updated your ${projectType.name} student idea, in the application period \
|
||||
${applicationPeriod.name}.
|
||||
titleInfo= The idea title will become the project title once the idea has been matched to a supervisor and the course started. The title can then only be changed by the supervisor.
|
||||
researchAreaInfo= The idea should be connected to a research area.
|
||||
languageInfo= The language the thesis will be written in. This will affect many areas of the thesis writing process \
|
||||
@ -35,3 +39,5 @@ programInfo= Select the program within the context of which you are doing this i
|
||||
programDropDown.nullValid=Not within a program
|
||||
you.already.have.an.active.project.on.this.level= You already have an active project on this level.
|
||||
partner.already.has.an.active.project.on.this.level= ${fullName} already has an active project on this level.
|
||||
save= Submit idea
|
||||
update= Update idea
|
||||
|
Loading…
x
Reference in New Issue
Block a user