HCAS#35893 geen objectselector als geen geldige objecten EN als object kiezen niet verplicht
svn path=/Website/trunk/; revision=29690
This commit is contained in:
@@ -486,19 +486,24 @@ if (action != "forward")
|
||||
var sql = get_objecten_sql(plaats_key, plaats_niveau, user_key, null, mld_info.stdm);
|
||||
var tsql = "SELECT count(*) aantal FROM (" + sql + ")";
|
||||
var toRs = Oracle.Execute(tsql);
|
||||
var aantalObj = toRs("aantal").value;
|
||||
toRs.close();
|
||||
var EmptyOption = true;
|
||||
if ((toRs("aantal").value == 1) && mld_info.srtinst_verplicht)
|
||||
EmptyOption = false;
|
||||
FCLTselector( "r_objs"
|
||||
, sql
|
||||
, { initKey: ins_keys_arr.length?ins_keys_arr[0]:-1
|
||||
, label: L("lcl_gerelateerdeobjecten")
|
||||
, mobile: true
|
||||
, extraParamValue: "ins_alg_ruimte_key,ins_alg_ruimte_type"
|
||||
, emptyOption: (EmptyOption ? L("lcl_select_object") : null)
|
||||
, required: mld_info.srtinst_verplicht
|
||||
}
|
||||
);
|
||||
if (aantalObj > 0 || mld_info.srtinst_verplicht)
|
||||
{
|
||||
if (aantalObj && mld_info.srtinst_verplicht)
|
||||
EmptyOption = false;
|
||||
FCLTselector( "r_objs"
|
||||
, sql
|
||||
, { initKey: ins_keys_arr.length?ins_keys_arr[0]:-1
|
||||
, label: L("lcl_gerelateerdeobjecten")
|
||||
, mobile: true
|
||||
, extraParamValue: "ins_alg_ruimte_key,ins_alg_ruimte_type"
|
||||
, emptyOption: (EmptyOption ? L("lcl_select_object") : null)
|
||||
, required: mld_info.srtinst_verplicht
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
else if (ins_name_arr.length)
|
||||
ROFIELD("fld", L("lcl_gerelateerdeobjecten"), ins_name_arr.join("\n"), {multi: ins_name_arr.length > 1});
|
||||
|
||||
Reference in New Issue
Block a user