|
|
@ -6,7 +6,6 @@ import org.springframework.ui.ModelMap;
|
|
|
|
import org.springframework.validation.Errors;
|
|
|
|
import org.springframework.validation.Errors;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
@ -68,6 +67,12 @@ public class ConferenceController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping(value = "/conferences", params = "deleteConference")
|
|
|
|
|
|
|
|
public String delete(@RequestParam("deleteConference") Integer conferenceId) throws IOException {
|
|
|
|
|
|
|
|
conferenceService.delete(conferenceId);
|
|
|
|
|
|
|
|
return String.format(REDIRECT_TO, CONFERENCES_PAGE);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping(value = "/conference", params = "save")
|
|
|
|
@PostMapping(value = "/conference", params = "save")
|
|
|
|
public String save(@Valid ConferenceDto conferenceDto, Errors errors) throws IOException {
|
|
|
|
public String save(@Valid ConferenceDto conferenceDto, Errors errors) throws IOException {
|
|
|
|
filterEmptyDeadlines(conferenceDto);
|
|
|
|
filterEmptyDeadlines(conferenceDto);
|
|
|
@ -76,13 +81,6 @@ public class ConferenceController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
conferenceService.save(conferenceDto);
|
|
|
|
conferenceService.save(conferenceDto);
|
|
|
|
return String.format(REDIRECT_TO, CONFERENCES_PAGE);
|
|
|
|
return String.format(REDIRECT_TO, CONFERENCES_PAGE);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/delete/{conference-id}")
|
|
|
|
|
|
|
|
public String delete(@PathVariable("conference-id") Integer conferenceId) throws IOException {
|
|
|
|
|
|
|
|
conferenceService.delete(conferenceId);
|
|
|
|
|
|
|
|
return String.format(REDIRECT_TO, CONFERENCES_PAGE);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping(value = "/conference", params = "addDeadline")
|
|
|
|
@PostMapping(value = "/conference", params = "addDeadline")
|
|
|
|