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