27 lines
614 B
JavaScript
27 lines
614 B
JavaScript
/*
|
|
$Revision$
|
|
$Id$
|
|
|
|
File: cnt_factuurschema.js
|
|
*/
|
|
|
|
$(function () {
|
|
$("#generate").change(function ()
|
|
{
|
|
$("#accountingperiod").prop("disabled", $(this).prop("checked"));
|
|
$("#accountingperiod").toggleClass("required", !$(this).prop("checked"));
|
|
})
|
|
});
|
|
|
|
|
|
function pre_submit()
|
|
{
|
|
var period = $("#accountingperiod").val();
|
|
if (!$("#generate").prop("checked") && (!period || !period.match(/^\d{4}\-\d{1,2}$/)))
|
|
{
|
|
FcltMgr.alert(L("lcl_shared_validator_format"));
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
} |