var dv = AppGiniHelper.DV;
// dv.getField("pilot").size(250);
dv.getField("anzahl_fluege").size(150);
dv.getField("anzahl_fluege_120").size(150);
dv.getField("max_flughoehe").size(150);
dv.getField("beginn").size(350);
dv.getField("ende").size(350);

dv.setTitle('Flugbucheintrag - Flight log entry');

dv.getField("unterschrift").insertAbove().h3("Ich habe die MFBO gelesen und halte mich daran / I have read the MFBO and adhere to it");

let options = {
    width: 320,
    height: 240,
    onReady: function(pad) {

    },
    penColor: 'blue'
}

// replace FIELDNAME
// pass options as 2nd parameter
new AppGiniHelperDVSignature.Pad("unterschrift", options);




// populate curent date time for NEW record
$j(function () {
    // check if data (record) exist or not
    if ($j('#beginn').val()) return;
    // populate the current date time (using moment.js)
    $j('#beginn').val(moment().format('H:mm'));
});
// populate curent date time for NEW record
$j(function () {
    // check if data (record) exist or not
    if ($j('#ende').val()) return;
    // populate the current date time (using moment.js)
    $j('#ende').val(moment().add(180, 'minutes').format('H:mm'));
});

var f1 = dv.addFooter();
f1.append("JF - Flugbuch - Aeroclub");

new AppGiniFields(["erfasser", "erfasst", "geaendert_von", "geaendert"]).hide();



