2
0
forked from Wavyzz/dolibarr

code syntax project

This commit is contained in:
Frédéric FRANCE
2021-02-26 18:49:22 +01:00
parent 50ae2d33b2
commit a82df7e6ea
39 changed files with 5067 additions and 4218 deletions

View File

@@ -38,13 +38,17 @@ $form = new Form($db);
// List of supported format
$tmptype2label = ExtraFields::$type2label;
$type2label = array('');
foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val);
foreach ($tmptype2label as $key => $val) {
$type2label[$key] = $langs->transnoentitiesnoconv($val);
}
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');
$elementtype = 'projet'; //Must be the $table_element of the class that manage extrafield
if (!$user->admin) accessforbidden();
if (!$user->admin) {
accessforbidden();
}
/*
@@ -77,8 +81,7 @@ print dol_get_fiche_end();
// Buttons
if ($action != 'create' && $action != 'edit')
{
if ($action != 'create' && $action != 'edit') {
print '<div class="tabsAction">';
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"]."?action=create\">".$langs->trans("NewAttribute").'</a></div>';
print "</div>";
@@ -91,8 +94,7 @@ if ($action != 'create' && $action != 'edit')
/* */
/* ************************************************************************** */
if ($action == 'create')
{
if ($action == 'create') {
print "<br>";
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -104,8 +106,7 @@ if ($action == 'create')
/* Edition of an optional field */
/* */
/* ************************************************************************** */
if ($action == 'edit' && !empty($attrname))
{
if ($action == 'edit' && !empty($attrname)) {
print "<br>";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));