Index: extensions/event_cats/admin/evntcats_admin.php
===================================================================
--- extensions/event_cats/admin/evntcats_admin.php	(revision 4011)
+++ extensions/event_cats/admin/evntcats_admin.php	(revision 4019)
@@ -72,14 +72,17 @@
 // +-----------------------------------------------------------------------+
 
-// Effectuer quand même un test sur $_POST['act1'] : si demande de création d'entré, mais
-// que cette demande ne peut aboutir, rediriger sur page création d'entrée ; sinon sur entrées existantes.
-
 $page['tab'] = (!($ec_exist_entries = (mysql_fetch_row(pwg_query('
   SELECT * FROM `'.EVNTCATS_TABLE.'`
   WHERE `code` IS NOT NULL
 '))))) ? 'autolog_new' : 'autolog_entries';
-if (isset($_POST['ec_act1']) and
- ($_POST['ec_act1'] == 'autolog_new' or $_POST['ec_act1'] == 'duplicate_entry'))
-    $page['tab'] = 'autolog_new';
+if (isset($_POST['ec_act1'])) {
+  if (
+    $_POST['ec_act1'] == 'autolog_new' or
+    $_POST['ec_act1'] == 'duplicate_entry'
+  )
+   $page['tab'] = 'autolog_new';
+  else if ($_POST['ec_act1'] == 'create')
+   $page['tab'] = (ec_create_entry_OK()) ? 'autolog_entries' : 'autolog_new';
+}
 else if (isset($_GET['tab'])) switch ($_GET['tab']) {
   case 'autolog_new':
Index: extensions/event_cats/admin/template/autolog_new.js
===================================================================
--- extensions/event_cats/admin/template/autolog_new.js	(revision 4011)
+++ extensions/event_cats/admin/template/autolog_new.js	(revision 4019)
@@ -23,5 +23,5 @@
   document.getElementById(ec_selected_user).checked = 'checked';
   switch (ec_selected_user) {
-    case 'ec_sel_user_none': // None
+    /* case 'ec_sel_user_none': // None
       ec_selected_action =
        (ec_ap_ok && (ec_selected_action != 'ec_input_action_home')) ?
@@ -30,5 +30,5 @@
       document.getElementById('ec_in_up_psd_txt_id').value = '';
       document.getElementById('ec_in_up_usr_list_id').value = '-1';
-    break;
+    break; */
     case 'ec_sel_user_new': // New user
       document.getElementById('ec_in_up_usr_txt_id').value =
@@ -68,6 +68,6 @@
         document.getElementById('ec_in_up_cats_id').value = ec_selected_cat;
         document.getElementById('ec_in_up_imgs_id').value = '';
-        ec_selected_user = (ec_selected_user == 'ec_sel_user_none') ?
-         'ec_sel_user_old' : ec_selected_user;
+        /* ec_selected_user = (ec_selected_user == 'ec_sel_user_none') ?
+         'ec_sel_user_old' : ec_selected_user; */
         document.getElementById('ec_in_up_imgs_warn').innerHTML = '';
       break;
@@ -76,6 +76,6 @@
         document.getElementById('ec_in_up_cats_id').value = ec_selected_cat;
         document.getElementById('ec_in_up_imgs_id').value = ec_selected_img;
-        ec_selected_user = (ec_selected_user == 'ec_sel_user_none') ?
-         'ec_sel_user_old' : ec_selected_user;
+        /* ec_selected_user = (ec_selected_user == 'ec_sel_user_none') ?
+         'ec_sel_user_old' : ec_selected_user; */
         ec_check_img_text();
       break;
@@ -237,4 +237,25 @@
 }
 
+function ec_check_submit() {
+  if (document.getElementById('ec_in_up_code_id').value == '') {
+    alert(ec_JS_message['ec_submit_code_miss']);
+    return false;
+  }
+  if ((
+    document.getElementById('ec_sel_user_new').checked != '' &&
+    document.getElementById('ec_in_up_usr_txt_id').value == ''
+    ) || (
+    document.getElementById('ec_sel_user_old').checked != '' &&
+    document.ec_new_code.ec_in_up_usr_list.value == '-1'
+    ) || (
+    document.getElementById('ec_sel_user_new').checked == '' &&
+    document.getElementById('ec_sel_user_old').checked == ''
+    )
+  ) {
+    alert(ec_JS_message['ec_submit_user_miss']);
+    return false;
+  }
+}
+
 function ec_test() {
   alert('OK.');
@@ -254,8 +275,8 @@
   ec_old_new_psd_text = '';
   ec_test_reg = '';
-  document.getElementById('ec_act1_id').value = '';
+  document.getElementById('ec_act1_id').value = 'create';
   document.getElementById('ec_in_up_pwd_warn').innerHTML = '';
-  document.getElementById('ec_sel_user_none').checked = 'checked';
-  document.getElementById('ec_sel_user_none').checked = '';
+  document.getElementById('ec_sel_user_new').checked = 'checked';
+  document.getElementById('ec_sel_user_new').checked = '';
   document.getElementById('ec_input_action_home').checked = 'checked';
   document.getElementById('ec_input_action_home').checked = '';
Index: extensions/event_cats/admin/template/autolog_new.tpl
===================================================================
--- extensions/event_cats/admin/template/autolog_new.tpl	(revision 4011)
+++ extensions/event_cats/admin/template/autolog_new.tpl	(revision 4019)
@@ -41,5 +41,5 @@
 
 {* <!-- Parameters list --> *}
-<form class = "filter" method = "post" name = "ec_new_code" action = "">
+<form class = "filter" method = "post" name = "ec_new_code" action = "" onsubmit = "return ec_check_submit();">
   <input type = "hidden" id = "ec_act1_id" name = "ec_act1" />
   
@@ -199,6 +199,6 @@
   </table>
   <p>
-    <input class = "submit" type = "submit{* button *}" {* name = "ec_submit" *} value = "{'Submit'|@translate}" onclick = "ec_validate();"/>
-    <input class = "submit" type = "reset" {* name = "ec_reset" *} value = "{'Reset'|@translate}" onclick = "ec_init();"/>
+    <input class = "submit" type = "submit" value = "{'Submit'|@translate}"/>
+    <input class = "submit" type = "reset" value = "{'Reset'|@translate}" onclick = "ec_init();"/>
   </p>
 </form>
@@ -211,4 +211,6 @@
   ec_JS_message['ec_new_pwd_gen']       = "{'ec_new_pwd_gen'|@translate|@escape:javascript}";
   ec_JS_message['ec_up_code_lbl_home']  = "{'ec_up_code_lbl_home'|@translate}";
+  ec_JS_message['ec_submit_code_miss']  = "{'ec_submit_code_miss'|@translate}";
+  ec_JS_message['ec_submit_user_miss']  = "{'ec_submit_user_miss'|@translate}";
   ec_init();
 //--></script>
