forked from Wavyzz/dolibarr
Merge pull request #25023 from frederic34/20230609
use user hasRight, isModEnabled
This commit is contained in:
@@ -230,7 +230,7 @@ if ($action == 'edit') {
|
||||
print "</textarea>\n";
|
||||
} elseif ($val['type']== 'html') {
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%');
|
||||
$doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%');
|
||||
$doleditor->Create();
|
||||
} elseif ($val['type'] == 'yesno') {
|
||||
print $form->selectyesno($constname, getDolGlobalString($constname), 1);
|
||||
|
||||
@@ -236,7 +236,7 @@ if (isModEnabled('agenda')) {
|
||||
if (isModEnabled('eventorganization') && !empty($user->rights->eventorganization->read)) {
|
||||
$elementList['conferenceorbooth'] = img_picto('', 'action', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendEventOrganization'));
|
||||
}
|
||||
if (!empty($conf->partnership->enabled) && !empty($user->rights->partnership->read)) {
|
||||
if (isModEnabled('partnership') && !empty($user->rights->partnership->read)) {
|
||||
$elementList['partnership_send'] = img_picto('', 'partnership', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToPartnership'));
|
||||
}
|
||||
|
||||
|
||||
@@ -539,14 +539,14 @@ print '<br>';
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("API"), '', 'folder');
|
||||
|
||||
if (empty($conf->api->enabled) && empty($conf->webservices->enabled)) {
|
||||
if (!isModEnabled('api') && !isModEnabled('webservices')) {
|
||||
print $langs->trans("APIsAreNotEnabled");
|
||||
} else {
|
||||
if (!empty($conf->webservices->enabled)) {
|
||||
if (isModEnabled('webservices')) {
|
||||
print $langs->trans('YouEnableDeprecatedWSAPIsUseRESTAPIsInstead')."<br>\n";
|
||||
print '<br>';
|
||||
}
|
||||
if (!empty($conf->api->enabled)) {
|
||||
if (isModEnabled('api')) {
|
||||
print '<strong>API_ENDPOINT_RULES</strong> = '.getDolGlobalString('API_ENDPOINT_RULES', '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Example").': login:0,users:0,setup:1,status:1,tickets:1,...)</span>')."<br>\n";
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ if ($action == 'edit') {
|
||||
print "</textarea>\n";
|
||||
} elseif ($val['type']== 'html') {
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%');
|
||||
$doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%');
|
||||
$doleditor->Create();
|
||||
} elseif ($val['type'] == 'yesno') {
|
||||
print $form->selectyesno($constname, getDolGlobalString($constname), 1);
|
||||
|
||||
Reference in New Issue
Block a user