<!-- $Id: templm/upddata.txt v7.0 2016/01/12 23:13:52 $ -->

%define;ldl()
  <option></option>
%end;

%define;ldl0(z1)
  %apply;ldlz1()
%end;

%define;ldl1()
  %foreach;entry;%foreach;value;<option>%html_encode.entry_value;%end;%end;
%end;

%define;ldl2()
  %let;l;%nb_results;%in;
  %if;(l < 20)
    <option id="o%evar.data">%l;
    %foreach;entry;%foreach;value;<option>%html_encode.entry_value;%end;%end;
  %else;
    <option id="o%evar.data">%l;
    %foreach;initial;<option>%html_encode.ini;%end;
  %end;
%end;

%if;(evar.datalist = "on")
  %if;(evar.data = "occu")%apply;ldl0(bvar.datalist_occu)
  %elseif;(evar.data = "place")%apply;ldl0(bvar.datalist_place)
  %elseif;(evar.data = "sn")%apply;ldl0(bvar.datalist_sn)
  %elseif;(evar.data = "fn")%apply;ldl0(bvar.datalist_fn)
  %elseif;(evar.data = "src")%apply;ldl0(bvar.datalist_src)
  %end;
%else;
  %include;upddata1
%end;
