1- <!DOCTYPE html>
2- < html th:lang ="${#locale.language} "
3- xmlns ="http://www.w3.org/1999/xhtml "
4- xmlns:th ="http://www.thymeleaf.org "
5- xmlns:sec ="http://www.thymeleaf.org/extras/spring-security "
6- xmlns:sd ="http://www.thymeleaf.org/spring-data ">
7- < head th:replace ="layout/page :: tw-page-head(headtitle=~{::title},links=~{},refreshMessages=false) ">
8- < title th:text ="'SimpleWorklist | ' + #{project.edit.h1} "> Title</ title >
9- </ head >
10- < body th:replace ="layout/page :: tw-page-body(twcontent=~{::mytwcontent},twtitle=~{::mytwtitle},scripts=~{::script}) ">
11-
12- < div th:fragment ="mytwtitle ">
13- <!-- New Project Form -->
14- < h1 >
15- < i class ="fas fa-folder-open "> </ i >
16- < span th:utext ="#{project.edit.h1} "> Edit Project</ span >
17- </ h1 >
18- </ div >
19-
20- < div th:fragment ="mytwcontent ">
21- < div >
22- < form id ="formId " th:action ="@{/project/{id}/edit(id=${thisProject.id})} " th:object ="${project} " method ="post ">
23- < div class ="form-group ">
24- < label th:for ="${#ids.next('name')} " class ="control-label "> Name</ label >
25- < input type ="text " th:field ="*{name} " class ="form-control " />
26- < div >
27- < div th:each ="err : ${#fields.errors('name')} " th:text ="${err} " class ="alert alert-danger ">
28- </ div >
29- </ div >
30- </ div >
31- < div class ="form-group ">
32- < label th:for ="textEditor " class ="control-label ">
33- < span th:utext ="#{project.add.description} "> Description</ span >
34- </ label >
35- < textarea id ="textEditor " name ="textEditor " rows ="10 " cols ="50 " th:field ="*{description} " class ="form-control "> </ textarea >
36- < div >
37- < div th:each ="err : ${#fields.errors('description')} " th:text ="${err} " class ="alert alert-danger ">
38- </ div >
39- </ div >
40- </ div >
41- < div >
42- < div class ="form-group ">
43- < label th:for ="${#ids.next('context.id')} " class ="control-label ">
44- < span th:utext ="#{project.edit.context} "> Area</ span >
45- </ label >
46- < select th:field ="*{context.id} ">
47- < option th:each ="context : ${contexts} "
48- th:value ="${context.id} "
49- th:text ="${locale == 'de' ? context.nameDe : context.nameEn} "> Wireframe</ option >
50- </ select >
51- < div >
52- < div th:each ="err : ${#fields.errors('context.id')} " th:text ="${err} " class ="alert alert-danger "> </ div >
53- </ div >
54- </ div >
55- </ div >
56- < input type ="hidden " th:field ="*{id} " />
57- < button id ="saveEditedProject " type ="submit " class ="btn btn-primary ">
58- < i class ="fas fa-save "> </ i >
59- < span th:utext ="#{project.edit.button} "> Save Project</ span >
60- </ button >
61- </ form >
62- </ div >
63- <!-- Document Window End -->
64- </ div >
65-
66- < script th:src ="@{/webjars/ckeditor/4.11.3/full/ckeditor.js} "> </ script >
67- < script th:inline ="javascript ">
68- CKEDITOR . replace ( 'textEditor' ) ;
69- </ script >
70- </ body >
71- </ html >
1+ <!DOCTYPE html>
2+ < html th:lang ="${#locale.language} "
3+ xmlns ="http://www.w3.org/1999/xhtml "
4+ xmlns:th ="http://www.thymeleaf.org "
5+ xmlns:sec ="http://www.thymeleaf.org/extras/spring-security "
6+ xmlns:sd ="http://www.thymeleaf.org/spring-data ">
7+ < head th:replace ="layout/page :: tw-page-head(headtitle=~{::title},links=~{},refreshMessages=false) ">
8+ < title th:text ="'SimpleWorklist | ' + #{project.edit.h1} "> Title</ title >
9+ </ head >
10+ < body th:replace ="layout/page :: tw-page-body(twcontent=~{::mytwcontent},twtitle=~{::mytwtitle},scripts=~{::script}) ">
11+
12+ < div th:fragment ="mytwtitle ">
13+ <!-- New Project Form -->
14+ < h1 >
15+ < i class ="fas fa-folder-open "> </ i >
16+ < span th:utext ="#{project.edit.h1} "> Edit Project</ span >
17+ </ h1 >
18+ </ div >
19+
20+ < div th:fragment ="mytwcontent ">
21+ < div >
22+ < form id ="formId " th:action ="@{/project/{id}/edit(id=${thisProject.id})} " th:object ="${project} " method ="post ">
23+ < div class ="form-group ">
24+ < label th:for ="${#ids.next('name')} " class ="control-label "> Name</ label >
25+ < input type ="text " th:field ="*{name} " class ="form-control " />
26+ < div >
27+ < div th:each ="err : ${#fields.errors('name')} " th:text ="${err} " class ="alert alert-danger ">
28+ </ div >
29+ </ div >
30+ </ div >
31+ < div class ="form-group ">
32+ < label th:for ="textEditor " class ="control-label ">
33+ < span th:utext ="#{project.add.description} "> Description</ span >
34+ </ label >
35+ < textarea id ="textEditor " name ="textEditor " rows ="10 " cols ="50 " th:field ="*{description} " class ="form-control "> </ textarea >
36+ < div >
37+ < div th:each ="err : ${#fields.errors('description')} " th:text ="${err} " class ="alert alert-danger ">
38+ </ div >
39+ </ div >
40+ </ div >
41+ < div >
42+ < div class ="form-group ">
43+ < label th:for ="${#ids.next('context.id')} " class ="control-label ">
44+ < span th:utext ="#{project.edit.context} "> Area</ span >
45+ </ label >
46+ < select th:field ="*{context.id} ">
47+ < option th:each ="context : ${contexts} "
48+ th:value ="${context.id} "
49+ th:text ="${locale == 'de' ? context.nameDe : context.nameEn} "> Wireframe</ option >
50+ </ select >
51+ < div >
52+ < div th:each ="err : ${#fields.errors('context.id')} " th:text ="${err} " class ="alert alert-danger "> </ div >
53+ </ div >
54+ </ div >
55+ </ div >
56+ < input type ="hidden "
57+ name ="${_csrf.parameterName} "
58+ value ="${_csrf.token} "/>
59+ < input type ="hidden " th:field ="*{id} " />
60+ < button id ="saveEditedProject " type ="submit " class ="btn btn-primary ">
61+ < i class ="fas fa-save "> </ i >
62+ < span th:utext ="#{project.edit.button} "> Save Project</ span >
63+ </ button >
64+ </ form >
65+ </ div >
66+ <!-- Document Window End -->
67+ </ div >
68+
69+ < script th:src ="@{/webjars/ckeditor/4.11.3/full/ckeditor.js} "> </ script >
70+ < script th:inline ="javascript ">
71+ CKEDITOR . replace ( 'textEditor' ) ;
72+ </ script >
73+ </ body >
74+ </ html >
0 commit comments