Procházet zdrojové kódy

CensusEntry new Entry

Andrew Grant před 7 měsíci
rodič
revize
5b444ae059

+ 1 - 2
src/main/java/scot/carricksoftware/grants/controllers/census/selectedcensus/SelectedCensusListControllerImpl.java

@@ -112,9 +112,8 @@ public class SelectedCensusListControllerImpl implements CensusEntryListControll
     public final String censusEntryList(@Valid @PathVariable final String id, Model model) {
         logger.debug("");
         census = censusService.findById(Long.valueOf(id));
-        model.addAttribute(AttributeConstants.CENSUS,  selectedCensusEntryService.findById(Long.valueOf(id)));
         model.addAttribute(AttributeConstants.CENSUS_ENTRIES, selectedCensusEntryService.getPagedCensusEntries(census, currentPage));
-        return ViewConstants.SELECTED_CENSUS_LIST;
+        return sendAttributesAndReturn(model);
     }
 
     @Override

+ 1 - 1
src/main/resources/templates/censusEntry/form.html

@@ -181,7 +181,7 @@ rounded-3 text-center p-4">
         </div>
 
         <button type="submit" class="btn btn-primary">Commit</button>
-        <a class="btn btn-secondary" th:href="@{/templates/censusEntry}" th:text="${'List all'}">List all</a>
+        <a class="btn btn-secondary" th:href="@{/censusEntries}" th:text="${'List all'}">List all</a>
         <a class="btn btn-success" th:href="@{/}" th:text="${'Home'}">Home</a>
         <h6><span style="color: rgb(255,0,0);">*</span><span> Cannot be edited</span></h6>
         <h6><span style="color: rgb(255,0,0);">+</span><span>Not further recorded</span></h6>