diff --git a/src/java/fr/paris/lutece/plugins/forms/resources/forms_messages.properties b/src/java/fr/paris/lutece/plugins/forms/resources/forms_messages.properties index 179ba812b..510ebe6f6 100644 --- a/src/java/fr/paris/lutece/plugins/forms/resources/forms_messages.properties +++ b/src/java/fr/paris/lutece/plugins/forms/resources/forms_messages.properties @@ -605,6 +605,11 @@ createEntry.viewNumber=View number createEntry.labelPresentation=presentation model createEntry.selectPresentationInLine=In line createEntry.selectPresentationNotInLine=In column +createEntry.labelAlignmentText=Text alignment +createEntry.selectAlignmentTop=At the top +createEntry.selectAlignmentToTheRight=To the right +createEntry.labelTextLeft=Left field +createEntry.labelTextRight=Right field create_entry.label_role_associated=role createEntry.labelMandatoryCheckBoxHelp=Every check box must be checked createEntry.labelMandatoryCommentForEntryTypeSession=Check this box if you want to display the form only if there is a value in the attribute of this session diff --git a/src/java/fr/paris/lutece/plugins/forms/resources/forms_messages_fr.properties b/src/java/fr/paris/lutece/plugins/forms/resources/forms_messages_fr.properties index 0d75d3e75..1e9002cc4 100644 --- a/src/java/fr/paris/lutece/plugins/forms/resources/forms_messages_fr.properties +++ b/src/java/fr/paris/lutece/plugins/forms/resources/forms_messages_fr.properties @@ -609,6 +609,11 @@ createEntry.viewNumber=Num\u00e9ro de la vue createEntry.labelPresentation=Modèle de pr\u00e9sentation createEntry.selectPresentationInLine=En ligne createEntry.selectPresentationNotInLine=En colonne +createEntry.labelAlignmentText=Alignement du texte +createEntry.selectAlignmentTop=En haut +createEntry.selectAlignmentToTheRight=A droite +createEntry.labelTextLeft=Champ gauche +createEntry.labelTextRight=Champ droite create_entry.label_role_associated=Associer un r\u00f4le createEntry.labelMandatoryCheckBoxHelp=Toutes les cases à cocher doivent obligatoirement être coch\u00e9es createEntry.labelMandatoryCommentForEntryTypeSession=Cochez cette case si vous souhaitez afficher le formulaire uniquement s'il y a une valeur dans cet attribut de session. diff --git a/webapp/WEB-INF/templates/admin/plugins/forms/entries/create_entry_type_radio_button.html b/webapp/WEB-INF/templates/admin/plugins/forms/entries/create_entry_type_radio_button.html index 73a5c937b..ab4ef3576 100644 --- a/webapp/WEB-INF/templates/admin/plugins/forms/entries/create_entry_type_radio_button.html +++ b/webapp/WEB-INF/templates/admin/plugins/forms/entries/create_entry_type_radio_button.html @@ -45,6 +45,19 @@ + <@formGroup labelFor='alignment_text' labelKey='#i18n{forms.createEntry.labelAlignmentText}'> + <#assign alignment_type = getName('alignment_text',list_param_default_values)!1> + <@select id='alignment_text' name='alignment_text'> + + + + + <@formGroup labelFor='entry_text_left' labelKey='#i18n{forms.createEntry.labelTextLeft}' helpKey='#i18n{forms.createEntry.labelTextLeft}'> + <@input type='text' name='left_text' id='left_text' value='' maxlength=100 /> + + <@formGroup labelFor='entry_text_right' labelKey='#i18n{forms.createEntry.labelTextRight}' helpKey='#i18n{forms.createEntry.labelTextRight}'> + <@input type='text' name='right_text' id='right_text' value='' maxlength=100 /> + <@formGroup labelFor='mandatory' labelKey='#i18n{forms.createEntry.labelMandatory}'> <@checkBox orientation='switch' name='mandatory' id='mandatory' value='1' checked=getChecked('mandatory',list_param_default_values) /> diff --git a/webapp/WEB-INF/templates/admin/plugins/forms/entries/modify_entry_type_radio_button.html b/webapp/WEB-INF/templates/admin/plugins/forms/entries/modify_entry_type_radio_button.html index b3f3a1e02..bef5d60af 100644 --- a/webapp/WEB-INF/templates/admin/plugins/forms/entries/modify_entry_type_radio_button.html +++ b/webapp/WEB-INF/templates/admin/plugins/forms/entries/modify_entry_type_radio_button.html @@ -50,6 +50,21 @@ + <@formGroup labelFor='alignment_text' labelKey='#i18n{forms.createEntry.labelAlignmentText}'> + <#assign alignment_type=getFieldValueByCode( entry, "alignment_text")> + <@select id='alignment_text' name='alignment_text'> + + + + + <@formGroup labelFor='entry_radio_left' labelKey='#i18n{forms.createEntry.labelTextLeft}' helpKey='#i18n{forms.createEntry.labelTextLeft}'> + <#assign text_left=getFieldValueByCode( entry, "left_text")> + <@input type='text' name='left_text' id='left_text' value=text_left maxlength=100 /> + + <@formGroup labelFor='entry_radio_right' labelKey='#i18n{forms.createEntry.labelTextRight}' helpKey='#i18n{forms.createEntry.labelTextRight}'> + <#assign text_right=getFieldValueByCode( entry, "right_text")> + <@input type='text' name='right_text' id='right_text' value=text_right maxlength=100 /> + <@formGroup> <@checkBox orientation='switch' labelFor='mandatory' labelKey='#i18n{forms.createEntry.labelMandatory}' name='mandatory' id='mandatory' value='1' checked=entry.mandatory labelKey='#i18n{forms.createEntry.labelMandatory}' /> diff --git a/webapp/WEB-INF/templates/skin/plugins/forms/entries/fill_entry_type_radio_button.html b/webapp/WEB-INF/templates/skin/plugins/forms/entries/fill_entry_type_radio_button.html index 467422d36..dcf216bad 100644 --- a/webapp/WEB-INF/templates/skin/plugins/forms/entries/fill_entry_type_radio_button.html +++ b/webapp/WEB-INF/templates/skin/plugins/forms/entries/fill_entry_type_radio_button.html @@ -11,6 +11,15 @@ <#assign idConditional = idName + field.idField> <#assign hide=hide+"hideId(${idConditional}.id);"> + <#if field.code == 'left_text'> + <#assign leftText = field.value> + + <#if field.code == 'right_text'> + <#assign rightText = field.value> + + <#if field.code == 'alignment_text'> + <#assign fieldAlignment = field.value> + ${entry.CSSClass!} @@ -18,11 +27,15 @@
<#assign inLine = entry.fieldInLine> + ${leftText!} <#list entry.fields as field> <#if field.code == 'answer_choice'> <#assign idName = buildEntryName( entry, entry_iteration_number )> <#if entry.fieldInLine != true>
-
@@ -58,6 +74,7 @@ <#if entry.fieldInLine&&entry.helpMessage?exists&&entry.helpMessage!=''> ${entry.helpMessage} + ${rightText!}
diff --git a/webapp/css/plugins/forms/forms.css b/webapp/css/plugins/forms/forms.css index dac6f5918..dda31dacc 100644 --- a/webapp/css/plugins/forms/forms.css +++ b/webapp/css/plugins/forms/forms.css @@ -5,4 +5,6 @@ .cam-wrapper{ position: relative; border: 1px dotted #000; display: flex; justify-content: center;} .cam-wrapper > video{ max-width: 100%; } -.btn-cam{ position: absolute !important; bottom:15px; right:15px; } \ No newline at end of file +.btn-cam{ position: absolute !important; bottom:15px; right:15px; } + +.radio-above{ display: flex; flex-direction: column-reverse; padding:15px; } \ No newline at end of file