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

FORMS-314: Modify templates for placeholder

parent e1e6ede1
......@@ -563,6 +563,7 @@ createEntry.labelHeight=Height of the text area
createEntry.labelWidth=Width of the text area
createEntry.labelUseRefList=Use global reference list
createEntry.labelUseRefListSelect=Reference list to use
createEntry.labelPlaceholder=Placeholder
createEntry.mapProvider=Map
createEntry.editMode=Edition mode
createEntry.viewNumber=View number
......
......@@ -561,6 +561,7 @@ createEntry.labelHeight=Hauteur de la zone de texte
createEntry.labelWidth=Largeur de la zone de texte
createEntry.labelUseRefList=Utiliser une liste de r\u00e9f\u00e9rence globale
createEntry.labelUseRefListSelect=Liste de r\u00e9f\u00e9rence \u00e0 utiliser
createEntry.labelPlaceholder=Placeholder
createEntry.mapProvider=Carte
createEntry.editMode=Mode d'\u00e9dition
createEntry.viewNumber=Num\u00e9ro de la vue
......
......@@ -4,3 +4,12 @@ INSERT INTO genatt_field (id_entry, code, VALUE, title)
INNER JOIN genatt_entry_type t ON t.id_type = e.id_type
WHERE resource_type = 'FORMS_FORM'
AND t.class_name = 'forms.entryTypeNumber';
INSERT INTO genatt_field (id_entry, code, VALUE, title)
SELECT e.id_entry, 'placeholder',
'', null from genatt_entry e
INNER JOIN genatt_entry_type t ON t.id_type = e.id_type
WHERE resource_type = 'FORMS_FORM'
AND t.class_name IN ('forms.entryTypeDate', 'forms.entryTypeNumber', 'forms.entryTypeTelephoneNumber', 'forms.entryTypeTextArea', 'forms.entryTypeText');
\ No newline at end of file
......@@ -29,6 +29,9 @@ ${breadcrumb_template}
<@formGroup labelFor='comment' labelKey='#i18n{forms.createEntry.labelComment}'>
<@input type='textarea' name='comment' id='comment' rows=2></@input>
</@formGroup>
<@formGroup labelFor='placeholder' labelKey='#i18n{forms.createEntry.labelPlaceholder}'>
<@input type='text' name='placeholder' id='placeholder' value='' maxlength=100 />
</@formGroup>
<@formGroup labelFor='date' labelKey='#i18n{forms.createEntry.labelValueDefault}'>
<@inputGroup>
<@inputGroupItem type='text'>
......
......@@ -34,6 +34,9 @@ ${breadcrumb_template}
<@formGroup labelFor='comment' labelKey='#i18n{forms.createEntry.labelComment}'>
<@input type='textarea' name='comment' id='comment' rows=2></@input>
</@formGroup>
<@formGroup labelFor='placeholder' labelKey='#i18n{forms.createEntry.labelPlaceholder}'>
<@input type='text' name='placeholder' id='placeholder' value='' maxlength=100 />
</@formGroup>
<@formGroup labelFor='value' labelKey='#i18n{forms.createEntry.labelValueDefault}'>
<@input type='number' name='value' id='value' />
</@formGroup>
......
......@@ -30,6 +30,9 @@ ${breadcrumb_template}
<@formGroup labelFor='comment' labelKey='#i18n{forms.createEntry.labelComment}'>
<@input type='textarea' name='comment' id='comment' rows=2></@input>
</@formGroup>
<@formGroup labelFor='placeholder' labelKey='#i18n{forms.createEntry.labelPlaceholder}'>
<@input type='text' name='placeholder' id='placeholder' value='' maxlength=100 />
</@formGroup>
<@formGroup labelFor='autocomplete' labelKey='#i18n{forms.createEntry.labelAutocomplete}' helpKey='#i18n{forms.createEntry.labelHelpMessageAutocomplete}'>
<@input type='text' name='autocomplete' id='autocomplete' params=' list="autocompleteList"' />
<datalist id="autocompleteList"><option value="tel"><option value="tel-national"></datalist>
......
......@@ -30,6 +30,9 @@ ${breadcrumb_template}
<@formGroup labelFor='comment' labelKey='#i18n{forms.createEntry.labelComment}'>
<@input type='textarea' name='comment' id='comment' rows=2></@input>
</@formGroup>
<@formGroup labelFor='placeholder' labelKey='#i18n{forms.createEntry.labelPlaceholder}'>
<@input type='text' name='placeholder' id='placeholder' value='' maxlength=100 />
</@formGroup>
<@formGroup labelFor='value' labelKey='#i18n{forms.createEntry.labelValueDefault}'>
<@input type='text' name='value' id='value' />
</@formGroup>
......
......@@ -33,6 +33,9 @@ ${breadcrumb_template}
<@formGroup labelFor='comment' labelKey='#i18n{forms.createEntry.labelComment}'>
<@input type='textarea' name='comment' id='comment' rows=2></@input>
</@formGroup>
<@formGroup labelFor='placeholder' labelKey='#i18n{forms.createEntry.labelPlaceholder}'>
<@input type='text' name='placeholder' id='placeholder' value='' maxlength=100 />
</@formGroup>
<@formGroup labelFor='value' labelKey='#i18n{forms.createEntry.labelValueDefault}'>
<@input type='textarea' name='value' id='value'></@input>
</@formGroup>
......
......@@ -22,7 +22,8 @@
<#elseif field.valueTypeDate?? >
<#assign default=field.valueTypeDate?iso_local>
</#if>
<@input type='date' language=locale.language name='${idName}' id='${idName}' class='${entry.CSSClass!}' value=(response.toStringValueResponse)!(default)! />
<#assign placeholder = getFieldValueByCode(entry, "placeholder") >
<@input type='date' language=locale.language name='${idName}' id='${idName}' class='${entry.CSSClass!}' value=(response.toStringValueResponse)!(default)! placeHolder=placeholder />
<@inputGroupItem type='text'>
<@icon style='calendar' />
</@inputGroupItem>
......
......@@ -35,7 +35,8 @@
</#if>
<@formGroup labelFor='${idName}' labelKey='${entry.title}' helpKey=entry.helpMessage!'' groupStyle=groupStyle!'' mandatory=entry.mandatory>
<@inputGroup>
<@input type='number' name='${idName}' id='${idName}' class='${entry.CSSClass!}' value=inputValue min=min max=max/>
<#assign placeholder = getFieldValueByCode(entry, "placeholder") >
<@input type='number' name='${idName}' id='${idName}' class='${entry.CSSClass!}' value=inputValue min=min max=max placeHolder=placeholder/>
<#if suffix!=''>
<@inputGroupItem type='text'>${suffix}</@inputGroupItem>
</#if>
......
......@@ -20,7 +20,8 @@
</#if>
<@formGroup labelFor='${idName}' labelKey='${entry.title}' helpKey=helpKey groupStyle=groupStyle mandatory=entry.mandatory>
<@input type='tel' language=locale.language name='${idName}' id='${idName}' class='${entry.CSSClass!}' value=(response.toStringValueResponse)! params=autocomplete />
<#assign placeholder = getFieldValueByCode(entry, "placeholder") >
<@input type='tel' language=locale.language name='${idName}' id='${idName}' class='${entry.CSSClass!}' value=(response.toStringValueResponse)! params=autocomplete placeHolder=placeholder />
</@formGroup>
<#if list_responses??>
......
......@@ -27,7 +27,8 @@
</#if>
<@formGroup labelFor='${idName}' labelKey='${entry.title}' helpKey=entry.helpMessage!'' groupStyle=groupStyle!'' mandatory=entry.mandatory>
<@input type='text' name='${idName}' id='${idName}' class='${entry.CSSClass!}' value=inputValue />
<#assign placeholder = getFieldValueByCode(entry, "placeholder") >
<@input type='text' name='${idName}' id='${idName}' class='${entry.CSSClass!}' value=inputValue placeHolder=placeholder/>
</@formGroup>
<#if list_responses??>
......
<#assign field = getFieldByCode(entry, "text_config") />
<#assign field_width=getFieldValueByCode( entry, "width") />
<#assign field_height=getFieldValueByCode( entry, "height") />
<#assign idName = buildEntryName( entry, entry_iteration_number ) />
......@@ -18,6 +17,7 @@
</#if>
</#list>
<#else>
<#assign field = getFieldByCode(entry, "text_config") />
<#if field.value?exists>
<#assign responseContent=field.value />
<#else>
......@@ -27,7 +27,8 @@
<#assign idName = buildEntryName( entry, entry_iteration_number ) />
<@formGroup labelFor='${idName}' labelKey='${entry.title}' helpKey=entry.helpMessage!'' groupStyle=groupStyle!'' mandatory=entry.mandatory>
<@input type='textarea' name='${idName}' id='${idName}' cols=field_width?number rows=field_height?number class='${entry.CSSClass!}' richtext=richtext>${responseContent}</@input>
<#assign placeholder = getFieldValueByCode(entry, "placeholder") >
<@input type='textarea' name='${idName}' id='${idName}' cols=field_width?number rows=field_height?number class='${entry.CSSClass!}' richtext=richtext placeHolder=placeholder>${responseContent}</@input>
</@formGroup>
<#if list_responses??>
......
......@@ -28,6 +28,10 @@ ${breadcrumb_template}
<@formGroup labelFor='comment' labelKey='#i18n{forms.createEntry.labelComment}'>
<@input type='textarea' name='comment' id='comment' rows=5>${entry.comment}</@input>
</@formGroup>
<#assign placeholder = getFieldValueByCode(entry, "placeholder") >
<@formGroup labelFor='placeholder' labelKey='#i18n{forms.createEntry.labelPlaceholder}'>
<@input type='text' name='placeholder' id='placeholder' value=placeholder maxlength=100 />
</@formGroup>
<@formGroup labelFor='date' labelKey='#i18n{forms.createEntry.labelValueDefault}'>
<#assign field = getFieldByCode( entry, "default_date_value" ) >
<@inputGroup>
......
......@@ -36,6 +36,10 @@ ${breadcrumb_template}
<@formGroup labelFor='comment' labelKey='#i18n{forms.createEntry.labelComment}'>
<@input type='textarea' name='comment' id='comment' rows=2>${entry.comment}</@input>
</@formGroup>
<#assign placeholder = getFieldValueByCode(entry, "placeholder") >
<@formGroup labelFor='placeholder' labelKey='#i18n{forms.createEntry.labelPlaceholder}'>
<@input type='text' name='placeholder' id='placeholder' value=placeholder maxlength=100 />
</@formGroup>
<#assign config=getFieldByCode( entry, "text_config")>
<@formGroup labelFor='value' labelKey='#i18n{forms.createEntry.labelValueDefault}'>
<@input type='number' name='value' id='value' value='${config.value!}' />
......
......@@ -31,6 +31,10 @@ ${breadcrumb_template}
<@formGroup labelFor='comment' labelKey='#i18n{forms.createEntry.labelComment}'>
<@input type='textarea' name='comment' id='comment' rows=2>${entry.comment}</@input>
</@formGroup>
<#assign placeholder = getFieldValueByCode(entry, "placeholder") >
<@formGroup labelFor='placeholder' labelKey='#i18n{forms.createEntry.labelPlaceholder}'>
<@input type='text' name='placeholder' id='placeholder' value=placeholder maxlength=100 />
</@formGroup>
<@formGroup labelFor='autocomplete' labelKey='#i18n{forms.createEntry.labelAutocomplete}' helpKey='#i18n{forms.createEntry.labelHelpMessageAutocomplete}'>
<#assign field = getFieldByCode( entry, "autocomplete" ) >
<@input type='text' name='autocomplete' id='autocomplete' value="${field.value?if_exists}" params=' list="autocompleteList"' />
......
......@@ -17,21 +17,24 @@ ${breadcrumb_template}
<@input type='hidden' name='id_question' value='${question.id}' />
<@input type='hidden' name='width' id='width' value='0' />
<@formGroup labelKey='#i18n{forms.createEntry.labelType}'>
<@staticText><@tag color='info'>${entry.entryType.title}</@tag></@staticText>
</@formGroup>
<@formGroup labelFor='title' labelKey='#i18n{forms.createEntry.labelTitle}' helpKey='#i18n{forms.createEntry.labelTitleComment}' mandatory=true>
<@input type='text' name='title' id='title' value='${entry.title}' maxlength=255 />
</@formGroup>
<@formGroup labelFor='entry_code' labelKey='#i18n{forms.createEntry.labelCode}' helpKey='#i18n{forms.createEntry.labelCodeComment}'>
<@input type='text' name='entry_code' id='entry_code' value='${entry.code}' maxlength=100 />
</@formGroup>
<@formGroup labelFor='entry_code' labelKey='#i18n{forms.createEntry.labelCode}' helpKey='#i18n{forms.createEntry.labelCodeComment}'>
<@input type='text' name='entry_code' id='entry_code' value='${entry.code}' maxlength=100 />
</@formGroup>
<@formGroup labelFor='help_message' labelKey='#i18n{forms.createEntry.labelHelpMessage}'>
<@input type='textarea' name='help_message' id='help_message' rows=2>${entry.helpMessage}</@input>
</@formGroup>
<@formGroup labelFor='comment' labelKey='#i18n{forms.createEntry.labelComment}'>
<@input type='textarea' name='comment' id='comment' rows=2>${entry.comment}</@input>
</@formGroup>
<#assign placeholder = getFieldValueByCode(entry, "placeholder") >
<@formGroup labelFor='placeholder' labelKey='#i18n{forms.createEntry.labelPlaceholder}'>
<@input type='text' name='placeholder' id='placeholder' value=placeholder maxlength=100 />
</@formGroup>
<@formGroup labelFor='value' labelKey='#i18n{forms.createEntry.labelValueDefault}'>
<@input type='text' name='value' id='value' value='${config.value}' />
</@formGroup>
......
......@@ -29,6 +29,10 @@ ${breadcrumb_template}
<@formGroup labelFor='comment' labelKey='#i18n{forms.createEntry.labelComment}'>
<@input type='textarea' name='comment' id='comment' rows=2>${entry.comment}</@input>
</@formGroup>
<#assign placeholder = getFieldValueByCode(entry, "placeholder") >
<@formGroup labelFor='placeholder' labelKey='#i18n{forms.createEntry.labelPlaceholder}'>
<@input type='text' name='placeholder' id='placeholder' value=placeholder maxlength=100 />
</@formGroup>
<@formGroup labelFor='value' labelKey='#i18n{forms.createEntry.labelValueDefault}'>
<@input type='textarea' name='value' id='value' rows=10>${config.value}</@input>
</@formGroup>
......
......@@ -15,7 +15,8 @@
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-calendar fa-lg"></i></span>
<#assign field = getFieldByCode( entry, "default_date_value" ) >
<input type="text" name="${idName}" id="${idName}" class="form-control input-sm ${entry.CSSClass!} <#if error??>error</#if>" value="${(response.toStringValueResponse)!(field.valueTypeDate)!}" />
<#assign placeholder = getFieldValueByCode(entry, "placeholder") >
<input type="text" name="${idName}" id="${idName}" class="form-control input-sm ${entry.CSSClass!} <#if error??>error</#if>" value="${(response.toStringValueResponse)!(field.valueTypeDate)!}" <#if placeholder!=''> placeholder='${placeholder}' </#if>/>
<#if entry.helpMessage?exists&&entry.helpMessage!=''>
<span class="help-block">${entry.helpMessage}</span>
</#if>
......
......@@ -36,6 +36,10 @@
<#if field_max.value??>
max="${field_max.value?number}"
</#if>
<#assign placeholder = getFieldValueByCode(entry, "placeholder") >
<#if placeholder!=''>
placeholder='${placeholder}'
</#if>
class="${entry.CSSClass!} " />
<#if suffix!=''>
<span class="input-group-addon">${suffix}</span>
......
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