44 lines
1006 B
JavaScript
44 lines
1006 B
JavaScript
/*
|
|
$Revision$
|
|
$Id$
|
|
*/
|
|
|
|
$(function ()
|
|
{ // initialisatie
|
|
if ($("#hasworkplace").length)
|
|
{
|
|
$("#hasworkplace").change(onChangeHasworkplace);
|
|
onChangeHasworkplace();
|
|
}
|
|
|
|
$("#accepttime").change(onChangeAccepttime);
|
|
onChangeAccepttime();
|
|
|
|
$("#processingtime").change(onChangeProcessingtime);
|
|
onChangeProcessingtime();
|
|
});
|
|
|
|
function onChangeAccepttime()
|
|
{
|
|
$("#accepttime_eenheid").prop("disabled", isNaN(parseFloat($("#accepttime").val())));
|
|
}
|
|
|
|
function onChangeProcessingtime()
|
|
{
|
|
$("#processingtime_eenheid").prop("disabled", isNaN(parseFloat($("#processingtime").val())));
|
|
}
|
|
|
|
function onChangeHasworkplace()
|
|
{
|
|
// Als bevat_werkplek is aangevinkt, moet verhuurbaar ook aangevinkt worden (constraint ALG_C_PRS_WERKPLEK_VERHUURBAAR)
|
|
if ($("#hasworkplace").is(":checked"))
|
|
{
|
|
$("#rentable").prop("checked", "checked");
|
|
$("#rentable").prop("disabled", true);
|
|
}
|
|
else
|
|
{
|
|
$("#rentable").prop("disabled", false);
|
|
}
|
|
}
|