mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
remove fieldlabel and add fieldeditkey
This commit is contained in:
parent
f29ee25ea7
commit
d67c40dffe
|
|
@ -1017,7 +1017,7 @@ else
|
|||
// Categories
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
{
|
||||
print '<tr><td>' . fieldLabel('Categories', 'memcars') . '</td><td>';
|
||||
print '<tr><td>' .$form->editfieldkey("Categories", 'memcats', '', $object, 0) . '</td><td>';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_MEMBER, null, 'parent', null, null, 1);
|
||||
print $form->multiselectarray('memcats', $cate_arbo, GETPOST('memcats', 'array'), null, null, null, null, '100%');
|
||||
print "</td></tr>";
|
||||
|
|
@ -1140,7 +1140,7 @@ else
|
|||
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").' / '.$langs->trans("Id").'</span></td><td><input type="text" name="login" class="minwidth300" maxlength="50" value="'.(isset($_POST["login"])?GETPOST("login",'alpha',2):$object->login).'"></td></tr>';
|
||||
}
|
||||
|
||||
// Password
|
||||
// Password
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td><td><input type="password" name="pass" class="minwidth300" maxlength="50" value="'.(isset($_POST["pass"])?GETPOST("pass",'',2):$object->pass).'"></td></tr>';
|
||||
|
|
@ -1267,7 +1267,7 @@ else
|
|||
// Categories
|
||||
if (! empty( $conf->categorie->enabled ) && !empty( $user->rights->categorie->lire ))
|
||||
{
|
||||
print '<tr><td>' . fieldLabel('Categories', 'memcats') . '</td>';
|
||||
print '<tr><td>' . $form->editfieldkey("Categories", 'memcats', '', $object, 0) . '</td>';
|
||||
print '<td>';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_MEMBER, null, null, null, null, 1);
|
||||
$c = new Categorie($db);
|
||||
|
|
@ -1620,11 +1620,8 @@ else
|
|||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans("LinkedToDolibarrThirdParty");
|
||||
print '</td>';
|
||||
if ($action != 'editthirdparty' && $user->rights->adherent->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editthirdparty&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
$editenable = $user->rights->adherent->creer;
|
||||
print $form->editfieldkey('LinkedToDolibarrThirdParty', 'thirdparty', '', $object, $editenable);
|
||||
print '</td><td colspan="2" class="valeur">';
|
||||
if ($action == 'editthirdparty')
|
||||
{
|
||||
|
|
@ -1658,19 +1655,8 @@ else
|
|||
|
||||
// Login Dolibarr
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans("LinkedToDolibarrUser");
|
||||
print '</td>';
|
||||
if ($action != 'editlogin' && $user->rights->adherent->creer)
|
||||
{
|
||||
print '<td align="right">';
|
||||
if ($user->rights->user->user->creer)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=editlogin&rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToUser'),1).'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
$editenable = $user->rights->adherent->creer && $user->rights->user->user->creer;
|
||||
print $form->editfieldkey('LinkedToDolibarrUser', 'login', '', $object, $editenable);
|
||||
print '</td><td colspan="2" class="valeur">';
|
||||
if ($action == 'editlogin')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -106,7 +106,8 @@ $permissionedit = $user->rights->commande->creer; // Used by the include of ac
|
|||
*/
|
||||
|
||||
$parameters = array('socid' => $socid);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
// Note that $action and $object may be modified by some hooks
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
if (empty($reshook))
|
||||
|
|
@ -419,10 +420,11 @@ if (empty($reshook))
|
|||
|
||||
// Hooks
|
||||
$parameters = array('objFrom' => $srcobject);
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been
|
||||
// modified by hook
|
||||
if ($reshook < 0)
|
||||
// Note that $action and $object may have be modified by hook
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action);
|
||||
if ($reshook < 0) {
|
||||
$error++;
|
||||
}
|
||||
} else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
|
|
@ -1669,7 +1671,8 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||
|
||||
// Other attributes
|
||||
$parameters = array('objectsrc' => $objectsrc, 'socid'=>$socid);
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by
|
||||
// Note that $action and $object may be modified by hook
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)) {
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
|
|
@ -1969,7 +1972,8 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||
|
||||
// Call Hook formConfirm
|
||||
$parameters = array('lineid' => $lineid);
|
||||
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
// Note that $action and $object may be modified by hook
|
||||
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action);
|
||||
if (empty($reshook)) $formconfirm.=$hookmanager->resPrint;
|
||||
elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint;
|
||||
|
||||
|
|
@ -2095,7 +2099,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||
|
||||
// Delivery date planed
|
||||
print '<tr><td>';
|
||||
$editenable = $user->rights->commande->creer && $object->statut == Commande::STATUS_DRAFT;
|
||||
$editenable = $user->rights->commande->creer;
|
||||
print $form->editfieldkey("DateDeliveryPlanned", 'date_livraison', '', $object, $editenable);
|
||||
print '</td><td>';
|
||||
if ($action == 'editdate_livraison') {
|
||||
|
|
@ -2420,7 +2424,8 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||
$object->formAddObjectLine(1, $mysoc, $soc);
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
// Note that $action and $object may be modified by hook
|
||||
$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action);
|
||||
}
|
||||
}
|
||||
print '</table>';
|
||||
|
|
@ -2437,8 +2442,8 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||
print '<div class="tabsAction">';
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
|
||||
// modified by hook
|
||||
// Note that $action and $object may be modified by hook
|
||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action);
|
||||
if (empty($reshook)) {
|
||||
// Send
|
||||
if ($object->statut > Commande::STATUS_DRAFT) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user