mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug v20
This commit is contained in:
parent
5ef810d13e
commit
d723abc487
|
|
@ -226,7 +226,7 @@ if ($action == 'edit') {
|
|||
print '<table class="border centpercent">';
|
||||
print '<tr><td class="tdtop titlefieldcreate fieldrequired">'.$langs->trans('Label').'</td><td><input name="libelle-'.$key.'" class="minwidth300" value="'.dol_escape_htmltag($object->multilangs[$key]["label"]).'"></td></tr>';
|
||||
print '<tr><td class="tdtop">'.$langs->trans('Description').'</td><td>';
|
||||
$doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_3, '90%');
|
||||
$doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor') && getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_3, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
print '</td></tr>';
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ if ($user->hasRight('categorie', 'creer')) {
|
|||
// Description
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('description', $description, '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_5, '90%');
|
||||
$doleditor = new DolEditor('description', $description, '', 160, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor') && getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_5, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ if ($action == 'edit') {
|
|||
// Desc
|
||||
$desc = (GETPOST('desc-'.$key) ? GETPOST('desc-'.$key) : ($object->multilangs[$key]['description'] ?? ''));
|
||||
print '<tr><td class="tdtop">'.$langs->trans('Description').'</td><td>';
|
||||
$doleditor = new DolEditor("desc-$key", $desc, '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_3, '90%');
|
||||
$doleditor = new DolEditor("desc-$key", $desc, '', 160, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor') && getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_3, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
@ -328,7 +328,7 @@ if ($action == 'add' && ($user->hasRight('produit', 'creer') || $user->hasRight(
|
|||
print '<tr><td class="fieldrequired">'.$langs->trans('Label').'</td>';
|
||||
print '<td><input name="libelle" class="minwidth200 maxwidth300" value="'.GETPOST('libelle', 'alpha').'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Description').'</td><td>';
|
||||
$doleditor = new DolEditor('desc', GETPOST('desc', 'restricthtml'), '', 160, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_3, '90%');
|
||||
$doleditor = new DolEditor('desc', GETPOST('desc', 'restricthtml'), '', 160, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor') && getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_3, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
|
|||
|
|
@ -503,7 +503,7 @@ if ($action == 'create') {
|
|||
print '<td>';
|
||||
// Editor wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('account_comment', (GETPOST("account_comment") ? GETPOST("account_comment") : $object->comment), '', 90, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_4, '90%');
|
||||
$doleditor = new DolEditor('account_comment', (GETPOST("account_comment") ? GETPOST("account_comment") : $object->comment), '', 90, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor') && getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_4, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
@ -1063,7 +1063,7 @@ if ($action == 'create') {
|
|||
print '<td>';
|
||||
// Editor wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('account_comment', (GETPOST("account_comment") ? GETPOST("account_comment") : $object->comment), '', 90, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_4, '95%');
|
||||
$doleditor = new DolEditor('account_comment', (GETPOST("account_comment") ? GETPOST("account_comment") : $object->comment), '', 90, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor') && getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_4, '95%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
|
|||
|
|
@ -7445,7 +7445,7 @@ abstract class CommonObject
|
|||
} elseif (preg_match('/^html/', (string) $type)) {
|
||||
if (!preg_match('/search_/', $keyprefix)) { // If keyprefix is search_ or search_options_, we must just use a simple text field
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor($keyprefix.$key.$keysuffix, $value, '', 200, 'dolibarr_notes', 'In', false, false, isModEnabled('fckeditor') && $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_5, '90%');
|
||||
$doleditor = new DolEditor($keyprefix.$key.$keysuffix, $value, '', 200, 'dolibarr_notes', 'In', false, false, isModEnabled('fckeditor') && getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_5, '90%');
|
||||
$out = (string) $doleditor->Create(1, '', true, '', '', $moreparam, $morecss);
|
||||
} else {
|
||||
$out = '<input type="text" class="flat '.$morecss.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.dol_escape_htmltag($value).'" '.($moreparam ? $moreparam : '').'>';
|
||||
|
|
|
|||
|
|
@ -53,21 +53,21 @@ class DolEditor
|
|||
/**
|
||||
* Create an object to build an HTML area to edit a large string content
|
||||
*
|
||||
* @param string $htmlname HTML name of WYSIWYG field
|
||||
* @param string $content Content of WYSIWYG field
|
||||
* @param int|string $width Width in pixel of edit area (auto by default)
|
||||
* @param int $height Height in pixel of edit area (200px by default)
|
||||
* @param string $toolbarname Name of bar set to use ('Full', 'dolibarr_notes[_encoded]', 'dolibarr_details[_encoded]'=the less featured, 'dolibarr_mailings[_encoded]', 'dolibarr_readonly').
|
||||
* @param string $toolbarlocation Deprecated. Not used
|
||||
* @param boolean $toolbarstartexpanded Bar is visible or not at start
|
||||
* @param boolean|int $uselocalbrowser Enabled to add links to local object with local browser. If false, only external images can be added in content.
|
||||
* @param boolean|string $okforextendededitor True=Allow usage of extended editor tool if qualified (like ckeditor). If 'textarea', force use of simple textarea. If 'ace', force use of Ace.
|
||||
* Warning: If you use 'ace', don't forget to also include ace.js in page header. Also, the button "save" must have class="buttonforacesave".
|
||||
* @param int $rows Size of rows for textarea tool
|
||||
* @param string $cols Size of cols for textarea tool (textarea number of cols '70' or percent 'x%')
|
||||
* @param int $readonly 0=Read/Edit, 1=Read only
|
||||
* @param array $poscursor Array for initial cursor position array('x'=>x, 'y'=>y).
|
||||
* array('find'=> 'word') can be used to go to line were the word has been found
|
||||
* @param string $htmlname HTML name of WYSIWYG field
|
||||
* @param string $content Content of WYSIWYG field
|
||||
* @param int|string $width Width in pixel of edit area (auto by default)
|
||||
* @param int $height Height in pixel of edit area (200px by default)
|
||||
* @param string $toolbarname Name of bar set to use ('Full', 'dolibarr_notes[_encoded]', 'dolibarr_details[_encoded]'=the less featured, 'dolibarr_mailings[_encoded]', 'dolibarr_readonly').
|
||||
* @param string $toolbarlocation Deprecated. Not used
|
||||
* @param boolean $toolbarstartexpanded Bar is visible or not at start
|
||||
* @param boolean|int $uselocalbrowser Enabled to add links to local object with local browser. If false, only external images can be added in content.
|
||||
* @param boolean|int|string $okforextendededitor 1 or True=Allow usage of extended editor tool if qualified (like ckeditor). If 'textarea', force use of simple textarea. If 'ace', force use of Ace.
|
||||
* Warning: If you use 'ace', don't forget to also include ace.js in page header. Also, the button "save" must have class="buttonforacesave".
|
||||
* @param int $rows Size of rows for textarea tool
|
||||
* @param string $cols Size of cols for textarea tool (textarea number of cols '70' or percent 'x%')
|
||||
* @param int $readonly 0=Read/Edit, 1=Read only
|
||||
* @param array $poscursor Array for initial cursor position array('x'=>x, 'y'=>y).
|
||||
* array('find'=> 'word') can be used to go to line were the word has been found
|
||||
*/
|
||||
public function __construct($htmlname, $content, $width = '', $height = 200, $toolbarname = 'Basic', $toolbarlocation = 'In', $toolbarstartexpanded = false, $uselocalbrowser = 1, $okforextendededitor = true, $rows = 0, $cols = '', $readonly = 0, $poscursor = array())
|
||||
{
|
||||
|
|
@ -90,7 +90,7 @@ class DolEditor
|
|||
$this->readonly = $readonly;
|
||||
|
||||
// Check if extended editor is ok. If not we force textarea
|
||||
if ((!isModEnabled('fckeditor') && $okforextendededitor != 'ace') || empty($okforextendededitor)) {
|
||||
if ((!isModEnabled('fckeditor') && $okforextendededitor !== 'ace') || empty($okforextendededitor)) {
|
||||
$this->tool = 'textarea';
|
||||
}
|
||||
if ($okforextendededitor === 'ace') {
|
||||
|
|
|
|||
|
|
@ -1220,7 +1220,7 @@ class ExtraFields
|
|||
} elseif ($type == 'html') {
|
||||
if (!preg_match('/search_/', $keyprefix)) { // If keyprefix is search_ or search_options_, we must just use a simple text field
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor($keyprefix.$key.$keysuffix, $value, '', 200, 'dolibarr_notes', 'In', false, false, isModEnabled('fckeditor') && $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_5, '90%');
|
||||
$doleditor = new DolEditor($keyprefix.$key.$keysuffix, $value, '', 200, 'dolibarr_notes', 'In', false, false, isModEnabled('fckeditor') && getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_5, '90%');
|
||||
$out = (string) $doleditor->Create(1);
|
||||
} else {
|
||||
$out = '<input type="text" class="flat '.$morecss.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.dol_escape_htmltag($value).'" '.($moreparam ? $moreparam : '').'>';
|
||||
|
|
|
|||
|
|
@ -876,7 +876,7 @@ if ($action == 'create' && $user->hasRight('projet', 'creer')) {
|
|||
// Description
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td>';
|
||||
print '<td>';
|
||||
$doleditor = new DolEditor('description', GETPOST("description", 'restricthtml'), '', 90, 'dolibarr_notes', '', false, true, getDolGlobalString('FCKEDITOR_ENABLE_SOCIETE'), ROWS_3, '90%');
|
||||
$doleditor = new DolEditor('description', GETPOST("description", 'restricthtml'), '', 90, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor') && getDolGlobalString('FCKEDITOR_ENABLE_SOCIETE'), ROWS_3, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
@ -1008,7 +1008,7 @@ if ($action == 'create' && $user->hasRight('projet', 'creer')) {
|
|||
// Ref
|
||||
$suggestedref = $object->ref;
|
||||
print '<tr><td class="titlefield fieldrequired">'.$langs->trans("Ref").'</td>';
|
||||
print '<td><input size="25" name="ref" value="'.$suggestedref.'">';
|
||||
print '<td><input class="width200" name="ref" value="'.$suggestedref.'">';
|
||||
print ' '.$form->textwithpicto('', $langs->trans("YouCanCompleteRef", $suggestedref));
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
@ -1267,7 +1267,7 @@ if ($action == 'create' && $user->hasRight('projet', 'creer')) {
|
|||
// Description
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td>';
|
||||
print '<td>';
|
||||
$doleditor = new DolEditor('description', $object->description, '', 90, 'dolibarr_notes', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_3, '90%');
|
||||
$doleditor = new DolEditor('description', $object->description, '', 90, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor') && getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_3, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
|
|||
|
|
@ -825,12 +825,11 @@ if ($action == 'create' && $user->hasRight('projet', 'creer') && (empty($object-
|
|||
|
||||
// WYSIWYG editor
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$cked_enabled = (getDolGlobalString('FCKEDITOR_ENABLE_SOCIETE') ? $conf->global->FCKEDITOR_ENABLE_SOCIETE : 0);
|
||||
$nbrows = 0;
|
||||
if (getDolGlobalString('MAIN_INPUT_DESC_HEIGHT')) {
|
||||
$nbrows = getDolGlobalString('MAIN_INPUT_DESC_HEIGHT');
|
||||
}
|
||||
$doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_details', '', false, true, $cked_enabled, $nbrows, '90%');
|
||||
$doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), $nbrows, '90%');
|
||||
print $doleditor->Create();
|
||||
|
||||
print '</td></tr>';
|
||||
|
|
|
|||
|
|
@ -495,12 +495,12 @@ if ($id > 0 || !empty($ref)) {
|
|||
|
||||
// Project
|
||||
if (empty($withproject)) {
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Third party
|
||||
print '<td>'.$langs->trans("ThirdParty").'</td><td colspan="3">';
|
||||
print '<td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
if ($projectstatic->thirdparty->id) {
|
||||
print $projectstatic->thirdparty->getNomUrl(1);
|
||||
} else {
|
||||
|
|
@ -511,7 +511,8 @@ if ($id > 0 || !empty($ref)) {
|
|||
|
||||
// Task parent
|
||||
print '<tr><td>'.$langs->trans("ChildOfProjectTask").'</td><td>';
|
||||
$formother->selectProjectTasks($object->fk_task_parent, $projectstatic->id, 'task_parent', ($user->admin ? 0 : 1), 0, 0, 0, $object->id);
|
||||
print img_picto('', 'projecttask');
|
||||
$formother->selectProjectTasks($object->fk_task_parent, $projectstatic->id, 'task_parent', ($user->admin ? 0 : 1), 0, 0, 0, $object->id, '', 'minwidth100 widthcentpercentminusxx maxwidth500');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date start
|
||||
|
|
@ -535,19 +536,21 @@ if ($id > 0 || !empty($ref)) {
|
|||
print '</td></tr>';
|
||||
|
||||
// Description
|
||||
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td>';
|
||||
print '<td>';
|
||||
|
||||
// WYSIWYG editor
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$cked_enabled = (getDolGlobalString('FCKEDITOR_ENABLE_SOCIETE') ? $conf->global->FCKEDITOR_ENABLE_SOCIETE : 0);
|
||||
$nbrows = getDolGlobalInt('MAIN_INPUT_DESC_HEIGHT', 0);
|
||||
$doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_details', '', false, true, $cked_enabled, $nbrows);
|
||||
$doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), $nbrows, '90%');
|
||||
print $doleditor->Create();
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '<tr><td>'.$langs->trans("Budget").'</td>';
|
||||
print '<td><input size="5" type="text" name="budget_amount" value="'.dol_escape_htmltag(GETPOSTISSET('budget_amount') ? GETPOST('budget_amount') : price2num($object->budget_amount)).'"></td>';
|
||||
print '<td><input class="with75" type="text" name="budget_amount" value="'.dol_escape_htmltag(GETPOSTISSET('budget_amount') ? GETPOST('budget_amount') : price2num($object->budget_amount)).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Other options
|
||||
|
|
|
|||
|
|
@ -1924,6 +1924,12 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select
|
|||
min-width: 100px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
select.widthcentpercentminusx, span.widthcentpercentminusx:not(.select2-selection), input.widthcentpercentminusx {
|
||||
width: calc(100% - 52px) !important;
|
||||
display: inline-block;
|
||||
min-width: 100px;
|
||||
}
|
||||
select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-selection), input.widthcentpercentminusxx {
|
||||
width: calc(100% - 70px) !important;
|
||||
display: inline-block;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user