%include;css %include;hed %message_to_wizard;
%( 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;
xlab
%if;([!dates order]0 = "ddmmyy" or [!dates order]0 = "ddmmyyyy" or [!dates order]0 = "dmyyyy") %elseif;([!dates order]0 = "mmddyyyy") %else; %end;
%if;([!dates order]0 = "ddmmyy" or [!dates order]0 = "ddmmyyyy" or [!dates order]0 = "dmyyyy") %elseif;([!dates order]0 = "mmddyyyy") %else; %end;
%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;
[*kind]
%if;([!dates order]0 = "ddmmyy" or [!dates order]0 = "ddmmyyyy" or [!dates order]0 = "dmyyyy") %elseif;([!dates order]0 = "mmddyyyy") %else; %end;
%nn;
%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)
[*witness/witness/witnesses]0 wcnt
[*sex]
%end; %define;one_fevent(xcnt, has_fevents)
%apply;selector_fevent(xcnt)
%apply;date([*date/dates]0, "e_datexcnt", "event_date")
%if;(event.e_src!="") %else; %end;
%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;
%apply;nav()

%hidden; %if;(evar_ip != "")%nl;%end; %if;(evar_i != "")%nl;%end; %if;(evar_m = "ADD_FAM" or evar_m = "ADD_FAM_OK") %nl; %elseif;(evar_m = "ADD_PAR" or evar_m="ADD_PAR_OK") %nl; %elseif;(evar_m = "MOD_FAM" or evar_m = "MOD_FAM_OK") %nl; %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") %if;(evar_ini1 != "" and evar_ini2 != "") %end; %if;(evar.iexcl != "") %end; %if;(evar.fexcl != "") %end; %nl; %end;

%apply;card_header("parents","parents")
%foreach;parent; %if;(cnt!=1 and bvar.multi_parents="yes")
%end; %apply;parent(cnt, "parent") %if;(bvar.multi_parents="yes")%apply;insert_parent(cnt)%end; %if;(bvar.multi_parents!="yes" and cnt=1)
%end; %end;
%apply;card_header("events","event/events")
%if;has_fevents; %foreach;fevent; %apply;one_fevent(cnt, has_fevents) %if;is_last; %apply;insert_fevent(cnt) %end; %end; %else; %apply;one_fevent("1", has_fevents) %apply;insert_fevent("1") %end;
%define;insert_child(xcnt)
%end; %define;invert_children(xcnt)
%end; %define;child(xcnt)

%apply;nth%with;[nth]%and;%cnt;%end; [*child/children]0
[*sex]
%apply;birth("chxcnt", "child", "true") %apply;death("chxcnt", "child", "true")
%end;
%apply;card_header("children","child/children")
%apply;insert_child("0") %foreach;child; %if;(cnt != 1) %apply;invert_children(cnt) %end;
%apply;child(cnt)

%apply;insert_child(cnt) %end;
%apply;card_header("sources","source/sources")
%if;(fsources!="") %else; %end;
%if;(bvar.origin_file = "on") %end;
%apply;card_header("comments","comment")
%include;toolbar
%sq;
%include;accent
%include;trl %include;copyr
%include;js