File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
src/main/webapp/WEB-INF/views/series Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 95
95
</ span >
96
96
</ label >
97
97
< div class ="col-sm-9 ">
98
- < input type ="file " id ="image " style ="box-shadow: none; border: 0px; " required ="required " accept ="image/png,image/jpeg " th:field ="*{image} " />
98
+ < input id ="image "
99
+ type ="file "
100
+ style ="box-shadow: none; border: 0px; "
101
+ accept ="image/png,image/jpeg "
102
+ th:field ="*{image} "
103
+ th:attr ="required=${#authorization.expression('hasAuthority(''DOWNLOAD_IMAGE'')') ? null : 'required'} " />
99
104
<!--/*/
100
105
<span id="image.errors" class="help-block" th:if="${#fields.hasErrors('image')}" th:each="error : ${#fields.errors('image')}" th:text="${error}"></span>
101
106
/*/-->
102
107
</ div >
103
108
</ div >
109
+ < div class ="form-group form-group-sm "
110
+ th:classappend ="${#fields.hasErrors('imageUrl') or #fields.hasErrors('downloadedImage') ? 'has-error' : ''} "
111
+ sec:authorize ="hasAuthority('DOWNLOAD_IMAGE') ">
112
+ < label for ="image-url " class ="control-label col-sm-3 ">
113
+ < span class ="field-label " th:text ="#{t_image_url} ">
114
+ Image URL
115
+ </ span >
116
+ </ label >
117
+ < div class ="col-sm-9 ">
118
+ < input type ="url " id ="image-url " class ="form-control " th:field ="*{imageUrl} " />
119
+ <!--/*/
120
+ <span id="image-url.errors" class="help-block" th:if="${#fields.hasErrors('imageUrl')}" th:each="error : ${#fields.errors('imageUrl')}" th:text="${error}"></span>
121
+ <span id="image-url.errors" class="help-block" th:if="${#fields.hasErrors('downloadedImage')}" th:each="error : ${#fields.errors('downloadedImage')}" th:text="${error}"></span>
122
+ /*/-->
123
+ </ div >
124
+ </ div >
104
125
< div class ="form-group from-group-sm ">
105
126
< div class ="col-sm-offset-3 col-sm-5 ">
106
127
< input type ="submit " class ="btn btn-primary " value ="Add image " th:value ="#{t_add_image} " />
You can’t perform that action at this time.
0 commit comments