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

FORMS-699: Variablize form action for entry creation

parent 34e83c5e
......@@ -169,6 +169,7 @@ public class FormQuestionJspBean extends AbstractJspBean
private static final String MARK_LIST = "list";
private static final String MARK_GROUP_VALIDATED = "groupValidated";
private static final String MARK_STEP_VALIDATED = "stepValidated";
private static final String MARK_ACTION = "action";
// Parameters
private static final String PARAMETER_VALUE_VALIDATE_STEP = "validateStep";
......@@ -310,6 +311,7 @@ public class FormQuestionJspBean extends AbstractJspBean
model.put( MARK_LOCALE, AdminUserService.getLocale( request ).getLanguage( ) );
model.put( MARK_LIST_PARAM_DEFAULT_VALUES, listParamDefaultValues );
model.put( MARK_ENTRY_TYPE_SERVICE, entryTypeService );
model.put( MARK_ACTION, "jsp/admin/plugins/forms/ManageQuestions.jsp" );
if ( Boolean.TRUE.equals( _entry.getEntryType( ).getComment( ) ) )
{
......
......@@ -6,7 +6,7 @@
<@box>
<@boxHeader title='#i18n{forms.createEntry.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_type' value='${entry.entryType.idType}' />
<#if entry.fieldDepend?exists>
......
......@@ -6,7 +6,7 @@
<@box>
<@boxHeader title='#i18n{forms.createEntry.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_type' value='${entry.entryType.idType}' />
<#if entry.fieldDepend?exists>
......
......@@ -5,7 +5,7 @@
<@box>
<@boxHeader title='#i18n{forms.createEntry.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_type' value='${entry.entryType.idType}' />
<#if entry.fieldDepend?exists>
......
......@@ -6,7 +6,7 @@
<@box color='primary'>
<@boxHeader title='#i18n{forms.createEntry.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_type' value='${entry.entryType.idType}' />
<#if entry.fieldDepend?exists>
......
......@@ -6,7 +6,7 @@
<@box>
<@boxHeader title='#i18n{forms.createEntry.titleQuestion} : "${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.createEntry.titleComment} : "${form.title}"' hideLegend=['all']>
<@input type='hidden' name='id_type' value='${entry.entryType.idType}' />
<#if entry.fieldDepend?exists>
......
......@@ -6,7 +6,7 @@
<@box>
<@boxHeader title='#i18n{forms.createEntry.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_type' value='${entry.entryType.idType}' />
<#if entry.fieldDepend?exists>
......
......@@ -6,7 +6,7 @@
<@box>
<@boxHeader title='#i18n{forms.createEntry.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_type' value='${entry.entryType.idType}' />
<#if entry.fieldDepend?exists>
......
......@@ -6,7 +6,7 @@
<@box>
<@boxHeader title='#i18n{forms.createEntry.titleQuestion} : "${form.title}"' />
<@boxBody>
<@tform action='jsp/admin/plugins/forms/ManageQuestions.jsp'>
<@tform action="${action}">
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_resource' value='${entry.idResource}' />
<@fieldSet legend='#i18n{forms.createEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
......
......@@ -6,7 +6,7 @@
<@box color='primary'>
<@boxHeader title='#i18n{forms.createEntry.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_type' value='${entry.entryType.idType}' />
<#if entry.fieldDepend?exists>
......
......@@ -4,7 +4,7 @@
<@box color='primary'>
<@boxHeader title='#i18n{forms.createEntry.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_type' value='${entry.entryType.idType}' />
<#if entry.fieldDepend?exists>
......
......@@ -6,7 +6,7 @@
<@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' />
......
......@@ -6,7 +6,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_type' value='${entry.entryType.idType}' />
<#if entry.fieldDepend?exists>
......
......@@ -8,7 +8,7 @@
<@boxHeader title='#i18n{forms.createEntry.titleQuestion} : ${form.title}' />
<@boxBody>
<@fieldSet legend='#i18n{forms.createEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<@tform method='post' name='manage_entries' action='jsp/admin/plugins/forms/ManageQuestions.jsp'>
<@tform method='post' name='manage_entries' action="${action}">
<@input type='hidden' name='id_type' value='${entry.entryType.idType}' />
<#if entry.fieldDepend?exists>
<@input type='hidden' name='id_field' value='${entry.fieldDepend.idField}' />
......
......@@ -8,7 +8,7 @@
<@box>
<@boxHeader title='#i18n{forms.createEntry.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_type' value='${entry.entryType.idType}' />
<#if entry.fieldDepend?exists>
......
......@@ -6,7 +6,7 @@
<@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}' />
<#if entry.fieldDepend?exists>
......
......@@ -7,7 +7,7 @@
<@box>
<@boxHeader title='#i18n{forms.createEntry.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_type' value='${entry.entryType.idType}' />
<#if entry.fieldDepend?exists>
......
......@@ -6,7 +6,7 @@
<@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' />
......
......@@ -8,7 +8,7 @@
<@box>
<@boxHeader title='#i18n{forms.createEntry.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_type' value='${entry.entryType.idType}' />
<@input type='hidden' name='width' id='width' value='0' />
......
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