From: Stéphane Jacob Date: Sun, 8 Mar 2009 18:35:09 +0000 (+0100) Subject: Fixes job deletion. X-Git-Tag: xorg/1.0.0~332^2~342^2 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=00ca8c0923077700cc37cfd8f2b385ac4d115eff;p=platal.git Fixes job deletion. --- diff --git a/htdocs/javascript/profile.js b/htdocs/javascript/profile.js index fbf4063..0472f59 100644 --- a/htdocs/javascript/profile.js +++ b/htdocs/javascript/profile.js @@ -442,18 +442,18 @@ function removeMedal(id) function removeJob(id, pref) { $('#' + id + '_cont').hide(); - if ($('#' + id).find("[name='" + id + "[new]']").val() == '0') { + if ($('#' + id).find("[name='" + pref + "[new]']").val() == '0') { $('#' + id + '_grayed').show(); - $('#' + id + '_grayed_name').html($('#' + id).find("[name='" + id + "[name]']").val()); + $('#' + id + '_grayed_name').html($('#' + id).find("[name='" + pref + "[name]']").val()); } - $('#' + id).find("[name='" + id + "[removed]']").val('1'); + $('#' + id).find("[name='" + pref + "[removed]']").val('1'); } function restoreJob(id, pref) { $('#' + id + '_cont').show(); $('#' + id + '_grayed').hide(); - $('#' + id).find("[name='" + id + "[removed]']").val('0'); + $('#' + id).find("[name='" + pref + "[removed]']").val('0'); } function updateJobSector(id, sel)