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

FORMS-699: Variablize form action for entry modifcation

parent e63075c1
......@@ -844,7 +844,8 @@ public class FormQuestionJspBean extends AbstractJspBean
model.put( MARK_WEBAPP_URL, AppPathService.getBaseUrl( request ) );
model.put( MARK_LOCALE, AdminUserService.getLocale( request ).getLanguage( ) );
model.put( MARK_ENTRY_TYPE_SERVICE, EntryTypeServiceManager.getEntryTypeService( _entry ) );
model.put( MARK_ACTION, "jsp/admin/plugins/forms/ManageQuestions.jsp" );
if ( Boolean.TRUE.equals( _entry.getEntryType( ).getComment( ) ) )
{
setPageTitleProperty( PROPERTY_MODIFY_COMMENT_TITLE );
......
......@@ -3,7 +3,7 @@
<@breadforms title=entry.entryType.title />
<@row>
<@tform action="jsp/admin/plugins/forms/ManageQuestions.jsp">
<@tform action="${action}">
<@columns sm=12>
<@box>
<@boxHeader title='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"'>
......
......@@ -9,7 +9,7 @@
<@button type='button' style='card-control collapse' buttonTargetId='#modifyEntryForm' size='sm' />
</@boxHeader>
<@boxBody>
<@tform id='modifyEntryForm' action='jsp/admin/plugins/forms/ManageQuestions.jsp' collapsed=true>
<@tform id='modifyEntryForm' action="${action}" collapsed=true>
<@fieldSet legend='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_step' value='${step.id}' />
......
......@@ -6,7 +6,7 @@
<@box>
<@boxHeader title='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' />
<@boxBody>
<@tform action='jsp/admin/plugins/forms/ManageQuestions.jsp'>
<@tform action="${action}">
<@fieldSet legend='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_step' value='${step.id}' />
......
......@@ -10,7 +10,7 @@
<@button type='button' style='card-control collapse' buttonTargetId='#modifyEntryForm' buttonIcon='plus' size='sm' />
</@boxHeader>
<@boxBody>
<@tform id='modifyEntryForm' action='jsp/admin/plugins/forms/ManageQuestions.jsp' collapsed=true>
<@tform id='modifyEntryForm' action="${action}" collapsed=true>
<@fieldSet legend='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_step' value='${step.id}' />
......
......@@ -7,7 +7,7 @@
<@box color='primary'>
<@boxHeader title='#i18n{forms.modifyEntry.titleComment} : "${form.title}"' />
<@boxBody>
<@tform action='jsp/admin/plugins/forms/ManageQuestions.jsp' params='enctype="multipart/form-data"'>
<@tform action="${action}" params='enctype="multipart/form-data"'>
<@fieldSet legend='#i18n{forms.modifyEntry.titleComment} : "${form.title}"' hideLegend=['all']>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_step' value='${step.id}' />
......
......@@ -8,7 +8,7 @@
<@box color='primary'>
<@boxHeader title='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' />
<@boxBody>
<@tform action='jsp/admin/plugins/forms/ManageQuestions.jsp'>
<@tform action="${action}">
<@fieldSet legend='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_step' value='${step.id}' />
......
......@@ -7,7 +7,7 @@
<@box color='primary'>
<@boxHeader title='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' />
<@boxBody>
<@tform action='jsp/admin/plugins/forms/ManageQuestions.jsp'>
<@tform action="${action}">
<@fieldSet legend='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_step' value='${step.id}' />
......
......@@ -8,7 +8,7 @@
<@box color='primary'>
<@boxHeader title='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' />
<@boxBody>
<@tform action='jsp/admin/plugins/forms/ManageQuestions.jsp'>
<@tform action="${action}">
<@fieldSet legend='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_step' value='${step.id}' />
......
......@@ -9,7 +9,7 @@
<@box color='primary'>
<@boxHeader title='#i18n{forms.modifyEntry.titleGroup} : "${form.title}"' />
<@boxBody>
<@tform action='jsp/admin/plugins/forms/ManageQuestions.jsp'>
<@tform action="${action}">
<@fieldSet>
<@input name="id_entry" value="${entry.idEntry}" type="hidden" />
<@input name="id_step" value="${step.id}" type="hidden" />
......
......@@ -7,7 +7,7 @@
<@box>
<@boxHeader title='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' />
<@boxBody>
<@tform action='jsp/admin/plugins/forms/ManageQuestions.jsp'>
<@tform action="${action}">
<@fieldSet legend='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_step' value='${step.id}' />
......
......@@ -10,7 +10,7 @@
<@box color='primary'>
<@boxHeader title='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' />
<@boxBody>
<@tform action='jsp/admin/plugins/forms/ManageQuestions.jsp'>
<@tform action="${action}">
<@fieldSet legend='#i18n{forms.createEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_step' value='${step.id}' />
......
......@@ -9,7 +9,7 @@
<@box>
<@boxHeader title='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' />
<@boxBody>
<@tform action='jsp/admin/plugins/forms/ManageQuestions.jsp'>
<@tform action="${action}">
<@fieldSet legend='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_step' value='${step.id}' />
......
......@@ -7,7 +7,7 @@
<@box>
<@boxHeader title='#i18n{forms.createEntry.titleQuestion} : "${form.title}" - #i18n{forms.createEntry.labelEntryType} : ${entry.entryType.title}' />
<@boxBody>
<@tform action='jsp/admin/plugins/forms/ManageQuestions.jsp'>
<@tform action="${action}">
<@fieldSet legend='#i18n{forms.createEntry.titleQuestion} : "${form.title}" - #i18n{forms.createEntry.labelEntryType} : ${entry.entryType.title}' hideLegend=['all']>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_step' value='${step.id}' />
......
......@@ -9,7 +9,7 @@
<@button type='button' style='card-control collapse' buttonIcon='plus' buttonTargetId='#modifyEntryForm' size='sm' />
</@boxHeader>
<@boxBody>
<@tform id='modifyEntryForm' action='jsp/admin/plugins/forms/ManageQuestions.jsp'>
<@tform id='modifyEntryForm' action="${action}">
<@fieldSet legend='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_step' value='${step.id}' />
......
......@@ -9,7 +9,7 @@
<@button type='button' style='card-control collapse' buttonTargetId='#modifyEntryForm' buttonIcon='plus' size='sm' />
</@boxHeader>
<@boxBody>
<@tform id='modifyEntryForm' action='jsp/admin/plugins/forms/ManageQuestions.jsp' collapsed=true>
<@tform id='modifyEntryForm' action="${action}" collapsed=true>
<@fieldSet legend='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_step' value='${step.id}' />
......
......@@ -6,10 +6,9 @@
<@box>
<@boxHeader title='#i18n{forms.createEntry.titleQuestion} : "${form.title}"' />
<@boxBody>
<@tform method="post" name="manage_entries" action="jsp/admin/plugins/forms/ManageQuestions.jsp">
<@tform method="post" name="manage_entries" action="${action}">
<@fieldSet legend='#i18n{forms.createEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<@input type='hidden' name='id_type' value='${entry.entryType.idType}' />
<!-- <@input type='hidden' name='width' id='width' value='0' /> -->
<#if entry.fieldDepend?exists>
<@input type='hidden' name='id_field' value='${entry.fieldDepend.idField}' />
</#if>
......
......@@ -7,7 +7,7 @@
<@box>
<@boxHeader title='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' />
<@boxBody>
<@tform action='jsp/admin/plugins/forms/ManageQuestions.jsp'>
<@tform action="${action}">
<@fieldSet legend='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_step' value='${step.id}' />
......
......@@ -9,7 +9,7 @@
<@box>
<@boxHeader title='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' />
<@boxBody>
<@tform action='jsp/admin/plugins/forms/ManageQuestions.jsp'>
<@tform action="${action}">
<@fieldSet legend='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<#assign config=getFieldByCode( entry, "text_config")>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
......
......@@ -7,7 +7,7 @@
<@box>
<@boxHeader title='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' />
<@boxBody>
<@tform action='jsp/admin/plugins/forms/ManageQuestions.jsp'>
<@tform action="${action}">
<@fieldSet legend='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_step' value='${step.id}' />
......
Supports Markdown
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