fixed spaces in textarea

This commit is contained in:
Hendrik Schutter 2020-05-27 21:43:26 +02:00
parent a38b817f20
commit 08dc4bcb47
2 changed files with 5 additions and 5 deletions

View File

@ -83,7 +83,7 @@ public class InternArticleController {
@RequestParam(value = "price_netto", required = true) String pricenetto,
@RequestParam(value = "reorderMaxPrice", required = true) String reorderMaxPrice,
@RequestParam(value = "autobuy", required = true) Boolean shouldReorder,
@RequestParam(value = "categories", required = true) String categories,
@RequestParam(value = "categorie", required = true) String categories,
@RequestParam(value = "img", required = true) MultipartFile imgFile) {
Article tmpArticle = articleRepository.findArticleById(id); // get the old article
@ -93,7 +93,7 @@ public class InternArticleController {
tmpArticle.categories.clear();
// loop through all categories strings and create a new category if a new one;
// also adds the categorys to the article
// also adds the categories to the article
for (String category : separatedCategories) {
tmpArticle.categories.add(categoryRepository.findCategoryByName(category.trim())
.orElseGet(() -> new Category(category.trim())));

View File

@ -70,9 +70,9 @@
<p>
Bitte jede Kategorien in eine eigene Zeile
</p>
<textarea name="categories" id="categories" class="full-width" rows="6"th:inline="text">[[${ArticleID.categorie}]]
<textarea name="categorie" id="categorie" class="full-width" required rows="6"th:inline="text" th:field="${ArticleID.categorie}">
</textarea>
</textarea>
</div>
<div class="s">
<p>
@ -93,7 +93,7 @@
</div>
<p class="l">
<label for="description">Beschreibung</label>
<textarea name="description" id="description" class="full-width" rows="15" th:inline="text">[[${ArticleID.description}]]
<textarea name="description" id="description" class="full-width" required th:field="${ArticleID.description}" rows="15" th:inline="text">
</textarea>
</p>
<div class="l">