%( do not use %include;perso_header %)
%include_perso_header;
%define;nav()
%end;
%define;pa_hide_script(xcnt)
$(document).ready(function(){
$("#paxcnt_p").on('change',function() {
if(this.value == "link")
$("#paxcnt_div").hide();
else
$("#paxcnt_div").show();
%($("#paxcnt_occupation").prop('readonly', true);%)
}).change();
});
%end;
%define;ch_hide_script(xcnt)
$(document).ready(function(){
$("#chxcnt_p").on('change',function() {
if(this.value == "link"){
$("#chxcnt_div").hide();
$("#chxcnt_sex_div").hide();
}
else {
$("#chxcnt_div").show();
$("#chxcnt_sex_div").show();
}
}).change();
});
%end;
%define;date(xlab,xvar,xdt)
%let;day_input;pattern="(?:0?[1-9]|1[0-9]|2[0-9]|3[0-1])" size="1" maxlength="2" %readonly;%in;
%let;month_input;pattern="(?:0?[1-9]|1[0-2]|VD|BR|FM|NI|PL|VT|GE|FL|PR|ME|TH|FT|JC|vd|br|fm|ni|pl|vt|ge|fl|pr|me|th|ft|jc)" size="1" maxlength="2" %readonly;%in;
%let;year_input;pattern="[?><~/+-]?\d*/?" size="4" maxlength="8" %readonly;%in;
%end;
%define;source(xvar,xx)
%end;
%define;note(xvar,xx)
%end;
%define;small_date(kind,xvar,xx,verbose)
%let;day_input;pattern="(?:0?[1-9]|1[0-9]|2[0-9]|3[0-1])" size="1" maxlength="2" %readonly;%in;
%let;month_input;pattern="(?:0?[1-9]|1[0-2]|VD|BR|FM|NI|PL|VT|GE|FL|PR|ME|TH|FT|JC|vd|br|fm|ni|pl|vt|ge|fl|pr|me|th|ft|jc)" size="1" maxlength="2" %readonly;%in;
%let;year_input;pattern="[?><~/-+]?\d*/?" size="4" maxlength="8" %readonly;%in;
%end;
%define;birth(xvar,xx,verbose)
%apply;small_date("birth","xvarb","xx","verbose")
%end;
%define;death(xvar,xx,verbose)
%apply;small_date("death","xvard","xx","verbose")
%end;
%define;parent(xcnt,xx)
%apply;birth("paxcnt","xx","true")
%apply;death("paxcnt","xx","true")
%end;
%define;insert_parent(xcnt)
%end;
%define;selector_fevent(xcnt)
%end;
%define;insert_fevent(xcnt)
%end;
%define;insert_witness(xcnt, wcnt)
%end;
%define;one_witness(xcnt, wcnt)
%end;
%define;one_fevent(xcnt, has_fevents)
%apply;date([*date/dates]0, "e_datexcnt", "event_date")
%if;(has_fevents and has_fwitness)
%foreach;fwitness;
%apply;one_witness(xcnt, wcnt)
%if;is_last;%apply;insert_witness(xcnt, wcnt)%end;
%end;
%else;
%apply;insert_witness(xcnt, "0")
%end;
%end
%define;card_header(xx,yy)
%end;
%nn;
%if;(evar_m="ADD_FAM" or evar_m="ADD_FAM_OK")
[*add::family/families]0
%elseif;(evar_m = "ADD_PAR" or evar_m="ADD_PAR_OK")
[*add::parents] %foreach;child;%child.first_name;%if;(child.occ!="").%child.occ;%end; %child.surname;%end;
%elseif;(evar_m = "MOD_FAM" or evar_m = "MOD_FAM_OK")
[*modify::family/families]0 # %evar_i;
%elseif;(evar_m = "MRG_DUP_FAM_Y_N" or evar_m = "MRG_FAM" or
evar_m = "MRG_FAM_OK" or evar_m = "MRG_MOD_FAM_OK")
[*merge::family/families]1 # %evar_i;
%end;
%let;l_on1s;onkeydown="if (event.keyCode == 13) if (!event.shiftKey) javascript:document.upd.submit()"%in;
%include;trl
%include;copyr
%include;js