Index: main/plugin-ugc/resources/js/org/ametys/ugc/UGCContentActions.i18n.js
===================================================================
--- main/plugin-ugc/resources/js/org/ametys/ugc/UGCContentActions.i18n.js	(revision 28040)
+++ main/plugin-ugc/resources/js/org/ametys/ugc/UGCContentActions.i18n.js	(working copy)
@@ -21,11 +21,13 @@
 	org.ametys.ugc.content.Accept.pluginName = pluginName;
 	org.ametys.ugc.content.Accept.workflowName = config['workflow-name'];
 	org.ametys.ugc.content.Accept.actionId = config['init-action-id'];
+	org.ametys.ugc.content.Accept.contentType = config['content-type'];
+	org.ametys.ugc.content.Accept.contentTypeHint = config['content-type-hint'];
 	
 	if (!org.ametys.ugc.content.Accept.delayedInitialize())
         return;
 	
-	org.ametys.ugc.content.Accept.box.show();
+	org.ametys.ugc.content.Accept._showBox();
 	org.ametys.ugc.content.Accept._initForm();
 }
 
@@ -86,6 +88,75 @@
 		width: 260
 	});
 	
+	var items = [];
+	
+	if (org.ametys.ugc.content.Accept.contentType)
+	{
+		if (org.ametys.ugc.content.Accept.contentTypeHint)
+		{
+			org.ametys.ugc.content.Accept._contentTypeHint = new org.ametys.HtmlContainer ({cls: 'hint', html: org.ametys.ugc.content.Accept.contentTypeHint});
+			items.push(org.ametys.ugc.content.Accept._contentTypeHint);
+		}
+	}
+	
+	items.push(org.ametys.ugc.content.Accept._cType);
+	
+	org.ametys.ugc.content.Accept._cTypeHint = new org.ametys.HtmlContainer ({cls: 'hint', html: "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_ACCEPT_HINT_1"/>"});
+	items.push(org.ametys.ugc.content.Accept._cTypeHint);
+
+	items.push(new org.ametys.HtmlContainer ({cls: 'hint', html: "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_ACCEPT_HINT_2"/>"}));
+	items.push(new Ext.form.Radio ({
+	        	 boxLabel : "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_PAGE_MODE_NEW"/>",
+	        	 hideLabel: true,
+	        	 itemCls: 'ametys-input radio',
+	        	 name: 'page-mode',
+	        	 id: 'page-mode-new',
+	        	 inputValue: 'new',
+	        	 checked: true,
+	        	 listeners : {'check': function (box, checked) {org.ametys.ugc.content.Accept._form.getForm().findField('parent-page').setDisabled(!checked); org.ametys.ugc.content.Accept._form.getForm().findField('page').clearInvalid();}}
+	         }));
+	
+	items.push(new org.ametys.cms.widgets.SitemapWidget({
+	                name: 'parent-page',
+	                fieldLabel:  "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_PAGE_MODE_NEW_PAGE"/>",
+	                desc: "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_PAGE_MODE_NEW_PAGE_DESC"/>",
+	                width: 260,
+	                siteName: context.parameters.siteName,
+	                allowCreation: false
+	         }));
+	         
+	items.push(new Ext.form.Radio ({
+	        	 boxLabel : "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_PAGE_MODE_AFFECT"/>",
+	        	 hideLabel: true,
+	        	 itemCls: 'ametys-input radio',
+	        	 name: 'page-mode',
+	        	 id: 'page-mode-affect',
+	        	 inputValue: 'affect',
+	        	 listeners : {'check': function (box, checked) {org.ametys.ugc.content.Accept._form.getForm().findField('page').setDisabled(!checked)}}
+	         }));
+	         
+	items.push(new org.ametys.cms.widgets.SitemapWidget({
+	                name: 'page',
+	                fieldLabel:  "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_PAGE_MODE_AFFECT_PAGE"/>",
+	                desc: "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_PAGE_MODE_AFFECT_PAGE_DESC"/>",
+	                width: 260,
+	                disabled: true,
+	                siteName: context.parameters.siteName,
+	                allowCreation: false
+	         }));
+	         
+	items.push(new Ext.form.Radio ({
+	        	 boxLabel : "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_PAGE_MODE_NONE"/>",
+	        	 hideLabel: true,
+	        	 itemCls: 'ametys-input radio',
+	        	 cls: 'radio',
+	        	 name: 'page-mode',
+	        	 inputValue: 'none',
+	        	 listeners : {'check': function (box, checked) {org.ametys.ugc.content.Accept._form.getForm().findField('page').clearInvalid();}}
+	         }));
+	
+	items.push(new org.ametys.HtmlContainer ({cls: 'hint', html: "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_ACCEPT_HINT_3"/>"}));
+	
 	org.ametys.ugc.content.Accept._form = new Ext.FormPanel ({
 		border: false,
 		autoScroll: true,
@@ -94,56 +165,7 @@
 		defaults: {
 			msgTarget: 'side'
 		},
-		items: [ new org.ametys.HtmlContainer ({cls: 'hint', html: "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_ACCEPT_HINT_1"/>"}),
-		         org.ametys.ugc.content.Accept._cType,
-		         new org.ametys.HtmlContainer ({cls: 'hint', html: "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_ACCEPT_HINT_2"/>"}),
-		         new Ext.form.Radio ({
-		        	 boxLabel : "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_PAGE_MODE_NEW"/>",
-		        	 hideLabel: true,
-		        	 itemCls: 'ametys-input radio',
-		        	 name: 'page-mode',
-		        	 id: 'page-mode-new',
-		        	 inputValue: 'new',
-		        	 checked: true,
-		        	 listeners : {'check': function (box, checked) {org.ametys.ugc.content.Accept._form.getForm().findField('parent-page').setDisabled(!checked); org.ametys.ugc.content.Accept._form.getForm().findField('page').clearInvalid();}}
-		         }),
-		         new org.ametys.cms.widgets.SitemapWidget({
-		                name: 'parent-page',
-		                fieldLabel:  "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_PAGE_MODE_NEW_PAGE"/>",
-		                desc: "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_PAGE_MODE_NEW_PAGE_DESC"/>",
-		                width: 260,
-		                siteName: context.parameters.siteName,
-		                allowCreation: false
-		         }),
-		         new Ext.form.Radio ({
-		        	 boxLabel : "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_PAGE_MODE_AFFECT"/>",
-		        	 hideLabel: true,
-		        	 itemCls: 'ametys-input radio',
-		        	 name: 'page-mode',
-		        	 id: 'page-mode-affect',
-		        	 inputValue: 'affect',
-		        	 listeners : {'check': function (box, checked) {org.ametys.ugc.content.Accept._form.getForm().findField('page').setDisabled(!checked)}}
-		         }),
-		         new org.ametys.cms.widgets.SitemapWidget({
-		                name: 'page',
-		                fieldLabel:  "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_PAGE_MODE_AFFECT_PAGE"/>",
-		                desc: "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_PAGE_MODE_AFFECT_PAGE_DESC"/>",
-		                width: 260,
-		                disabled: true,
-		                siteName: context.parameters.siteName,
-		                allowCreation: false
-		         }),
-		         new Ext.form.Radio ({
-		        	 boxLabel : "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_PAGE_MODE_NONE"/>",
-		        	 hideLabel: true,
-		        	 itemCls: 'ametys-input radio',
-		        	 cls: 'radio',
-		        	 name: 'page-mode',
-		        	 inputValue: 'none',
-		        	 listeners : {'check': function (box, checked) {org.ametys.ugc.content.Accept._form.getForm().findField('page').clearInvalid();}}
-		         }),
-		         new org.ametys.HtmlContainer ({cls: 'hint', html: "<i18n:text i18n:key="PLUGINS_UGC_CONTENT_ACCEPT_HINT_3"/>"})
-		]
+		items: items
 	});
 		        
 	org.ametys.ugc.content.Accept.box = new org.ametys.DialogBox({
@@ -175,6 +197,26 @@
 	return true;
 }
 
+org.ametys.ugc.content.Accept._showBox = function ()
+{
+	if (org.ametys.ugc.content.Accept.contentType)
+	{
+		if (org.ametys.ugc.content.Accept.contentTypeHint)
+		{
+			org.ametys.ugc.content.Accept._cType.hide();
+			org.ametys.ugc.content.Accept._cTypeHint.hide();
+			
+			org.ametys.ugc.content.Accept.box.defaultButton = org.ametys.ugc.content.Accept._form.getForm().findField('page-mode');
+		}
+	}
+	else
+	{
+		org.ametys.ugc.content.Accept._contentTypeHint.hide();
+	}
+	
+	org.ametys.ugc.content.Accept.box.show();
+}
+
 org.ametys.ugc.content.Accept.ok = function ()
 {
 	var form = org.ametys.ugc.content.Accept._form.getForm();
@@ -183,9 +225,19 @@
 		return;
 	}
 	
+	var contentType;
+	if (org.ametys.ugc.content.Accept.contentType)
+	{
+		contentType = org.ametys.ugc.content.Accept.contentType;
+	}
+	else
+	{
+		contentType = form.findField('content-type').getValue();
+	}
+	
 	var params = {
 		'ids': org.ametys.ugc.content.Accept._contentIds,
-		'content-type': form.findField('content-type').getValue()
+		'content-type': contentType
 	}
 	
 	var mode = form.findField('page-mode').getGroupValue();
