Commit 0b1dc3b9 authored by Guillaume Lépine's avatar Guillaume Lépine
Browse files

FORMS-723: EntryTypeNumber: modify templates for suffix field

parent b3bb92d0
......@@ -2,7 +2,11 @@
<#assign field=getFieldByCode( entry, "text_config")>
<#assign field_min=getFieldByCode( entry, "min")>
<#assign field_max=getFieldByCode( entry, "max")>
<#assign suffix = '' >
<#if entry.fields?? && entry.fields?has_content>
<#assign suffix = getFieldValueByCode( entry, 'suffix') >
</#if>
<#if list_responses?has_content>
<#list list_responses as response>
<#if response.entry.idEntry == entry.idEntry>
......@@ -30,7 +34,12 @@
<#assign max=field_max.value?number />
</#if>
<@formGroup labelFor='${idName}' labelKey='${entry.title}' helpKey=entry.helpMessage!'' groupStyle=groupStyle!'' mandatory=entry.mandatory>
<@input type='number' name='${idName}' id='${idName}' class='${entry.CSSClass!}' value=inputValue min=min max=max/>
<@inputGroup>
<@input type='number' name='${idName}' id='${idName}' class='${entry.CSSClass!}' value=inputValue min=min max=max/>
<#if suffix!=''>
<@inputGroupItem type='text'>${suffix}</@inputGroupItem>
</#if>
</@inputGroup>
</@formGroup>
<#if list_responses??>
......
<#if !entry.onlyDisplayInBack || is_completeness_bo>
<#assign suffix = '' >
<#if entry.fields?? && entry.fields?has_content>
<#assign suffix = getFieldValueByCode( entry, 'suffix') >
</#if>
<div class="form-group">
<#assign idName = buildEntryName( entry, entry_iteration_number )>
<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>
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 input-group">
<#assign field=getFieldByCode( entry, "text_config")>
<input type="number" class="form-control input-sm" name="${idName}" id="${idName}"
<#if list_responses?has_content>
......@@ -32,7 +37,9 @@
max="${field_max.value?number}"
</#if>
class="${entry.CSSClass!} " />
<#if suffix!=''>
<span class="input-group-addon">${suffix}</span>
</#if>
<#if entry.helpMessage?exists&&entry.helpMessage!=''>
<span class="help-block">${entry.helpMessage}</span>
</#if>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment