<!doctype html>
<html>
<head>
  <!-- $Id: templm/updfam.txt v7.0 2016/03/21 22:16:53 $ -->
  <title>%nn;
    %if;(evar_m = "ADD_FAM" or evar_m = "ADD_FAM_OK")
      [*add::family/families]0%nn;
    %elseif;(evar_m = "ADD_PAR")[*add::parents]0 - #%evar_ip;%nn;
    %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;
  </title>
  <meta name="robots" content="none"/>
  <meta charset="%charset;"/>
  <link rel="shortcut icon" href="%images_prefix;favicon_gwd.png"/>
  %include;css
  %include;js_upd
  %include;updind_updfam
%( <!-- Begin define --> %)
%let;lt1;<abbr title="%ak1;%ak2;%ak3;%ak7;">#</abbr>%in;
%let;lt2;<abbr title="%lta;%ltb;%ltc;">[date/dates]0</abbr>%in;
%let;lt3;
  <abbr title="[*place/places]0
           1[:] [birth] [father/mother]0
           2[:] [death] [father/mother]0
           3[:] [birth] [father/mother]1
           4[:] [death] [father/mother]1
           *[:] [marriage/marriages]0
           0[:] [birth] [child/children]0 1
           +[:] [death] [child/children]0 1">
         [place/places]0</abbr>
%in;
%let;lt4;title="%ak1;%ak2;%ak3;%ak7;%ak4;"%in;
%let;lt5;<abbr title="%ak3;%ak7;">#</abbr>%in;
%let;lt6;<abbr title="%lta;%ltb;">[date/dates]0</abbr>%in;
%define;load_focus()
  onload="oL1();oL2();%nn;
  %if;(evar_m = "ADD_FAM" or evar_m = "ADD_PAR" or evar_m = "MOD_FAM")
    jq1b('%evar.i;');%nn;
    %if;(evar_m = "ADD_FAM" or evar_m = "ADD_PAR")
      %if;(father.first_name = "")
        sIV('pa1_fn')%nn;
      %else;
        sIV('pa2_fn')%nn;
      %end;
    %elseif;(marriage.prec != "sure")
      sIV('lfc3')%nn;
    %else;
      addChild(1,1)%nn;
    %end;
  %end;
  "%nn;
%end;
%define;onjq1a(z1) onkeydown="if(event.keyCode == 13)tUC(this)" onblur="tUC(this);jq1a('z1')"%end;
%define;onjq1a1(z1) onkeydown="if(event.keyCode == 13)tUC1(this)" onblur="tUC1(this);jq1a('z1')"%end;
%define;accesskey(z1)
  %if;("z1"="marr") %lfa3; %end;
%end;
%define;place(z1,z2)
  <label>[place/places]0<input id=z1_place name=z1_place size=44 maxlength=200 value="%z2_place;" onblur="fillPlaceFam(this)" %l_on5;%/></label>
%end;
%define;date_place(xx,z1,z2,z3,z4,z5)
  %let;l_d;%xx.create.z1_day;%in;
  %let;l_m;%xx.create.z1_month;%in;
  %let;l_dd;%if;(l_d != "" and l_d < 10)0%end;%l_d;%in;
  %let;l_mm;%if;(l_m != "" and l_m < 10)0%end;%l_m;%in;
  %let;l_yy;%xx.create.z1_year;%in;
  <span class="dmyt">%nn;
  %if;(ldmy = "dd")
    <input id=z2_dd name=z2_dd class=d autocomplete=off size=1 maxlength=2 value="%l_dd;" onkeypress="javascript:return oKPdd(event,'z2','_dd','_mm');"%/>%nn;
    <input id=z2_mm name=z2_mm class=m autocomplete=off size=1 maxlength=2 value="%l_mm;" list="dlmonth" onkeypress="javascript:return oKPmm(event,'z2','_mm','_yy');" onkeydown="javascript:return oKD1(event,'z2_mm','z2_dd')"%/>%nn;
    <input id=z2_yy name=z2_yyyy class=ys autocomplete=off size=4 maxlength=12 value="%l_yy;" onkeypress="javascript:return cF2(event,'z3',z4,'z5');" onkeydown="if(event.keyCode == 13)javascript:evSD('z2');return oKD1(event,'z2_yy','z2_mm')" onblur="javascript:evSD('z2')"%/>%nn;
  %elseif;(ldmy = "mm")
    <input id=z2_mm name=z2_mm class=m autocomplete=off size=1 maxlength=2 value="%l_mm;" list="dlmonth" onkeypress="javascript:return oKPmm(event,'z2','_mm','_dd');"%/>%nn;
    <input id=z2_dd name=z2_dd class=d autocomplete=off size=1 maxlength=2 value="%l_dd;" onkeypress="javascript:return oKPdd(event,'z2','_dd','_yy');" onkeydown="javascript:return oKD1(event,'z2_dd','z2_mm')"%/>%nn;
    <input id=z2_yy name=z2_yyyy class=ys autocomplete=off size=4 maxlength=12 value="%l_yy;" onkeypress="javascript:return cF2(event,'z3',z4,'z5');" onkeydown="if(event.keyCode == 13)javascript:evSD('z2');return oKD1(event,'z2_yy','z2_dd')" onblur="javascript:evSD('z2')"%/>%nn;
  %else;
    <input id=z2_yy name=z2_yyyy class=ys autocomplete=off size=4 maxlength=12 value="%l_yy;" onkeypress="javascript:return cF2(event,'z3',z4,'z5');" onkeydown="if(event.keyCode == 13)javascript:evSD('z2')" onblur="javascript:evSD('z2')"%/>%nn;
    <input id=z2_mm name=z2_mm class=m autocomplete=off size=1 maxlength=2 value="%l_mm;" list="dlmonth" onkeypress="javascript:return oKPmm(event,'z2','_mm','_dd');" onkeydown="javascript:return oKD1(event,'z2_mm','z2_yy')"%/>%nn;
    <input id=z2_dd name=z2_dd class=d autocomplete=off size=1 maxlength=2 value="%l_dd;" onkeypress="javascript:return oKPdd(event,'z2','_dd','_pl');" onkeydown="javascript:return oKD1(event,'z2_dd','z2_mm')"%/>%nn;
  %end;
    <input id=z2_pl name=z2_pl size=44 maxlength=200 class="pl" value="%xx.create.z1_place;" onblur="fillPlaceFam(this)" %l_on5;%/></span>%nn;
%end;
%define;link_create1(z1,z2,z3,xx)
  %let;l1;%if;("z2"="1")M%else;F%end;%in;
  <input type="hidden" id="z1z2_p" name="z1z2_p" value="%xx.create;"%/>
  <input id="z1z2_occ" name="z1z2_occ" class="occz3" placeholder="%l1;" autocomplete="off" size="3" maxlength="8" onblur="oB4('z1z2')"
   %if;(xx.create="create")%elseif;(xx.occ = "") value="0" %else; value="%xx.occ;" %end;>
%end;
%define;link_create2(z1,z2,xx)
  %let;l;%xx.create.sex;%in;
  %let;l1;%if;(l="male")M%elseif;(l="female")F%else;N%end;%in;
  %let;l2;%if;(xx.create="create")%if;(l="male")0%elseif;(l="female")1%else;2%end;%end;%in;
  <input type="hidden" id="z1z2_sex" name="z1z2_sex" value="%l1;"%/>
  <input type="hidden" id="z1z2_p" name="z1z2_p" value="%xx.create;"%/>
  <input id="z1z2_occ" name="z1z2_occ" class="occ%l2;" placeholder="%l1;" autocomplete="off" size="5" maxlength="8" onkeypress="javascript:return oKP2(event,'z1','z2','_occ','')" onblur="oB2('z1z2')"
   %if;(xx.create="create") value="" %elseif;(xx.occ = "") value="0" %else; value="%xx.occ;" %end;>
%end;
%define;one_parent(z1)
  %let;l1;%if;(parent.create="link")hide%else;vis%end;%in;
  %if;("z1" = "1")
    <tr>
      <td>%apply;link_create1("pa","z1","0","parent")<div id="pa1_jq1"> </div></td>
      <td><input id="pa1_fn" name="pa1_fn" size="30" maxlength="200" placeholder="[first name/first names]0" value="%parent.first_name;" %lfa1;
           %sp;onkeypress="javascript:return cF2(event,'pa',1,'_fn');" %l_on3; %l_on8;%/><br
       %/><input id="pa1_sn" name="pa1_sn" class="ar" size="30" maxlength="200" placeholder="[surname/surnames]0" value="%parent.surname;"
           onkeypress="javascript:return cF2(event,'pa',1,'_sn');" %apply;onjq1a("pa1") %l_on7;%/></td>
      <td class="jq2"><div id="pa1_jq2"></div><div id="pa1_jq3"></div>
        <span id="dppa1" class="%l1;">%nn;
          %apply;date_place("parent","birth","pa1b","pa","1","b_yy")
          %apply;date_place("parent","death","pa1d","pa","1","d_yy")</span>
      </td>
      <td class="jq4"><div id="pa1_jq4"></div><input id="pa1_occupation" name="pa1_occupation" class="occu %l1;" size="40" maxlength="200" value="%parent.create.occupation;" %l_on4;%/></td>
    </tr>
  %else;
    <tr>
      <td>%apply;link_create1("pa","z1","1","parent")<div id="pa2_jq1"> </div></td>
      <td><input id="pa2_fn" name="pa2_fn" size="30" maxlength="200" placeholder="[first name/first names]0" value="%parent.first_name;"
           onkeypress="javascript:return cF2(event,'pa',2,'_fn');" %l_on3; %l_on8;%/><br
       %/><input id="pa2_sn" name="pa2_sn" class="ar" size="30" maxlength="200" placeholder="[surname/surnames]0" value="%parent.surname;"
           onkeypress="javascript:return cF2(event,'pa',2,'_sn');" %apply;onjq1a("pa2") %l_on7;%/></td>
      <td class="jq2"><div id="pa2_jq2"></div><div id="pa2_jq3"></div>
        <span id="dppa2" class="%l1;">%nn;
          %apply;date_place("parent","birth","pa2b","pa","2","b_yy")
          %apply;date_place("parent","death","pa2d","pa","2","d_yy")</span></td>
      <td class="jq4"><div id="pa2_jq4"></div><input id="pa2_occupation" name="pa2_occupation" class="occu %l1;" size="40" maxlength="200" value="%parent.create.occupation;" %l_on4;%/></td>
    </tr>
  %end;
%end;
%define;one_child(z1)
  %let;l1;%expr(z1+1)%in;
  %let;l2;%if;(child.create="link")hid%else;vis%end;%in;
  <tr id="chz1">
    <td>%apply;link_create2("ch","z1","child")<div id="chz1_jq1"> </div></td>
    <td><input id="chz1_fn" name="chz1_fn" size="30" maxlength="200" value="%child.first_name;"
         onkeypress="javascript:return cF2(event,'ch',z1,'_fn');" %apply;onjq1a1("chz1") %l_on8;%/><br
     %/><input type="hidden" id="chz1_sn" name="chz1_sn" class="ar" value="%child.surname;"
         onkeypress="javascript:return cF2(event,'ch',z1,'_sn');" %apply;onjq1a("chz1")%/></td>
    <td class="jq2"><div id="chz1_jq2"> </div><div id="chz1_jq3"> </div>
      <span id="dpchz1" class="%l2;">%nn;
        %apply;date_place("child","birth","chz1b","ch","z1","b_yy")
        %apply;date_place("child","death","chz1d","ch","z1","d_yy")</span></td>
    <td class="jq4"><div id="chz1_jq4"> </div><input id="chz1_occupation" name="chz1_occupation" class="occu %l2;" size="40" maxlength="200" value="%child.create.occupation" %l_on4;%/></td>
  </tr>
%end;
%( <!-- End define --> %)
</head>
<body%body_prop; id="upd" %apply;load_focus()>
%include;hed
%message_to_wizard;
<form name="upd" method="post" action="%action;">
<div id="jq" style="display:none"> </div>
<p style="display:none;">
  <span id=dmy>[!dates order]0</span>
  %hidden;
  <input type="hidden" name="rdsrc" value="%evar_rdsrc;"%/>
  %include;upd_datalist
  <input type="hidden" name="digest" value="%digest;"%/>
  %if;(evar_ip != "")<input type="hidden" name="ip" value="%evar_ip;"%/>%nl;%end;
  %if;(evar_i != "")<input type="hidden" name="i" value="%evar_i;"%/>%nl;%end;
  %if;(evar_m = "ADD_FAM" or evar_m = "ADD_FAM_OK")
    <input type="hidden" name="m" value="ADD_FAM_OK"%/>%nl;
  %elseif;(evar_m = "ADD_PAR")
    <input type="hidden" name="m" value="ADD_FAM_OK"%/>%nl;
  %elseif;(evar_m = "MOD_FAM" or evar_m = "MOD_FAM_OK")
    <input type="hidden" name="m" value="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")
    <input type="hidden" name="i2" value="%evar_i2;"%/>
    %if;(evar_ini1 != "" and evar_ini2 != "")
      <input type="hidden" name="ini1" value="%evar_ini1;"%/>
      <input type="hidden" name="ini2" value="%evar_ini2;"%/>
    %end;
    %if;(evar.iexcl != "")
      <input type="hidden" name="iexcl" value="%evar.iexcl;"%/>
    %end;
    %if;(evar.fexcl != "")
      <input type="hidden" name="fexcl" value="%evar.fexcl;"%/>
    %end;
    <input type="hidden" name="m" value="MRG_MOD_FAM_OK"%/>%nl;
  %end;
  %apply;hevent("marr","marriage")
  %apply;hevent("div","divorce")
</p>
<fieldset>
  <legend>
    %if;(evar_m = "ADD_FAM" or evar_m = "ADD_FAM_OK")
      [*add::family/families]0
    %elseif;(evar_m = "ADD_PAR")
      [*add::parents]0
    %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;
    &nbsp;&nbsp;<input type="submit" value="Ok"%/>
  </legend>
  <table>
    %foreach;parent;%apply;one_parent(cnt)%end;
 <tr><td colspan=4 style="border:0;text-align:left;padding:5px"><label><input type="checkbox" id="nsck" name="nsck" value="on"
    %if;(mrel = "nsck" or mrel = "nsckm") checked="checked"%end;%/> [no sexes check]</label></td></tr>
  </table>
</fieldset>
<fieldset>
  <legend>[*child/children]1</legend>
  <table>
    <tr>
      <td class="bg7"><abbr %lt4;>#</abbr></td>
      <td class="bg7">[first name/first names]0 /
        <a id="ch_hid" style="display:none;" href="javascript:visHid('ch','_sn')" title="[visualize/show/hide/summary]2 [surname/surnames]0">[surname/surnames]0</a>
        <a id="ch_vis" style="display:inline;" href="javascript:visHid('ch','_sn')" title="[visualize/show/hide/summary]1 [surname/surnames]0"><em>[surname/surnames]0</em></a></td>
      <td class="bg7">[birth] / [death][:] %lt6; %lt3;</td>
      <td class="bg7">[occupation/occupations]0</td>
    </tr>
    %foreach;child;%apply;one_child(cnt)%end;
    <tr id="new_child"><td colspan=4 style="display:none"></td></tr>
    <tr><td class="bg7"><a id="ach" href="javascript:addChild(1,1)" %lfa2;> + </a></td><td colspan=3 style="text-align:left;border:0"> %lfc2;</td></tr>
  </table>
</fieldset>
<fieldset class="event">
  <legend>[*event/events]1 %if;(evar.m!="ADD_FAM")<a id="chg_evt_fam" href="%prefix;m=CHG_EVT_FAM_ORD&i=%evar.i;&ip=%evar.ip;" %lpaO; title="[*invert::event/events]1 [family/families]0 (Alt+%lpcOk;)">⇳</a>%end;</legend>
  %if;has_fevents;%foreach;fevent;%apply;one_event(cnt,"","fwitness")%end;%else;%apply;one_event(1,"#marr","fwitness")%end;
  <dl id="new_event"></dl>
  <dl><dt><a href="javascript:addEvent(1,1)" %lfa4;>+ [event/events]0</a> %lfc4; %lt5; %lt2; [place/places]0 [note/notes]1 [source/sources]1</dt></dl>
</fieldset>
<fieldset class="f2 al">
  <legend>
    <label style="font-size:inherit" for="comment" %lfa5;>[*marriage notes/marriages notes]0</label>
  </legend>
  <label><textarea id="comment" name="comment" placeholder="[*comment]" rows="1" %l_on1s;>
    %if;(comment != "" and bvar.move_comment = "yes")
      %foreach;fevent;
        %if;((fevent.e_name = "#marr" or fevent.e_name = "#nmar" or fevent.e_name = "#nmen" or fevent.e_name ="#enga") and fevent.e_note != "")%comment;%end;
      %end;
    %else;
      %comment;%sq;
    %end;
  </textarea></label>
</fieldset>
<fieldset class="f2 w3">
  <legend>[*source/sources]1</legend>
    <label>
    %if;(fsources="")
    <input id="src" name="src" placeholder="[*source/sources]1 [family/families]0" maxlength="800" %lfa6; %l_on6; %l_on1s; value="%fsources;"/></label>
    %else;
    <textarea id="src" name="src" placeholder="[*source/sources]1 [family/families]0" rows="1" maxlength="800" %lfa6; %l_on1s;>%fsources;</textarea></label>
    %end;
    <label><textarea id="psrc" name="psrc" placeholder="[*source/sources]1 [person/persons]0" rows="1" maxlength="800" %l_on1s;>%if;(evar_psrc != "")%evar_psrc;%else;%evar_dsrc;%end;</textarea></label>
    %if;(bvar.origin_file = "on")
      <label>[file]<input name="origin_file" size="50" maxlength="200" value="%origin_file;"%/></label>
    %end;
</fieldset>
</form>
%base_trailer;
%include;copyr
%include;js
</body>
</html>
