Skip to content

Commit

Permalink
Deleted AGENDA_ENABLE_DONEBY option. Cleaned code.
Browse files Browse the repository at this point in the history
  • Loading branch information
W1W1-M committed Mar 14, 2024
1 parent 1134d9a commit 93a2ab2
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions htdocs/comm/action/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,12 +426,6 @@
}
}

if (!$error && getDolGlobalString('AGENDA_ENABLE_DONEBY')) {
if (GETPOST("doneby") > 0) {
$object->userdoneid = GETPOSTINT("doneby");
}
}

$object->note_private = trim(GETPOST("note", "restricthtml"));

if (GETPOSTISSET("contactid")) {
Expand Down Expand Up @@ -877,12 +871,6 @@
$object->transparency = $transparency; // We set transparency on event (even if we can also store it on each user, standard says this property is for event)
// TODO store also transparency on owner user

if (getDolGlobalString('AGENDA_ENABLE_DONEBY')) {
if (GETPOST("doneby")) {
$object->userdoneid = GETPOSTINT("doneby");
}
}

// Check parameters
if (GETPOSTISSET('actioncode') && !GETPOST('actioncode', 'aZ09')) { // actioncode is '0'
$error++;
Expand Down Expand Up @@ -1230,16 +1218,6 @@ function setdatefields()
setdatefields();
});
$("#selectcomplete").change(function() {
console.log("we change the complete status - set the doneby");
if ($("#selectcomplete").val() == 100) {
if ($("#doneby").val() <= 0) $("#doneby").val(\''.((int) $user->id).'\');
}
if ($("#selectcomplete").val() == 0) {
$("#doneby").val(-1);
}
});
$("#actioncode").change(function() {
if ($("#actioncode").val() == \'AC_RDV\') $("#dateend").addClass("fieldrequired");
else $("#dateend").removeClass("fieldrequired");
Expand Down Expand Up @@ -1444,13 +1422,6 @@ function init_repeat()
print '</div>';
print '</td></tr>';

// Done by
if (getDolGlobalString('AGENDA_ENABLE_DONEBY')) {
print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td>';
print $form->select_dolusers(GETPOSTISSET("doneby") ? GETPOSTINT("doneby") : (!empty($object->userdoneid) && $percent == 100 ? $object->userdoneid : 0), 'doneby', 1);
print '</td></tr>';
}

// Location
if (!getDolGlobalString('AGENDA_DISABLE_LOCATION')) {
print '<tr><td>'.$langs->trans("Location").'</td><td><input type="text" name="location" class="minwidth300 maxwidth150onsmartphone" value="'.(GETPOST('location') ? GETPOST('location') : $object->location).'"></td></tr>';
Expand Down Expand Up @@ -1995,13 +1966,6 @@ function setdatefields()
}*/
print '</td></tr>';

// Realised by
if (getDolGlobalString('AGENDA_ENABLE_DONEBY')) {
print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td colspan="3">';
print $form->select_dolusers($object->userdoneid > 0 ? $object->userdoneid : -1, 'doneby', 1);
print '</td></tr>';
}

// Location
if (!getDolGlobalString('AGENDA_DISABLE_LOCATION')) {
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" class="minwidth300 maxwidth150onsmartphone" value="'.$object->location.'"></td></tr>';
Expand Down Expand Up @@ -2427,17 +2391,6 @@ function setdatefields()
*/
print ' </td></tr>';

// Done by
if (getDolGlobalString('AGENDA_ENABLE_DONEBY')) {
print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td>';
if ($object->userdoneid > 0) {
$tmpuser = new User($db);
$tmpuser->fetch($object->userdoneid);
print $tmpuser->getNomUrl(1);
}
print '</td></tr>';
}

// Categories
if (isModEnabled('category')) {
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
Expand Down

0 comments on commit 93a2ab2

Please sign in to comment.