KFNS#38265 setting "self_register_groep_keys" toegevoegd evenals implementatie aan self_register scherm

svn path=/Website/trunk/; revision=32775
This commit is contained in:
2017-02-09 12:22:53 +00:00
parent e7b270dfac
commit e3c0e155b8
2 changed files with 31 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ ANONYMOUS_Allowed = 1;
%>
<!--#include file="../Shared/common.inc"-->
<!--#include file="../Shared/iface.inc"-->
<!--#include file="../Shared/selector.inc"-->
<%
if (S("self_register") != 1)
@@ -39,9 +40,25 @@ if (S("self_register") != 1)
RWFIELDTR("prs_naam", "fld required", L("lcl_prs_person_name"), "", {required: true, maxlength: 60});
RWFIELDTR("prs_vrnaam", "fld", L("lcl_prs_person_voornaam"), "", {maxlength: 30});
RWFIELDTR("prs_email", "fld required", L("lcl_prs_person_email"), "");
RWFIELDTR("prs_telnr", "fld required", L("lcl_prs_person_phone"), "", { required: true, maxlength: 15 });
RWFIELDTR("prs_telnr", "fld required", L("lcl_prs_person_phone"), "", { required: true, maxlength: 15 });
RWFIELDTR("password1", "fld required", L("lcl_ch_password_new"), "", { required: true, html: " type=password" });
RWFIELDTR("password2", "fld required", L("lcl_ch_password_con"), "", { required: true, html: " type=password" });
var fac_groep_key_arr = S("self_register_groep_keys");
if (fac_groep_key_arr.length > 1)
{
var sql = "SELECT fac_groep_key, fac_groep_omschrijving"
+ " FROM fac_groep"
+ " WHERE fac_groep_key IN (" + fac_groep_key_arr + ")"
+ " ORDER BY fac_groep_omschrijving ASC";
FCLTselector("fac_groep_key",
sql,
{ label: L("fac_groep"),
emptyOption: L("lcl_qvw_select_view"),
required: true
});
}
BLOCK_END();
var buttons = [ {title: L("lcl_submit"), icon: "email.png", action: "self_submit()" },
{title: L("lcl_cancel"), icon: "undo.png", action: "FcltMgr.closeDetail( window )" }];

View File

@@ -47,7 +47,7 @@ var sql = "SELECT prs_perslid_key, "
oRs = Oracle.Execute(sql);
if (!oRs.eof)
{
if (oRs("prs_perslid_flags").Value & 2) // Unappoved
if (oRs("prs_perslid_flags").Value & 2) // Unapproved
{
var aanmaak = new Date(oRs("prs_perslid_aanmaak").Value);
var expire = new Date();
@@ -84,7 +84,18 @@ var err = Oracle.Execute(sql, true);
if (err.friendlyMsg)
abort_with_warning(err.friendlyMsg);
if (S("self_register_groep_key") > 0)
// S("self_register_groep_keys") heeft prioriteit over S("self_register_groep_key")
if (S("self_register_groep_keys").length)
{
var fac_groep_key = getFParamInt("fac_groep_key", S("self_register_groep_keys")[0]);
sql = "INSERT INTO fac_gebruikersgroep"
+ " (fac_groep_key, prs_perslid_key)"
+ " VALUES (" + fac_groep_key + ", " + prs_key + ")";
Oracle.Execute(sql);
}
else if (S("self_register_groep_key") > 0)
{
sql = "INSERT INTO fac_gebruikersgroep"
+ " (fac_groep_key, prs_perslid_key)"