File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
java/ru/mystamps/web/feature/series
webapp/WEB-INF/views/series Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -132,5 +132,30 @@ public String addCatalogNumbers(
132132
133133 return null ;
134134 }
135+
136+ @ PatchMapping (
137+ path = SeriesUrl .INFO_SERIES_PAGE ,
138+ headers = "HX-Trigger=add-catalog-price-form"
139+ )
140+ public String addCatalogPrice (
141+ @ PathVariable ("id" ) Integer seriesId ,
142+ HttpServletResponse response
143+ ) throws IOException {
144+
145+ if (seriesId == null ) {
146+ response .sendError (HttpServletResponse .SC_NOT_FOUND );
147+ return null ;
148+ }
149+
150+ if (!seriesService .isSeriesExist (seriesId )) {
151+ response .sendError (HttpServletResponse .SC_NOT_FOUND );
152+ return null ;
153+ }
154+
155+ // XXX: implement
156+ System .out .println ("PATCH add catalog price" );
157+
158+ return null ;
159+ }
135160
136161}
Original file line number Diff line number Diff line change @@ -411,7 +411,9 @@ <h5 th:text="#{t_hidden_images}">Hidden images</h5>
411411
412412 < div id ="add-catalog-price " sec:authorize ="hasAuthority('CREATE_SERIES') ">
413413 < div class ="col-sm-12 form-group ">
414- < form id ="add-catalog-price-form " class ="form-horizontal ">
414+ < form id ="add-catalog-price-form "
415+ class ="form-horizontal "
416+ th:hx-patch ="@{${INFO_SERIES_PAGE}(id=${seriesId})} ">
415417 < div class ="form-group form-group-sm ">
416418 < label for ="price-catalog-name " class ="control-label col-sm-3 " th:text ="#{t_catalog} ">
417419 Catalog
You can’t perform that action at this time.
0 commit comments