-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
additional_foreign_key.html
58 lines (46 loc) · 2.98 KB
/
additional_foreign_key.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
<div th:if="${field instanceof T(org.broadleafcommerce.openadmin.web.form.entity.ComboField)}">
<div class="field-label inline" th:text="#{${field.friendlyName}}" th:classappend="${field.required ? 'required' : ''}" />
<div th:substituteby="components/fieldTooltip" />
<select class="six" th:field="*{fields['__${field.name}__'].value}" th:if="${! #maps.isEmpty(field.options)}">
<option value="" th:text="#{Default_Select}" />
<option th:each="entry : *{fields['__${field.name}__'].options}"
th:value="${entry.key}"
th:text="${entry.value}" />
</select>
<span th:if="${#maps.isEmpty(field.options)}" class="indented-form-value" th:inline="text">
<[[#{No_Records_Found_Enum}]]>
</span>
<span class="error" th:errors="*{fields['__${field.name}__'].value}" />
</div>
<div th:unless="${field instanceof T(org.broadleafcommerce.openadmin.web.form.entity.ComboField)}"
class="additional-foreign-key-container twelve">
<input type="hidden" class="display-value-property" th:value="*{fields['__${field.name}__'].foreignKeyDisplayValueProperty}" />
<input type="hidden" class="value" th:field="*{fields['__${field.name}__'].value}" th:attr="data-onchangetrigger=${field.onChangeTrigger}" />
<input type="hidden" class="hidden-display-value" th:field="*{fields['__${field.name}__'].displayValue}" />
<label th:for="${field.name}" th:text="#{${field.friendlyName}}" th:classappend="${field.required ? 'required' : ''}" />
<div class="foreign-key-value-container">
<span class="display-value-none-selected" style="display: none;" th:inline="text"><[[#{No_Value_Selected}]]></span>
<span
class="display-value read-only"
th:text="*{fields['__${field.name}__'].displayValue}" />
<button class="clear-foreign-key tiny radius secondary button hover-cursor"
type="button" th:inline="text"
th:unless="${field.required}"
th:style="*{#strings.isEmpty(fields['__${field.name}__'].value) ? 'display:none' : ''}">
<i class="icon-remove"></i> [[#{Clear}]]
</button>
<button class="to-one-lookup tiny radius secondary button hover-cursor"
type="button" th:inline="text"
th:attr="data-select-url=@{${'/' + field.owningEntityClass + '/' + field.name + '/select'}}">
<i class="icon-search"></i> [[#{Lookup}]]
</button>
<span class="external-link-container" th:style="${!field.canLinkToExternalEntity or #strings.isEmpty(field.value)}? 'display: none;'">
<a th:href="@{${'/' + field.entityViewPath}}"
th:attr="data-foreign-key-link=@{${'/' + field.foreignKeyClass}}"
class="modal-view">
<i class="icon-external-link"></i>
</a>
</span>
<span class="error" th:errors="*{fields['__${field.name}__'].value}" />
</div>
</div>