@@ -410,17 +410,19 @@ <h5 th:text="#{t_hidden_images}">Hidden images</h5>
410410 < div id ="add-release-year " sec:authorize ="hasAuthority('CREATE_SERIES') " th:if ="${series.releaseYear == null} "> </ div >
411411
412412 < div id ="add-catalog-price " sec:authorize ="hasAuthority('CREATE_SERIES') ">
413- < div class ="col-sm-12 form-group ">
413+ < div class ="col-sm-12 form-group " th:fragment =" AddCatalogPriceForm " >
414414 < form id ="add-catalog-price-form "
415415 class ="form-horizontal "
416+ th:object ="${addCatalogPriceForm} "
416417 hx-target ="#add-catalog-price "
417418 hx-disabled-elt ="#add-catalog-price-btn "
418419 th:hx-patch ="@{${INFO_SERIES_PAGE}(id=${seriesId})} ">
419420 < div class ="alert alert-danger text-center col-sm-8 col-sm-offset-3 hidden server-error-msg "
420421 th:text ="#{t_server_error} ">
421422 Server error
422423 </ div >
423- < div class ="form-group form-group-sm ">
424+ < div class ="form-group form-group-sm "
425+ th:classappend ="${isHtmx and #fields.hasErrors('catalogName') ? 'has-error' : ''} ">
424426 < label for ="price-catalog-name " class ="control-label col-sm-3 " th:text ="#{t_catalog} ">
425427 Catalog
426428 </ label >
@@ -433,9 +435,19 @@ <h5 th:text="#{t_hidden_images}">Hidden images</h5>
433435 < option value ="SOLOVYOV " th:text ="#{t_solovyov} "> Solovyov</ option >
434436 < option value ="ZAGORSKI " th:text ="#{t_zagorski} "> Zagorski</ option >
435437 </ select >
438+ <!--/*/
439+ <th:block th:if="${isHtmx}">
440+ <span id="price-catalog-name.errors"
441+ class="help-block"
442+ th:if="${#fields.hasErrors('catalogName')}"
443+ th:each="error : ${#fields.errors('catalogName')}" th:text="${error}">
444+ </span>
445+ </th:block>
446+ /*/-->
436447 </ div >
437448 </ div >
438- < div class ="form-group form-group-sm ">
449+ < div class ="form-group form-group-sm "
450+ th:classappend ="${isHtmx and #fields.hasErrors('price') ? 'has-error' : ''} ">
439451 < label for ="catalog-price " class ="control-label col-sm-3 required-field " th:text ="#{t_price} ">
440452 Price
441453 </ label >
@@ -454,6 +466,17 @@ <h5 th:text="#{t_hidden_images}">Hidden images</h5>
454466 required ="required " />
455467 </ div >
456468 </ div >
469+ < div class ="col-sm-offset-3 col-sm-6 ">
470+ <!--/*/
471+ <th:block th:if="${isHtmx}">
472+ <span id="price.errors"
473+ class="help-block"
474+ th:if="${#fields.hasErrors('price')}"
475+ th:each="error : ${#fields.errors('price')}" th:text="${error}">
476+ </span>
477+ </th:block>
478+ /*/-->
479+ </ div >
457480 </ div >
458481 < div class ="col-sm-offset-3 col-sm-4 ">
459482 < button id ="add-catalog-price-btn "
0 commit comments