mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-10 03:28:18 +01:00
Debug v17
This commit is contained in:
@@ -234,7 +234,7 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
|
||||
|
||||
// Can edit
|
||||
print '<tr class="oddeven" id="tredit"><td>';
|
||||
print $langs->trans("CanEditAmount");
|
||||
print $langs->trans("CanEditAmountDetail");
|
||||
print '</td><td>';
|
||||
print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT", (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT) ? $conf->global->MEMBER_NEWFORM_EDITAMOUNT : 0), 1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
@@ -319,7 +319,7 @@ class AdherentType extends CommonObject
|
||||
$sql .= ") VALUES (";
|
||||
$sql .= "'".$this->db->escape($this->morphy)."'";
|
||||
$sql .= ", '".$this->db->escape($this->label)."'";
|
||||
$sql .= ", ".$conf->entity;
|
||||
$sql .= ", ".((int) $conf->entity);
|
||||
$sql .= ")";
|
||||
|
||||
dol_syslog("Adherent_type::create", LOG_DEBUG);
|
||||
|
||||
@@ -81,6 +81,7 @@ $duration_unit = GETPOST('duration_unit', 'alpha');
|
||||
$vote = GETPOST("vote", "int");
|
||||
$comment = GETPOST("comment", 'restricthtml');
|
||||
$mail_valid = GETPOST("mail_valid", 'restricthtml');
|
||||
$caneditamount = GETPOSTINT("caneditamount");
|
||||
|
||||
// Security check
|
||||
$result = restrictedArea($user, 'adherent', $rowid, 'adherent_type');
|
||||
@@ -124,11 +125,11 @@ if ($action == 'add' && $user->hasRight('adherent', 'configurer')) {
|
||||
$object->status = (int) $status;
|
||||
$object->subscription = (int) $subscription;
|
||||
$object->amount = ($amount == '' ? '' : price2num($amount, 'MT'));
|
||||
$object->caneditamount = GETPOSTINT("caneditamount");
|
||||
$object->caneditamount = $caneditamount;
|
||||
$object->duration_value = $duration_value;
|
||||
$object->duration_unit = $duration_unit;
|
||||
$object->note = trim($comment);
|
||||
$object->note_public = trim($comment);
|
||||
$object->note_private = '';
|
||||
$object->mail_valid = trim($mail_valid);
|
||||
$object->vote = (int) $vote;
|
||||
|
||||
@@ -142,7 +143,7 @@ if ($action == 'add' && $user->hasRight('adherent', 'configurer')) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors');
|
||||
} else {
|
||||
$sql = "SELECT libelle FROM ".MAIN_DB_PREFIX."adherent_type WHERE libelle='".$db->escape($object->label)."'";
|
||||
$sql = "SELECT libelle FROM ".MAIN_DB_PREFIX."adherent_type WHERE libelle = '".$db->escape($object->label)."'";
|
||||
$sql .= " WHERE entity IN (".getEntity('member_type').")";
|
||||
$result = $db->query($sql);
|
||||
$num = null;
|
||||
@@ -183,8 +184,8 @@ if ($action == 'update' && $user->rights->adherent->configurer) {
|
||||
$object->caneditamount = $caneditamount;
|
||||
$object->duration_value = $duration_value;
|
||||
$object->duration_unit = $duration_unit;
|
||||
$object->note = trim($comment);
|
||||
$object->note_public = trim($comment);
|
||||
$object->note_private = '';
|
||||
$object->mail_valid = trim($mail_valid);
|
||||
$object->vote = (boolean) trim($vote);
|
||||
|
||||
@@ -390,8 +391,8 @@ if ($action == 'create') {
|
||||
print '<input name="amount" size="5" value="'.(GETPOSTISSET('amount') ? GETPOST('amount') : price($amount)).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("CanEditAmount").'</td><td>';
|
||||
print $form->selectyesno("caneditamount", 0, 1);
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("CanEditAmountShort"), $langs->transnoentities("CanEditAmount")).'</td><td>';
|
||||
print $form->selectyesno("caneditamount", GETPOSTISSET('caneditamount') ? GETPOST('caneditamount') : 0, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
||||
@@ -832,7 +833,7 @@ if ($rowid > 0) {
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("CanEditAmountShort"), $langs->transnoentities("CanEditAmountDetail")).'</td><td>';
|
||||
print $form->selectyesno("caneditamount", $object->caneditamount);
|
||||
print $form->selectyesno("caneditamount", $object->caneditamount, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
||||
|
||||
Reference in New Issue
Block a user