fill_entry_type_text_area.html
1 <#include "/admin/plugins/directories/commons.html" />
2
3 <#macro getTextAreaContent responseContent has_error entry>
4 <#assign field_width=getFieldValueByCode( entry, "width")>
5 <#assign field_height=getFieldValueByCode( entry, "height")>
6 <#assign idName = buildEntryName( entry, entry_iteration_number )>
7 <!#-- fieldInLine means use rich text -->
8 <#if has_error>
9 <textarea name="${idName}" id="${idName}" cols="${field_width?number}" rows="${field_height?number}" class="alert alert-danger<#if entry.fieldInLine> richtext</#if> form-control">${responseContent}</textarea>
10 <#else>
11 <textarea name="${idName}" id="${idName}" cols="${field_width?number}" rows="${field_height?number}" class="${entry.CSSClass!}<#if entry.fieldInLine> richtext</#if> form-control">${responseContent}</textarea>
12 </#if>
13 </#macro>
14
15 <div class="form-group">
16 <#assign idName = buildEntryName( entry, entry_iteration_number )>
17 <label class="control-label col-xs-12 col-sm-12 col-md-3 col-lg-3" for="${idName}">${entry.title}<#if entry.mandatory> *</#if></label>
18 <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
19 <#assign field=getFieldByCode( entry, "text_config")>
20 <#if list_responses?? && list_responses?has_content>
21 <#list list_responses as response>
22 <#if response.entry.idEntry == entry.idEntry && response.toStringValueResponse??>
23 <#if response.entry.error??>
24 <@getTextAreaContent responseContent=response.toStringValueResponse has_error=true entry=entry />
25 <#else>
26 <@getTextAreaContent responseContent=response.toStringValueResponse has_error=false entry=entry />
27 </#if>
28 </#if>
29 </#list>
30 <#else>
31 <#if field.value?exists>
32 <@getTextAreaContent responseContent=field.value has_error=false entry=entry />
33 <#else>
34 <@getTextAreaContent responseContent="" has_error=false entry=entry />
35 </#if>
36 </#if>
37 <#if entry.helpMessage?exists&&entry.helpMessage!=''>
38 <span class="help-block">${entry.helpMessage}</span>
39 </#if>
40 </div>
41 </div>
42
43 <#if list_responses??>
44 <#list list_responses as response>
45 <#if response.entry.idEntry == entry.idEntry && response.entry.error?? && response.entry.error.isDisplayableError>
46 <div class="alert alert-danger">
47 <#assign error = response.entry.error>
48 <#if error.mandatoryError>#i18n{directories.message.mandatory.entry}<#else>${error.errorMessage}</#if>
49 </div>
50 </#if>
51 </#list>
52 </#if>
53
54 <#if entry.fieldInLine>
55 <#include "/util/editor/editor.html" />
56 <@initEditor />
57 </#if>