This commit is contained in:
Laurent Destailleur 2011-11-02 14:14:46 +01:00
parent 4c95c486f6
commit e764f2137d
2 changed files with 28 additions and 25 deletions

View File

@ -2662,6 +2662,7 @@ function dol_print_error_email()
/**
* Show title line of an array
*
* @param name Label of field
* @param file Url used when we click on sort picto
* @param field Field to use for new sorting
@ -4275,24 +4276,26 @@ function picto_from_langcode($codelang)
/**
* Complete or removed entries into a head array (used to build tabs) with value added by external modules
*
* @param conf Object conf
* @param langs Object langs
* @param object Object object
* @param head Object head
* @param h New position to fill
* @param type Value for object where objectvalue can be
* 'thirdparty' to add a tab in third party view
* 'intervention' to add a tab in intervention view
* 'supplier_order' to add a tab in supplier order view
* 'supplier_invoice' to add a tab in supplier invoice view
* 'invoice' to add a tab in customer invoice view
* 'order' to add a tab in customer order view
* 'product' to add a tab in product view
* 'propal' to add a tab in propal view
* 'member' to add a tab in fundation member view
* 'categories_x' to add a tab in category view ('x': type of category (0=product, 1=supplier, 2=customer, 3=member)
* @param mode 'add' to complete head, 'remove' to remove entries
* @return void
* @param Conf $conf Object conf
* @param Translate $langs Object langs
* @param Object $object Object object
* @param array $head Object head
* @param int $h New position to fill
* @param string $type Value for object where objectvalue can be
* 'thirdparty' to add a tab in third party view
* 'intervention' to add a tab in intervention view
* 'supplier_order' to add a tab in supplier order view
* 'supplier_invoice' to add a tab in supplier invoice view
* 'invoice' to add a tab in customer invoice view
* 'order' to add a tab in customer order view
* 'product' to add a tab in product view
* 'propal' to add a tab in propal view
* 'user' to add a tab in user view
* 'group' to add a tab in group view
* 'member' to add a tab in fundation member view
* 'categories_x' to add a tab in category view ('x': type of category (0=product, 1=supplier, 2=customer, 3=member)
* @param string $mode 'add' to complete head, 'remove' to remove entries
* @return void
*/
function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode='add')
{
@ -4301,11 +4304,13 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode=
foreach ($conf->tabs_modules[$type] as $value)
{
$values=explode(':',$value);
if ($mode == 'add')
{
if (count($values) == 6) // new declaration with permissions
{
if ($values[0] != $type) continue;
//print 'ee'.$values[4];
if (verifCond($values[4]))
{
if ($values[3]) $langs->load($values[3]);

View File

@ -337,7 +337,7 @@ if ($action == 'update' && ! $_POST["cancel"])
{
$edituser->entity = (empty($_POST["entity"]) ? 0 : $_POST["entity"]);
}
if (GETPOST('deletephoto')) $edituser->photo='';
if (! empty($_FILES['photo']['name'])) $edituser->photo = dol_sanitizeFileName($_FILES['photo']['name']);
@ -509,7 +509,7 @@ if ($action == 'adduserldap')
/*
* Affichage page
* View
*/
llxHeader('',$langs->trans("UserCard"));
@ -860,9 +860,9 @@ if (($action == 'create') || ($action == 'adduserldap'))
print '<td><input size="30" type="text" name="phenix_pass" value="'.$_POST["phenix_pass"].'"></td></tr>';
}
print "</table>\n";
print '<center><br><input class="button" value="'.$langs->trans("CreateUser").'" name="create" type="submit"></center>';
print "</form>";
}
else
@ -923,9 +923,7 @@ else
}
}
/*
* Affichage onglets
*/
// Show tabs
$head = user_prepare_head($fuser);
$title = $langs->trans("User");