View | Details | Raw Unified | Return to bug 19595
Collapse All | Expand All

(-)a/cataloguing/value_builder/dateaccessioned.pl (-4 / +3 lines)
Lines 42-54 function Focus$function_name(event) { Link Here
42
}
42
}
43
43
44
function Click$function_name(event) {
44
function Click$function_name(event) {
45
    set_to_today(event.data.id);
45
    set_to_today(event.data.id, 1);
46
    return false; // prevent page scroll
46
    return false; // prevent page scroll
47
}
47
}
48
48
49
function set_to_today( id ) {
49
function set_to_today( id, force ) {
50
    if (! id) { alert(_("Bad id ") + id + _(" sent to set_to_today()")); return 0; }
50
    if (! id) { alert(_("Bad id ") + id + _(" sent to set_to_today()")); return 0; }
51
    if (\$("#" + id).val() == '' || \$("#" + id).val() == '0000-00-00' ) {
51
    if (\$("#" + id).val() == '' || \$("#" + id).val() == '0000-00-00' || force ) {
52
        \$("#" + id).val("$date");
52
        \$("#" + id).val("$date");
53
    }
53
    }
54
}
54
}
55
- 

Return to bug 19595