html_code_entry_type_select.html

 1   <div class="form-group">
 2   	<label class="col-sm-2 control-label"  for="attribute${entry.idEntry}">${entry.title} <#if entry.mandatory>*</#if></label>
 3   	<div class="col-sm-10">	 
 4   		<select name="attribute${entry.idEntry}" id="attribute${entry.idEntry}"
 5   			<#if list_responses??>
 6   				<#list list_responses as response>
 7   					<#if response.entry.idEntry == entry.idEntry && response.entry.error??>
 8   						class="error"
 9   						<#break>
 10   					</#if>
 11   				</#list>
 12   				class="${entry.CSSClass!}"
 13   		</#if>	>
 14   		<option value="">#i18n{announce.message.noValue}</option>
 15   		<#list entry.fields as field>
 16   			<#if field.code == 'answer_choice'>
 17   				<option  value="${field.idField}" <#if field.comment?? && field.comment != ''>title="${field.comment}"</#if>
 18   					<#if list_responses??>
 19   						<#list list_responses as response>
 20   							<#if response.entry.idEntry == entry.idEntry && response.field??>
 21   								<#if response.field.idField == field.idField>
 22   									selected ="selected"
 23   									<#break>
 24   								</#if>
 25   							</#if>
 26   						</#list>
 27   					<#else>
 28   						<#if field.defaultValue>
 29   							selected ="selected"
 30   						</#if>
 31   					</#if>
 32   					>
 33   						<#if !field.noDisplayTitle>
 34   							${field.title}
 35   						</#if>
 36   				</option>
 37   			</#if>
 38   		</#list>
 39   	</select>
 40   	<#if entry.helpMessage?exists&&entry.helpMessage!=''>
 41   	<p class="help-block">${entry.helpMessage}</p>
 42   	</#if>
 43   	<#if list_responses??>
 44   		<#list list_responses as response>
 45   			<#if response.entry.idEntry == entry.idEntry && response.entry.error??>
 46   				<div class="alert alert-error">
 47   					<#assign error = response.entry.error>
 48   					<#if error.mandatoryError>
 49   						#i18n{announce.message.mandatory.entry}
 50   					<#else>
 51   						${error.errorMessage}
 52   					</#if>
 53   				</div>	
 54   				</#if>
 55   			</#list>
 56   	</#if>
 57   	</div>
 58   </div>