Skip to content

Commit

Permalink
фикс удаления доп изображений
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcom committed Jan 7, 2025
1 parent c0305ec commit 1cd77d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1998-2024 Linux.org.ru
* Copyright 1998-2025 Linux.org.ru
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down Expand Up @@ -48,7 +48,7 @@ class DeleteImageController(imageDao: ImageDao, imageService: ImageService, topi

val mv = new ModelAndView("delete_image")

mv.addObject("image", image)
mv.addObject("image", imageService.prepareImage(image).get)
mv.addObject("preparedTopic", preparedTopic)

mv
Expand Down
8 changes: 4 additions & 4 deletions src/main/webapp/WEB-INF/jsp/delete_image.jsp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%--
~ Copyright 1998-2015 Linux.org.ru
~ Copyright 1998-2025 Linux.org.ru
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
Expand All @@ -23,13 +23,13 @@
<jsp:include page="/WEB-INF/jsp/header.jsp"/>
<h1>Удаление изображения</h1>

<lor:image image="${preparedTopic.image}" title="" preparedMessage="${preparedTopic}" showImage="true" showInfo="false"/>
<lor:image image="${image}" title="" preparedMessage="${preparedTopic}" showImage="true"/>

<form method="POST" action="/delete_image">
<lor:csrf/>
<input type="hidden" name="id" value="${image.id}">
<input type="hidden" name="id" value="${image.image.id}">

<input type="submit" value="Удалить">
<input type="submit" class="btn btn-danger" value="Удалить">
</form>

<jsp:include page="/WEB-INF/jsp/footer.jsp"/>
Expand Down

0 comments on commit 1cd77d8

Please sign in to comment.