Merge branch 'Dolibarr:develop' into develop
This commit is contained in:
commit
96a09543e9
@ -1202,12 +1202,8 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
print "</form>\n";
|
||||
} else /* *************************************************************************** */
|
||||
/* */
|
||||
/* Mode vue et edition */
|
||||
/* */
|
||||
/* *************************************************************************** */
|
||||
{
|
||||
} else {
|
||||
// View and edit mode
|
||||
$now = dol_now();
|
||||
|
||||
if ($object->id > 0) {
|
||||
|
||||
@ -4727,7 +4727,7 @@ class Form
|
||||
foreach ($formquestion as $key => $input) {
|
||||
if (is_array($input) && !empty($input)) {
|
||||
if ($input['type'] == 'hidden') {
|
||||
$more .= '<input type="hidden" id="'.$input['name'].'" name="'.$input['name'].'" value="'.dol_escape_htmltag($input['value']).'">'."\n";
|
||||
$more .= '<input type="hidden" id="'.dol_escape_htmltag($input['name']).'" name="'.dol_escape_htmltag($input['name']).'" value="'.dol_escape_htmltag($input['value']).'">'."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4742,9 +4742,21 @@ class Form
|
||||
$morecss = (!empty($input['morecss']) ? ' '.$input['morecss'] : '');
|
||||
|
||||
if ($input['type'] == 'text') {
|
||||
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].'</div><div class="tagtd"><input type="text" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$size.' value="'.$input['value'].'"'.$moreattr.' /></div></div>'."\n";
|
||||
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].'</div><div class="tagtd"><input type="text" class="flat'.$morecss.'" id="'.dol_escape_htmltag($input['name']).'" name="'.dol_escape_htmltag($input['name']).'"'.$size.' value="'.$input['value'].'"'.$moreattr.' /></div></div>'."\n";
|
||||
} elseif ($input['type'] == 'password') {
|
||||
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].'</div><div class="tagtd"><input type="password" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$size.' value="'.$input['value'].'"'.$moreattr.' /></div></div>'."\n";
|
||||
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].'</div><div class="tagtd"><input type="password" class="flat'.$morecss.'" id="'.dol_escape_htmltag($input['name']).'" name="'.dol_escape_htmltag($input['name']).'"'.$size.' value="'.$input['value'].'"'.$moreattr.' /></div></div>'."\n";
|
||||
} elseif ($input['type'] == 'textarea') {
|
||||
/*$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].'</div><div class="tagtd">';
|
||||
$more .= '<textarea name="'.$input['name'].'" class="'.$morecss.'"'.$moreattr.'>';
|
||||
$more .= $input['value'];
|
||||
$more .= '</textarea>';
|
||||
$more .= '</div></div>'."\n";*/
|
||||
$moreonecolumn .= '<div class="margintoponly">';
|
||||
$moreonecolumn .= $input['label'].'<br>';
|
||||
$moreonecolumn .= '<textarea name="'.dol_escape_htmltag($input['name']).'" id="'.dol_escape_htmltag($input['name']).'" class="'.$morecss.'"'.$moreattr.'>';
|
||||
$moreonecolumn .= $input['value'];
|
||||
$moreonecolumn .= '</textarea>';
|
||||
$moreonecolumn .= '</div>';
|
||||
} elseif ($input['type'] == 'select') {
|
||||
if (empty($morecss)) {
|
||||
$morecss = 'minwidth100';
|
||||
@ -4767,7 +4779,7 @@ class Form
|
||||
} elseif ($input['type'] == 'checkbox') {
|
||||
$more .= '<div class="tagtr">';
|
||||
$more .= '<div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].' </div><div class="tagtd">';
|
||||
$more .= '<input type="checkbox" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$moreattr;
|
||||
$more .= '<input type="checkbox" class="flat'.$morecss.'" id="'.dol_escape_htmltag($input['name']).'" name="'.dol_escape_htmltag($input['name']).'"'.$moreattr;
|
||||
if (!is_bool($input['value']) && $input['value'] != 'false' && $input['value'] != '0') {
|
||||
$more .= ' checked';
|
||||
}
|
||||
@ -4788,7 +4800,7 @@ class Form
|
||||
} else {
|
||||
$more .= '<div clas="tagtd'.(empty($input['tdclass']) ? '' : (' "'.$input['tdclass'])).'"> </div>';
|
||||
}
|
||||
$more .= '<div class="tagtd'.($i == 0 ? ' tdtop' : '').'"><input type="radio" class="flat'.$morecss.'" id="'.$input['name'].$selkey.'" name="'.$input['name'].'" value="'.$selkey.'"'.$moreattr;
|
||||
$more .= '<div class="tagtd'.($i == 0 ? ' tdtop' : '').'"><input type="radio" class="flat'.$morecss.'" id="'.dol_escape_htmltag($input['name'].$selkey).'" name="'.dol_escape_htmltag($input['name']).'" value="'.$selkey.'"'.$moreattr;
|
||||
if ($input['disabled']) {
|
||||
$more .= ' disabled';
|
||||
}
|
||||
@ -4796,7 +4808,7 @@ class Form
|
||||
$more .= ' checked="checked"';
|
||||
}
|
||||
$more .= ' /> ';
|
||||
$more .= '<label for="'.$input['name'].$selkey.'">'.$selval.'</label>';
|
||||
$more .= '<label for="'.dol_escape_htmltag($input['name'].$selkey).'">'.$selval.'</label>';
|
||||
$more .= '</div></div>'."\n";
|
||||
$i++;
|
||||
}
|
||||
@ -4921,7 +4933,7 @@ class Form
|
||||
inputvalue = $("#" + inputname + more).val();
|
||||
}
|
||||
if (typeof inputvalue == "undefined") { inputvalue=""; }
|
||||
console.log("check inputname="+inputname+" inputvalue="+inputvalue);
|
||||
console.log("formconfirm check inputname="+inputname+" inputvalue="+inputvalue);
|
||||
options += "&" + inputname + "=" + encodeURIComponent(inputvalue);
|
||||
});
|
||||
}
|
||||
|
||||
@ -84,18 +84,31 @@ if (isset($extrafields->attributes[$elementtype]['type']) && is_array($extrafiel
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$extrafields->attributes[$elementtype]['pos'][$key]."</td>\n";
|
||||
print "<td>".$extrafields->attributes[$elementtype]['label'][$key]."</td>\n"; // We don't translate here, we want admin to know what is the key not translated value
|
||||
print "<td>".$langs->trans($extrafields->attributes[$elementtype]['label'][$key])."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attributes[$elementtype]['type'][$key]]."</td>\n";
|
||||
print '<td class="right">'.$extrafields->attributes[$elementtype]['size'][$key]."</td>\n";
|
||||
print '<td>'.dol_trunc($extrafields->attributes[$elementtype]['computed'][$key], 20)."</td>\n";
|
||||
// Position
|
||||
print "<td>".dol_escape_htmltag($extrafields->attributes[$elementtype]['pos'][$key])."</td>\n";
|
||||
// Label
|
||||
print "<td>".dol_escape_htmltag($extrafields->attributes[$elementtype]['label'][$key])."</td>\n"; // We don't translate here, we want admin to know what is the key not translated value
|
||||
// Label translated
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv($extrafields->attributes[$elementtype]['label'][$key])).'">'.dol_escape_htmltag($langs->transnoentitiesnoconv($extrafields->attributes[$elementtype]['label'][$key]))."</td>\n";
|
||||
// Key
|
||||
print "<td>".dol_escape_htmltag($key)."</td>\n";
|
||||
// Type
|
||||
print "<td>".dol_escape_htmltag($type2label[$extrafields->attributes[$elementtype]['type'][$key]])."</td>\n";
|
||||
// Size
|
||||
print '<td class="right">'.dol_escape_htmltag($extrafields->attributes[$elementtype]['size'][$key])."</td>\n";
|
||||
// Computed field
|
||||
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($extrafields->attributes[$elementtype]['computed'][$key]).'">'.dol_escape_htmltag($extrafields->attributes[$elementtype]['computed'][$key])."</td>\n";
|
||||
// Is unique ?
|
||||
print '<td class="center">'.yn($extrafields->attributes[$elementtype]['unique'][$key])."</td>\n";
|
||||
// Is mandatory ?
|
||||
print '<td class="center">'.yn($extrafields->attributes[$elementtype]['required'][$key])."</td>\n";
|
||||
// Can always be editable ?
|
||||
print '<td class="center">'.yn($extrafields->attributes[$elementtype]['alwayseditable'][$key])."</td>\n";
|
||||
print '<td class="center">'.$extrafields->attributes[$elementtype]['list'][$key]."</td>\n";
|
||||
print '<td class="center">'.$extrafields->attributes[$elementtype]['printable'][$key]."</td>\n";
|
||||
// Visible
|
||||
print '<td class="center tdoverflowmax100" title="'.dol_escape_htmltag($extrafields->attributes[$elementtype]['list'][$key]).'">'.dol_escape_htmltag($extrafields->attributes[$elementtype]['list'][$key])."</td>\n";
|
||||
// Print on PDF
|
||||
print '<td class="center tdoverflowmax100" title="'.dol_escape_htmltag($extrafields->attributes[$elementtype]['printable'][$key]).'">'.dol_escape_htmltag($extrafields->attributes[$elementtype]['printable'][$key])."</td>\n";
|
||||
// Summable
|
||||
print '<td class="center">'.yn($extrafields->attributes[$elementtype]['totalizable'][$key])."</td>\n";
|
||||
if (!empty($conf->multicompany->enabled)) {
|
||||
print '<td class="center">';
|
||||
@ -116,8 +129,8 @@ if (isset($extrafields->attributes[$elementtype]['type']) && is_array($extrafiel
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="right nowraponall">';
|
||||
print '<a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&attrname='.$key.'#formeditextrafield">'.img_edit().'</a>';
|
||||
print ' <a class="paddingleft" href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&attrname='.$key.'">'.img_delete().'</a>';
|
||||
print '<a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&attrname='.urlencode($key).'#formeditextrafield">'.img_edit().'</a>';
|
||||
print ' <a class="paddingleft" href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&attrname='.urlencode($key).'">'.img_delete().'</a>';
|
||||
print '</td>'."\n";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
@ -2163,4 +2163,5 @@ APIsAreNotEnabled=APIs modules are not enabled
|
||||
YouShouldSetThisToOff=You should set this to 0 or off
|
||||
InstallAndUpgradeLockedBy=Install and upgrades are locked by the file <b>%s</b>
|
||||
OldImplementation=Old implementation
|
||||
PDF_SHOW_LINK_TO_ONLINE_PAYMENT=If some online payment modules are enabled (Paypal, Stripe, ...), add a link on the PDF to make the online payment
|
||||
PDF_SHOW_LINK_TO_ONLINE_PAYMENT=If some online payment modules are enabled (Paypal, Stripe, ...), add a link on the PDF to make the online payment
|
||||
EnabledCondition=Condition to have field enabled (if not enabled, visibility will always be off)
|
||||
@ -36,7 +36,7 @@ CloseAContract=Close a contract
|
||||
ConfirmDeleteAContract=Are you sure you want to delete this contract and all its services?
|
||||
ConfirmValidateContract=Are you sure you want to validate this contract under name <b>%s</b>?
|
||||
ConfirmActivateAllOnContract=This will open all services (not yet active). Are you sure you want to open all services?
|
||||
ConfirmCloseContract=This will close all services (active or not). Are you sure you want to close this contract?
|
||||
ConfirmCloseContract=This will close all services (expired or not). Are you sure you want to close this contract?
|
||||
ConfirmCloseService=Are you sure you want to close this service with date <b>%s</b>?
|
||||
ValidateAContract=Validate a contract
|
||||
ActivateService=Activate service
|
||||
|
||||
@ -313,10 +313,13 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Bouton Save payment
|
||||
print '<div class="center">';
|
||||
print '<input type="checkbox" checked name="closepaidsalary"> '.$langs->trans("ClosePaidSalaryAutomatically");
|
||||
print $form->buttonsSaveCancel("Save", "Cancel", '', true);
|
||||
print '<div class="paddingbottom"><input type="checkbox" checked name="closepaidsalary" id="closepaidsalary"><label for="closepaidsalary">'.$langs->trans("ClosePaidSalaryAutomatically").'</label></div>';
|
||||
print $form->buttonsSaveCancel("ToMakePayment", "Cancel", '', true);
|
||||
print '</div>';
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user