Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/class/doleditor.class.php
This commit is contained in:
commit
9bda7ba8c7
@ -682,13 +682,13 @@ if ($action == 'export_file') {
|
||||
'name' => 'notifiedexportdate',
|
||||
'type' => 'checkbox',
|
||||
'label' => $langs->trans('NotifiedExportDate'),
|
||||
'value' => (!empty($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_EXPORT_DATE) ? 'false' : 'true'),
|
||||
'value' => (empty($conf->global->ACCOUNTING_DEFAULT_NOTIFIED_EXPORT_DATE) ? false : true),
|
||||
);
|
||||
$form_question['notifiedvalidationdate'] = array(
|
||||
'name' => 'notifiedvalidationdate',
|
||||
'type' => 'checkbox',
|
||||
'label' => $langs->trans('NotifiedValidationDate'),
|
||||
'value' => (!empty($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_VALIDATION_DATE) ? 'false' : 'true'),
|
||||
'value' => (empty($conf->global->ACCOUNTING_DEFAULT_NOTIFIED_VALIDATION_DATE) ? false : true),
|
||||
);
|
||||
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', $langs->trans('ConfirmExportFile'), 'export_fileconfirm', $form_question, '', 1, 300, 600);
|
||||
|
||||
@ -13,7 +13,6 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@ -406,7 +406,7 @@ print '<br><br>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
print load_fiche_titre($langs->trans("OtherSetup").' ('.$langs->trans("Experimental").')', '', 'folder');
|
||||
print load_fiche_titre($langs->trans("OtherSetup"), '', 'folder');
|
||||
|
||||
|
||||
//print '<strong>'.$langs->trans("PasswordEncryption").'</strong>: ';
|
||||
@ -439,19 +439,24 @@ print '<br>';
|
||||
print '<strong>MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE</strong> = '.(empty($conf->global->MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE).' <span class="opacitymedium">('.$langs->trans("Recommended").': 1)</span><br>';
|
||||
print '<br>';
|
||||
|
||||
print '<strong>MAIN_SECURITY_CSRF_WITH_TOKEN</strong> = '.(empty($conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN).' <span class="opacitymedium">('.$langs->trans("Recommended").': 2)</span>'."<br>";
|
||||
print '<br>';
|
||||
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
print load_fiche_titre($langs->trans("OtherSetup").' ('.$langs->trans("Experimental").')', '', 'folder');
|
||||
|
||||
print '<strong>MAIN_RESTRICTHTML_ONLY_VALID_HTML</strong> = '.(empty($conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': 1)</span>' : $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML)."<br>";
|
||||
print '<br>';
|
||||
|
||||
print '<strong>MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES</strong> = '.(empty($conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': 1)</span>' : $conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES)."<br>";
|
||||
print '<br>';
|
||||
|
||||
print '<strong>MAIN_SECURITY_CSRF_WITH_TOKEN</strong> = '.(empty($conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN).' <span class="opacitymedium">('.$langs->trans("Recommended").': 2)</span>'."<br>";
|
||||
print '<br>';
|
||||
|
||||
print '<strong>MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL</strong> = '.(empty($conf->global->MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' ('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or").' 0)</span>' : $conf->global->MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL)."<br>";
|
||||
print '<br>';
|
||||
|
||||
|
||||
print '<strong>MAIN_EXEC_USE_POPEN</strong> = ';
|
||||
if (empty($conf->global->MAIN_EXEC_USE_POPEN)) {
|
||||
print '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>';
|
||||
|
||||
@ -326,19 +326,19 @@ class DolEditor
|
||||
|
||||
$out .= 'jQuery(document).ready(function() {
|
||||
jQuery(".buttonforacesave").click(function() {
|
||||
console.log("We click on savefile button for component '.$this->htmlname.'");
|
||||
var aceEditor = window.ace.edit("'.$this->htmlname.'aceeditorid");
|
||||
console.log("We click on savefile button for component '.dol_escape_js($this->htmlname).'");
|
||||
var aceEditor = window.ace.edit("'.dol_escape_js($this->htmlname).'aceeditorid");
|
||||
if (aceEditor) {
|
||||
var cursorPos = aceEditor.getCursorPosition();
|
||||
//console.log(cursorPos);
|
||||
if (cursorPos) {
|
||||
jQuery("#'.$this->htmlname.'_x").val(cursorPos.column);
|
||||
jQuery("#'.$this->htmlname.'_y").val(cursorPos.row);
|
||||
jQuery("#'.dol_escape_js($this->htmlname).'_x").val(cursorPos.column);
|
||||
jQuery("#'.dol_escape_js($this->htmlname).'_y").val(cursorPos.row);
|
||||
}
|
||||
//console.log(aceEditor.getSession().getValue());
|
||||
// Inject content of editor into the original HTML field.
|
||||
jQuery("#'.$this->htmlname.'").val(aceEditor.getSession().getValue());
|
||||
/*if (jQuery("#'.$this->htmlname.'").html().length > 0) return true;
|
||||
jQuery("#'.dol_escape_js($this->htmlname).'").val(aceEditor.getSession().getValue());
|
||||
/*if (jQuery("#'.dol_escape_js($this->htmlname).'").html().length > 0) return true;
|
||||
else return false;*/
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@ -4901,7 +4901,7 @@ class Form
|
||||
$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="'.dol_escape_htmltag($input['name']).'" name="'.dol_escape_htmltag($input['name']).'"'.$moreattr;
|
||||
if (!is_bool($input['value']) && $input['value'] != 'false' && $input['value'] != '0') {
|
||||
if (!is_bool($input['value']) && $input['value'] != 'false' && $input['value'] != '0' && $input['value'] != '') {
|
||||
$more .= ' checked';
|
||||
}
|
||||
if (is_bool($input['value']) && $input['value']) {
|
||||
|
||||
@ -256,7 +256,7 @@ class modAccounting extends DolibarrModules
|
||||
$r++;
|
||||
$this->export_code[$r] = $this->rights_class.'_'.$r;
|
||||
$this->export_label[$r] = 'Chartofaccounts';
|
||||
$this->export_icon[$r] = 'accounting';
|
||||
$this->export_icon[$r] = $this->picto;
|
||||
$this->export_permission[$r] = array(array("accounting", "chartofaccount"));
|
||||
$this->export_fields_array[$r] = array('ac.rowid'=>'ChartofaccountsId', 'ac.pcg_version'=>'Chartofaccounts', 'aa.rowid'=>'ID', 'aa.account_number'=>"AccountAccounting", 'aa.label'=>"Label", 'aa.account_parent'=>"Accountparent", 'aa.pcg_type'=>"Pcgtype", 'aa.active'=>'Status');
|
||||
$this->export_TypeFields_array[$r] = array('ac.rowid'=>'List:accounting_system:pcg_version', 'ac.pcg_version'=>'Text', 'aa.rowid'=>'Numeric', 'aa.account_number'=>"Text", 'aa.label'=>"Text", 'aa.account_parent'=>"Text", 'aa.pcg_type'=>'Text', 'aa.active'=>'Status');
|
||||
|
||||
@ -282,7 +282,7 @@ DescClosure=Consult here the number of movements by month who are not validated
|
||||
OverviewOfMovementsNotValidated=Step 1/ Overview of movements not validated. (Necessary to close a fiscal year)
|
||||
AllMovementsWereRecordedAsValidated=All movements were recorded as validated
|
||||
NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated
|
||||
ValidateMovements=Validate movements
|
||||
ValidateMovements=Validate and lock record...
|
||||
DescValidateMovements=Any modification or deletion of writing, lettering and deletes will be prohibited. All entries for an exercise must be validated otherwise closing will not be possible
|
||||
|
||||
ValidateHistory=Bind Automatically
|
||||
|
||||
@ -243,7 +243,7 @@ if (!empty($conf->paypal->enabled)) {
|
||||
$fulltag = $FULLTAG;
|
||||
$payerID = $PAYPALPAYERID;
|
||||
// Set by newpayment.php
|
||||
$paymentType = $_SESSION['PaymentType'];
|
||||
$paymentType = $_SESSION['PaymentType']; // Value can be 'Mark', 'Sole', 'Sale' for example
|
||||
$currencyCodeType = $_SESSION['currencyCodeType'];
|
||||
$FinalPaymentAmt = $_SESSION["FinalPaymentAmt"];
|
||||
// From env
|
||||
@ -404,10 +404,19 @@ if ($ispaymentok) {
|
||||
$paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS;
|
||||
}
|
||||
if (empty($paymentTypeId)) {
|
||||
dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
if (empty($paymentType)) {
|
||||
$paymentType = 'CB';
|
||||
}
|
||||
// May return nothing when paymentType means nothing
|
||||
// (for example when paymentType is 'Mark', 'Sole', 'Sale', for paypal)
|
||||
$paymentTypeId = dol_getIdFromCode($db, $paymentType, 'c_paiement', 'code', 'id', 1);
|
||||
|
||||
// If previous line has returned nothing, we force to get the ID of payment of Credit Card (hard coded code 'CB').
|
||||
if (empty($paymentTypeId) || $paymentTypeId < 0) {
|
||||
$paymentTypeId = dol_getIdFromCode($db, 'CB', 'c_paiement', 'code', 'id', 1);
|
||||
}
|
||||
}
|
||||
|
||||
dol_syslog("FinalPaymentAmt=".$FinalPaymentAmt." paymentTypeId=".$paymentTypeId." paymentType=".$paymentType." currencyCodeType=".$currencyCodeType, LOG_DEBUG, 0, '_payment');
|
||||
@ -781,10 +790,19 @@ if ($ispaymentok) {
|
||||
$paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS;
|
||||
}
|
||||
if (empty($paymentTypeId)) {
|
||||
dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
if (empty($paymentType)) {
|
||||
$paymentType = 'CB';
|
||||
}
|
||||
// May return nothing when paymentType means nothing
|
||||
// (for example when paymentType is 'Mark', 'Sole', 'Sale', for paypal)
|
||||
$paymentTypeId = dol_getIdFromCode($db, $paymentType, 'c_paiement', 'code', 'id', 1);
|
||||
|
||||
// If previous line has returned nothing, we force to get the ID of payment of Credit Card (hard coded code 'CB').
|
||||
if (empty($paymentTypeId) || $paymentTypeId < 0) {
|
||||
$paymentTypeId = dol_getIdFromCode($db, 'CB', 'c_paiement', 'code', 'id', 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Do action only if $FinalPaymentAmt is set (session variable is cleaned after this page to avoid duplicate actions when page is POST a second time)
|
||||
@ -874,12 +892,29 @@ if ($ispaymentok) {
|
||||
$FinalPaymentAmt = $_SESSION["FinalPaymentAmt"];
|
||||
|
||||
$paymentTypeId = 0;
|
||||
if ($paymentmethod == 'paybox') $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS;
|
||||
if ($paymentmethod == 'paypal') $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS;
|
||||
if ($paymentmethod == 'stripe') $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS;
|
||||
if ($paymentmethod == 'paybox') {
|
||||
$paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS;
|
||||
}
|
||||
if ($paymentmethod == 'paypal') {
|
||||
$paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS;
|
||||
}
|
||||
if ($paymentmethod == 'stripe') {
|
||||
$paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS;
|
||||
}
|
||||
if (empty($paymentTypeId)) {
|
||||
if (empty($paymentType)) $paymentType = 'CB';
|
||||
dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
if (empty($paymentType)) {
|
||||
$paymentType = 'CB';
|
||||
}
|
||||
// May return nothing when paymentType means nothing
|
||||
// (for example when paymentType is 'Mark', 'Sole', 'Sale', for paypal)
|
||||
$paymentTypeId = dol_getIdFromCode($db, $paymentType, 'c_paiement', 'code', 'id', 1);
|
||||
|
||||
// If previous line has returned nothing, we force to get the ID of payment of Credit Card (hard coded code 'CB').
|
||||
if (empty($paymentTypeId) || $paymentTypeId < 0) {
|
||||
$paymentTypeId = dol_getIdFromCode($db, 'CB', 'c_paiement', 'code', 'id', 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Do action only if $FinalPaymentAmt is set (session variable is cleaned after this page to avoid duplicate actions when page is POST a second time)
|
||||
@ -984,10 +1019,19 @@ if ($ispaymentok) {
|
||||
$paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS;
|
||||
}
|
||||
if (empty($paymentTypeId)) {
|
||||
dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
if (empty($paymentType)) {
|
||||
$paymentType = 'CB';
|
||||
}
|
||||
// May return nothing when paymentType means nothing
|
||||
// (for example when paymentType is 'Mark', 'Sole', 'Sale', for paypal)
|
||||
$paymentTypeId = dol_getIdFromCode($db, $paymentType, 'c_paiement', 'code', 'id', 1);
|
||||
|
||||
// If previous line has returned nothing, we force to get the ID of payment of Credit Card (hard coded code 'CB').
|
||||
if (empty($paymentTypeId) || $paymentTypeId < 0) {
|
||||
$paymentTypeId = dol_getIdFromCode($db, 'CB', 'c_paiement', 'code', 'id', 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Do action only if $FinalPaymentAmt is set (session variable is cleaned after this page to avoid duplicate actions when page is POST a second time)
|
||||
@ -1089,10 +1133,19 @@ if ($ispaymentok) {
|
||||
$paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS;
|
||||
}
|
||||
if (empty($paymentTypeId)) {
|
||||
dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
if (empty($paymentType)) {
|
||||
$paymentType = 'CB';
|
||||
}
|
||||
// May return nothing when paymentType means nothing
|
||||
// (for example when paymentType is 'Mark', 'Sole', 'Sale', for paypal)
|
||||
$paymentTypeId = dol_getIdFromCode($db, $paymentType, 'c_paiement', 'code', 'id', 1);
|
||||
|
||||
// If previous line has returned nothing, we force to get the ID of payment of Credit Card (hard coded code 'CB').
|
||||
if (empty($paymentTypeId) || $paymentTypeId < 0) {
|
||||
$paymentTypeId = dol_getIdFromCode($db, 'CB', 'c_paiement', 'code', 'id', 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Do action only if $FinalPaymentAmt is set (session variable is cleaned after this page to avoid duplicate actions when page is POST a second time)
|
||||
@ -1270,10 +1323,19 @@ if ($ispaymentok) {
|
||||
$paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS;
|
||||
}
|
||||
if (empty($paymentTypeId)) {
|
||||
dol_syslog("paymentType = ".$paymentType, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
if (empty($paymentType)) {
|
||||
$paymentType = 'CB';
|
||||
}
|
||||
// May return nothing when paymentType means nothing
|
||||
// (for example when paymentType is 'Mark', 'Sole', 'Sale', for paypal)
|
||||
$paymentTypeId = dol_getIdFromCode($db, $paymentType, 'c_paiement', 'code', 'id', 1);
|
||||
|
||||
// If previous line has returned nothing, we force to get the ID of payment of Credit Card (hard coded code 'CB').
|
||||
if (empty($paymentTypeId) || $paymentTypeId < 0) {
|
||||
$paymentTypeId = dol_getIdFromCode($db, 'CB', 'c_paiement', 'code', 'id', 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Do action only if $FinalPaymentAmt is set (session variable is cleaned after this page to avoid duplicate actions when page is POST a second time)
|
||||
|
||||
@ -2853,7 +2853,7 @@ if (!GETPOST('hide_websitemenu')) {
|
||||
print $langs->trans("PageContainer").': ';
|
||||
print '</span>';
|
||||
|
||||
print '<span class="websiteselection hideonsmartphoneimp">';
|
||||
print '<span class="websiteselection">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=createcontainer&website='.urlencode($website->ref).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("AddPage")).'"><span class="fa fa-plus-circle valignmiddle btnTitle-icon"></span></a>';
|
||||
print '</span>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user