Commit f63b18ed authored by Matija Obreza's avatar Matija Obreza
Browse files

Fixed saving crop blurbs and updated headings display in free-text

parent 6f8d9ed8
......@@ -132,14 +132,15 @@ public class CropController extends BaseController {
}
@RequestMapping(value = "/{shortName}/update", method = RequestMethod.POST)
public String update(ModelMap model, @PathVariable(value = "shortName") String shortName, @RequestParam("cropName") String cropName,
public String update(ModelMap model, @PathVariable(value = "shortName") String shortName, @RequestParam(value = "cropName", required = false) String cropName,
@RequestParam("blurp") String aboutBody, @RequestParam(value = "summary", required = false) String summary) {
_logger.debug("Updating crop " + shortName);
Crop crop = cropService.getCrop(shortName);
if (crop == null) {
_logger.debug("Creating crop " + shortName + " " + cropName);
crop = cropService.addCrop(shortName, cropName, null, null);
}
_logger.debug("Updating crop blurb " + shortName);
cropService.updateBlurp(crop, aboutBody, summary, getLocale());
......@@ -209,8 +210,7 @@ public class CropController extends BaseController {
}
@RequestMapping("/{shortName}/data")
public String viewData(ModelMap model, @PathVariable(value = "shortName") String shortName,
@RequestParam(value = "page", required = false, defaultValue = "1") int page) {
public String viewData(ModelMap model, @PathVariable(value = "shortName") String shortName, @RequestParam(value = "page", required = false, defaultValue = "1") int page) {
_logger.warn("Viewing crop " + shortName);
final Crop crop = cropService.getCrop(shortName);
if (crop == null) {
......
......@@ -424,8 +424,11 @@ h2.short {
}
.free-text {
& > h1:first-child {
margin-top: 0;
}
h1, h2 {
text-transform: uppercase;
text-transform: none;
}
h1, h2, h3, h4 {
background-color: transparent;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment