fix/intern_articles #39
@ -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())));
 | 
			
		||||
 | 
			
		||||
@ -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">
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user