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