This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Language.html
133 lines (106 loc) · 5.82 KB
/
Language.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
{namespace s=SJBR\StaticInfoTables\ViewHelpers}
{namespace ats=PAGEmachine\Ats\ViewHelpers}
<f:alias map="{placeholderIndex: 998, newLanguageIndex: 999}">
<fieldset id="tx-ats-languageform">
<div class="form-group row">
<div class="col-sm-3">
<f:render partial="Application/Field/Label" arguments="{fieldName : 'languageSkills', translationKey :
'tx_ats.application.languageskills'}" />
</div>
<div class="col-sm-9" id="languages">
<input type="hidden" name="tx_ats[application][languageSkills]" value="" />
<f:for each="{application.languageSkills}" as="skill" iteration="i" key="key">
<div class="languagebox row" data-language="{i.index}">
<f:if condition="{skill.uid}">
<f:form.hidden property="languageSkills.{i.index}.__identity" value="{skill.uid}" />
</f:if>
<f:form.validationResults for="application.languageSkills.{key}.language">
<div class="col-sm-3 {f:if(condition:validationResults.flattenedErrors, then:'has-error')}">
<label><f:translate key="tx_ats.languageskill.language" /></label>
<s:form.select class="language-select form-control" property="languageSkills.{i.index}.language" staticInfoTable="language" options="{}" prependOptionLabel="{f:translate(key:'tx_ats.select.placeholder')}" prependOptionValue="" />
</div>
<div class="col-sm-3 {f:if(condition:validationResults.flattenedErrors, then:'has-error')}">
<label><f:translate key="tx_ats.languageskill.textLanguage" /></label>
<f:form.textfield class="textlanguage form-control" property="languageSkills.{i.index}.textLanguage" />
</div>
</f:form.validationResults>
<f:form.validationResults for="application.languageSkills.{key}.level">
<div class="col-sm-3 {f:if(condition:validationResults.flattenedErrors, then:'has-error')}">
<label><f:translate key="tx_ats.languageskill.level" /></label>
<ats:form.translatableSelect class="level-select form-control" translationPrefix="tx_ats.languageskill.level." options="{1:1, 2:2, 3:3, 4:4}" property="languageSkills.{i.index}.level" prependOptionLabel="{f:translate(key:'tx_ats.select.placeholder')}" prependOptionValue="" />
</div>
</f:form.validationResults>
<div class="col-sm-3">
<span class="btn btn-danger btn-xs remove-button" data-action="removeLanguage" data-language="{i.index}">
<span class="glyphicon glyphicon-trash"></span>
<f:translate key="tx_ats.languageskill.rmLanguage">Remove</f:translate>
</span>
</div>
<f:form.validationResults for="application.languageSkills.{key}">
<f:if condition="{validationResults.flattenedErrors}">
<div class="col-sm-12 has-error" class="language-errors">
<f:for each="{validationResults.flattenedErrors}" as="errors">
<f:for each="{errors}" as="error">
<span class="help-block"><f:translate key="tx_ats.error.languageSkills.{error.code}">{error.message}</f:translate></span>
</f:for>
</f:for>
</div>
</f:if>
</f:form.validationResults>
</div>
</f:for>
<f:comment>Add one language form if languages are mandatory and no languages are given yet</f:comment>
<f:if condition="{settings.validation.languageSkills}">
<f:if condition="{application.languageSkills}">
<f:else>
<f:render section="languagerow" arguments="{languageOffset : placeholderIndex}" />
</f:else>
</f:if>
</f:if>
<f:form.validationResults for="application.languageSkills">
<f:if condition="{validationResults.errors}">
<div class="row">
<div class="col-sm-12 has-error" class="language-errors">
<f:for each="{validationResults.errors}" as="error">
<span class="help-block"><f:translate key="tx_ats.error.languageSkills.{error.code}">{error.message}</f:translate></span>
</f:for>
</div>
</div>
</f:if>
</f:form.validationResults>
</div>
<f:comment>Template rendering</f:comment>
<f:render section="languagerow" arguments="{languageOffset : newLanguageIndex, class: 'tx-ats-addlanguage'}" />
</div>
<div class="form-group row">
<div class="col-sm-9 col-sm-offset-3">
<span class="btn btn-primary btn-sm" data-action="addLanguage">
<span class="glyphicon glyphicon-plus"></span>
<f:translate key="tx_ats.languageskill.addLanguage">Add Language</f:translate>
</span>
</div>
</div>
</fieldset>
</f:alias>
<f:section name="languagerow">
<div class="{class} languagebox row" data-language="{languageOffset}">
<div class="col-sm-3">
<label><f:translate key="tx_ats.languageskill.language" /></label>
<s:form.select class="language-select form-control" property="languageSkills.{languageOffset}.language" staticInfoTable="language" options="{}" prependOptionLabel="{f:translate(key:'tx_ats.select.placeholder')}" prependOptionValue="" />
</div>
<div class="col-sm-3">
<label><f:translate key="tx_ats.languageskill.textLanguage" /></label>
<f:form.textfield class="textlanguage form-control" property="languageSkills.{languageOffset}.textLanguage" />
</div>
<div class="col-sm-3">
<label><f:translate key="tx_ats.languageskill.level" /></label>
<ats:form.translatableSelect class="level-select form-control" translationPrefix="tx_ats.languageskill.level." options="{1:1, 2:2, 3:3, 4:4}" property="languageSkills.{languageOffset}.level" prependOptionLabel="{f:translate(key:'tx_ats.select.placeholder')}" prependOptionValue="" />
</div>
<div class="col-sm-3">
<span class="btn btn-danger btn-xs remove-button" data-action="removeLanguage" data-language="{languageOffset}">
<span class="glyphicon glyphicon-trash"></span>
<f:translate key="tx_ats.languageskill.rmLanguage">Remove</f:translate>
</span>
</div>
</div>
</f:section>