Index: /extensions/user_custom_fields/admin.php
===================================================================
--- /extensions/user_custom_fields/admin.php	(revision 32697)
+++ /extensions/user_custom_fields/admin.php	(revision 32698)
@@ -3,5 +3,5 @@
 // | User Custom Fields plugin for Piwigo by TEMMII                        |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2016-2021 ddtddt               http://temmii.com/piwigo/ |
+// | Copyright(C) 2016-2022 ddtddt               http://temmii.com/piwigo/ |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/user_custom_fields/admin.tpl
===================================================================
--- /extensions/user_custom_fields/admin.tpl	(revision 32697)
+++ /extensions/user_custom_fields/admin.tpl	(revision 32698)
@@ -46,4 +46,9 @@
   jQuery("#addinfoClose").click(function(){
     jQuery("#add_info_edit").hide();
+  });
+  
+   jQuery("#addinfoClose2").click(function(){
+    window.location.href = "admin.php?page=user_list";
+    return false;
   });
 
@@ -276,5 +281,5 @@
   <p class="actionButtons">
 	<input class="submit" name="submitUCFa" type="submit" value="{'Submit'|@translate}" />
-	<a href="#" id="addinfoClose">{'Cancel'|@translate}</a>
+	<a href="#" id="addinfoClose2">{'Cancel'|@translate}</a>
   </p>
  </fieldset>
Index: /extensions/user_custom_fields/include/function.inc.php
===================================================================
--- /extensions/user_custom_fields/include/function.inc.php	(revision 32697)
+++ /extensions/user_custom_fields/include/function.inc.php	(revision 32698)
@@ -4,5 +4,5 @@
 // | User Custom Fields plugin for Piwigo by TEMMII                        |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2016-2021 ddtddt               http://temmii.com/piwigo/ |
+// | Copyright(C) 2016-2022 ddtddt               http://temmii.com/piwigo/ |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/user_custom_fields/initadmin.php
===================================================================
--- /extensions/user_custom_fields/initadmin.php	(revision 32697)
+++ /extensions/user_custom_fields/initadmin.php	(revision 32698)
@@ -3,5 +3,5 @@
 // | User Custom Fields plugin for Piwigo by TEMMII                        |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2016-2021 ddtddt               http://temmii.com/piwigo/ |
+// | Copyright(C) 2016-2022 ddtddt               http://temmii.com/piwigo/ |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
@@ -20,15 +20,4 @@
 // +-----------------------------------------------------------------------+
 
-//add admin menu
-/*
-add_event_handler('get_admin_plugin_menu_links', 'user_custom_fields_admin_menu');
-function user_custom_fields_admin_menu($menu){
-    $menu[] = array(
-        'NAME' => l10n('User custom fields'),
-        'URL' => UCF_ADMIN,
-    );
-     return $menu;
-}*/
-
 //ajouter filtre sur page option pour supprimer email obligatoire
 
@@ -40,10 +29,131 @@
 }
  
-function ucf_add_popin_prefilter($content, &$smarty){
-  $search = '#</div>\s*<div class="userPropertiesSet userPrefs">#ms';
-  return preg_replace($search, '<div class="userProperty"><a href="'.UCF_ADMIN.'-edit_user&amp;ucfiduser=<%- user.id %>&amp;ucfusername=<%- user.username %>"><span class="icon-pencil"></span>{\'Edit custom fields\'|@translate}</a></div></div><div class="userPropertiesSet userPrefs">', $content);
+function ucf_add_popin_prefilter($content){
+  // add js link
+  $search = '<div class="selection-mode-group-manager" style="right:30px">';
+  $replace = '{combine_script id="jquery.ucf" load=\'footer\' path="$UCF_PATH2/js/ucf.js"}';
+  $content = str_replace($search, $replace.$search, $content);
+
+//css
+  $search = '</style>';
+  $replace = '
+.user-property-user-ucf {
+    margin-bottom:34px;
+    height:20px;
+    color: #000;
+    cursor: pointer;
 }
 
-function ucf_config_prefilter($content, &$smarty){
+.user-ucf-title {
+    font-size:1em;
+}
+
+		  ';
+  $content = str_replace($search, $replace.$search, $content);
+	
+  $search = '<div id="UserList" class="UserListPopIn">
+
+  <div class="UserListPopInContainer">
+
+    <a class="icon-cancel CloseUserList"></a>
+    <div class="summary-properties-update-container">
+      <div class="summary-properties-container">
+        <div class="summary-container">
+          <div class="user-property-initials">
+            <div>
+              <span class="icon-blue"><!-- Initials (JP) --></span>
+            </div>
+          </div>
+          <div class="user-property-username">
+            <span class="edit-username-title"><!-- Name (Jessy Pinkman) --></span>
+            <span class="edit-username-specifier"><!-- You specifire (you) --></span>
+            <span class="edit-username icon-pencil"></span>
+          </div>
+          <div class="user-property-username-change">
+            <div class="summary-input-container">
+              <input class="user-property-input user-property-input-username" value="" placeholder="{\'Username\'|@translate}" />
+            </div>
+            <span class="icon-ok edit-username-validate"></span>
+            <span class="icon-cancel-circled edit-username-cancel"></span>
+          </div>
+          <div class="user-property-password-container">
+            <div class="user-property-password edit-password">
+              <p class="user-property-button"><span class="icon-key user-edit-icon"> </span>{\'Change Password\'|@translate}</p>
+            </div>
+            <div class="user-property-password-change">
+              <div class="summary-input-container">
+              <input class="user-property-input user-property-input-password" value="" placeholder="{\'Password\'|@translate}" />
+              </div>
+              <span class="icon-ok edit-password-validate"></span>
+              <span class="icon-cancel-circled edit-password-cancel"></span>
+            </div>
+            <div class="user-property-permissions">
+              <p class="user-property-button"> <span class="icon-lock user-edit-icon"> </span><a href="#" >{\'Permissions\'|@translate}</a></p>
+            </div>
+          </div>
+          <div class="user-property-register-visit">
+            <span class="user-property-register"><!-- Registered date XX/XX/XXXX --></span>
+            <span class="icon-calendar"></span>
+            <span class="user-property-last-visit"><!-- Last Visit date XX/XX/XXXX --></span>
+          </div>
+        </div>
+        <div class="properties-container">
+          <div class="user-property-column-title">
+            <p>{\'Properties\'|@translate}</p>
+          </div>
+          <div class="user-property-email">
+            <p class="user-property-label">{\'Email Adress\'|@translate}</p>
+            <input type="text" class="user-property-input" value="contact@jessy-pinkman.com" disabled="false"/>
+          </div>
+          <div class="user-property-status">
+            <p class="user-property-label">{\'Status\'|@translate}
+                <span class="icon-help-circled" 
+                  title="<div class=\'tooltip-status-content\'>
+                    <div class=\'tooltip-status-row\'><span class=\'tooltip-col1\'>{\'user_status_webmaster\'|translate}</span><span class=\'tooltip-col2\'>{\'Has access to all administration functionnalities. Can manage both configuration and content.\'|translate}</span></div>
+                    <div class=\'tooltip-status-row\'><span class=\'tooltip-col1\'>{\'user_status_admin\'|translate}</span><span class=\'tooltip-col2\'>{\'Has access to administration. Can only manage content: photos/albums/users/tags/groups.\'|translate}</span></div>
+                    <div class=\'tooltip-status-row\'><span class=\'tooltip-col1\'>{\'user_status_normal\'|translate}</span><span class=\'tooltip-col2\'>{\'No access to administration, can see private content with appropriate permissions.\'|translate}</span></div>
+                    <div class=\'tooltip-status-row\'><span class=\'tooltip-col1\'>{\'user_status_generic\'|translate}</span><span class=\'tooltip-col2\'>{\'Can be shared by several individuals without conflict (they cannot change the password).\'|translate}</span></div>
+                    <div class=\'tooltip-status-row\'><span class=\'tooltip-col1\'>{\'user_status_guest\'|translate}</span><span class=\'tooltip-col2\'>{\'Equivalent to deactivation. The user is still in the list, but can no longer log in.\'|translate}</span></div>
+                  </div">
+                </span>
+            </p>
+            <div class="user-property-select-container">
+              <select name="status" class="user-property-select">
+                <option value="webmaster">{\'user_status_webmaster\'|@translate}</option>
+                <option value="admin">{\'user_status_admin\'|@translate}</option>
+                <option value="normal">{\'user_status_normal\'|@translate}</option>
+                <option value="generic">{\'user_status_generic\'|@translate}</option>
+                <option value="guest">{\'user_status_guest\'|@translate}  ({\'Deactivated\'|@translate})</option>
+              </select>
+            </div>
+          </div>
+          <div class="user-property-level">
+            <p class="user-property-label">{\'Privacy level\'|@translate}</p>
+            <div class="user-property-select-container">
+              <select name="privacy" class="user-property-select">
+                <option value="0">{\'Level 0\'|@translate}</option>
+                <option value="1">{\'Level 1\'|@translate}</option>
+                <option value="2">{\'Level 2\'|@translate}</option>
+                <option value="4">{\'Level 4\'|@translate}</option>
+                <option value="8">{\'Level 8\'|@translate}</option>
+              </select>
+            </div>
+          </div>
+          <div class="user-property-group-container">
+            <p class="user-property-label">{\'Groups\'|@translate}</p>
+            <div class="user-property-select-container user-property-group">
+              <select class="user-property-select" data-selectize="groups" placeholder="{\'Select groups or type them\'|translate}" 
+                name="group_id[]" multiple style="box-sizing:border-box;"></select>
+            </div>
+          </div>';
+	
+  $replace = '<div class="user-property-user-ucf">
+            <span class="user-ucf-title"><span class="icon-pencil"></span><a data-url="{$UCF_ADMIN2}" href="#" >{\'Edit custom fields\'|@translate}</a></span>
+          </div>';
+		 
+  return str_replace($search,$search.$replace, $content);
+}
+
+function ucf_config_prefilter($content){
   $search = '#(<li>
         <label class="font-checkbox">
Index: /extensions/user_custom_fields/initprofile.php
===================================================================
--- /extensions/user_custom_fields/initprofile.php	(revision 32697)
+++ /extensions/user_custom_fields/initprofile.php	(revision 32698)
@@ -3,5 +3,5 @@
 // | User Custom Fields plugin for Piwigo by TEMMII                        |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2016-2021 ddtddt               http://temmii.com/piwigo/ |
+// | Copyright(C) 2016-2022 ddtddt               http://temmii.com/piwigo/ |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
@@ -30,5 +30,5 @@
 }
 
-function ucfPT($content, &$smarty){
+function ucfPT($content){
   $search = '/(<legend>{\'Registration).*({if \$ALLOW_USER_CUSTOMIZATION}
   <fieldset>)/is';
Index: /extensions/user_custom_fields/initregister.php
===================================================================
--- /extensions/user_custom_fields/initregister.php	(revision 32697)
+++ /extensions/user_custom_fields/initregister.php	(revision 32698)
@@ -3,5 +3,5 @@
 // | User Custom Fields plugin for Piwigo by TEMMII                        |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2016-2021 ddtddt               http://temmii.com/piwigo/ |
+// | Copyright(C) 2016-2022 ddtddt               http://temmii.com/piwigo/ |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
@@ -30,5 +30,5 @@
 }
 
-function ucfIT($content, &$smarty){
+function ucfIT($content){
   $search = '/(<fieldset>).*(<\/fieldset>)/is';
   return preg_replace($search, '{$UCF_REGISTER_ADD}', $content);
Index: /extensions/user_custom_fields/js/ucf.js
===================================================================
--- /extensions/user_custom_fields/js/ucf.js	(revision 32698)
+++ /extensions/user_custom_fields/js/ucf.js	(revision 32698)
@@ -0,0 +1,13 @@
+$( document ).ready(function() {
+    $('.user-property-user-ucf').click(function () {
+
+        var user_id=$(".user-property-permissions a").attr("href");
+		var user_name=$(".edit-username-title").text();
+		var ucf=$('.user-property-user-ucf a').data('url');
+		user_name=user_name.split("guest");
+		user_id=user_id.split("=");
+		var url=ucf+"-edit_user&ucfiduser="+user_id[2]+"&ucfusername="+user_name[0];
+	window.location.href = url;
+    return false;
+    })
+});
Index: /extensions/user_custom_fields/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/user_custom_fields/language/en_UK/plugin.lang.php	(revision 32697)
+++ /extensions/user_custom_fields/language/en_UK/plugin.lang.php	(revision 32698)
@@ -3,5 +3,5 @@
 // | User Custom Fields plugin for Piwigo by TEMMII                        |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2016-2021 ddtddt               http://temmii.com/piwigo/ |
+// | Copyright(C) 2016-2022 ddtddt               http://temmii.com/piwigo/ |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/user_custom_fields/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/user_custom_fields/language/fr_FR/plugin.lang.php	(revision 32697)
+++ /extensions/user_custom_fields/language/fr_FR/plugin.lang.php	(revision 32698)
@@ -3,5 +3,5 @@
 // | User Custom Fields plugin for Piwigo by TEMMII                        |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2016-2021 ddtddt               http://temmii.com/piwigo/ |
+// | Copyright(C) 2016-2022 ddtddt               http://temmii.com/piwigo/ |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/user_custom_fields/main.inc.php
===================================================================
--- /extensions/user_custom_fields/main.inc.php	(revision 32697)
+++ /extensions/user_custom_fields/main.inc.php	(revision 32698)
@@ -13,5 +13,5 @@
 // | User Custom Fields plugin for Piwigo by TEMMII                        |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2016-2021 ddtddt               http://temmii.com/piwigo/ |
+// | Copyright(C) 2016-2022 ddtddt               http://temmii.com/piwigo/ |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
@@ -43,7 +43,14 @@
 include_once(UCF_PATH . 'include/function.inc.php');
 
-add_event_handler('loading_lang', 'user_custom_fields_loading_lang');	  
+add_event_handler('init', 'user_custom_fields_loading_lang');	  
 function user_custom_fields_loading_lang(){
   load_language('plugin.lang', UCF_PATH);
+  global $template;
+  $template->assign(
+    array(
+	 'UCF_PATH2'=> UCF_PATH,
+	 'UCF_ADMIN2'=> UCF_ADMIN,
+    )
+  );
 }
 
Index: /extensions/user_custom_fields/maintain.class.php
===================================================================
--- /extensions/user_custom_fields/maintain.class.php	(revision 32697)
+++ /extensions/user_custom_fields/maintain.class.php	(revision 32698)
@@ -3,5 +3,5 @@
 // | User Custom Fields plugin for Piwigo by TEMMII                        |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2016-2021 ddtddt               http://temmii.com/piwigo/ |
+// | Copyright(C) 2016-2022 ddtddt               http://temmii.com/piwigo/ |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
