<% /*
    $Revision$
    $Id$

    File:           model_fac_email_setting.inc

    Description:

    Context:

    Notes:
*/
%>
<%

function model_fac_email_setting()
{
    this.records_name = "emailsettings";
    this.record_name = "emailsetting";
    this.table = "fac_email_setting";
    this.primary = "fac_email_setting_key";
    this.autfunction = "WEB_MLDMGT";  // de ernstige velden zijn blijven WEB_FACTAB
    this.record_title = L("fac_email_setting");
    this.records_title = L("fac_email_setting_m");

    this.fields = {
        "id": {
            "dbs": "fac_email_setting_key",
            "label": L("lcl_key"),
            "typ": "key",
            "required": true,
            "seq": "fac_s_fac_email_setting_key",
            "defaultvalue": null
        },
        "seqnr": {
            "dbs": "fac_email_setting_volgnr",
            "label": L("fac_email_setting_volgnr"),
            "typ": "number",
            "required": true  // de database zorgt voor defaultvalue 10
        },
        "name": {
            "dbs": "fac_email_setting_user",
            "label": L("fac_email_setting_user"),
            "typ": "varchar",
            "required": true
        },
        "from": {
            "dbs": "fac_email_setting_from",
            "label": L("fac_email_setting_from"),
            "typ": "varchar",
            "multiedit": true
        },
        "reqtext": {
            "dbs": "fac_email_setting_text",
            "label": L("fac_email_setting_text"),
            "typ": "varchar",
            "multiedit": true
        },
        "frommode": {
            "dbs": "fac_email_setting_frommode",
            "label": L("fac_email_setting_frommode"),
            "typ": "number",
            "required": true,
            "LOV": L("fac_email_setting_frommodeLOV"),
            "emptyoption": null,
            "readonly": !(user.has("WEB_FACTAB"))
        },
        "action": {
            "dbs": "fac_email_setting_action",
            "label": L("fac_email_setting_action"),
            "typ": "varchar",
            "defaultvalue" : "fac.processemail",
            "multiedit": true,
            "readonly": !(user.has("WEB_FACTAB"))
        },
        "stdmelding": {
            "dbs": "mld_stdmelding_key",
            "label": L("fac_email_setting_stdmelding_key"),
            "typ": "key",
            "foreign": "mld_stdmelding"
        },
        "expire": {
            "dbs": "fac_email_setting_expire",
            "label": L("fac_email_setting_expire"),
            "typ": "date",
            "readonly": true
        },
        "attachmentspath": {
            "dbs": "fac_email_setting_attachpath",
            "label": L("fac_email_setting_attachpath"),
            "typ": "varchar",
            "multiedit": true,
            "placeholder": "*flexfilespath",
            "readonly": !(user.has("WEB_FACTAB"))
        },
        "attachext": {
            "dbs": "fac_email_setting_attachext",
            "label": L("fac_email_setting_attachext"),
            "typ": "varchar",
            "placeholder": S("flexAllowedExt"),
            "multiedit": true
        },
        "reqattachext": {
            "dbs": "fac_email_setting_reqattachext",
            "label": L("fac_email_setting_reqattachext"),
            "typ": "varchar",
            "multiedit": true
        },
        "attachmaxkb": {
            "dbs": "fac_email_setting_attachmaxkb",
            "label": L("fac_email_setting_attachmaxkb"),
            "typ": "number",
            "multiedit": true
        },
        "loglevel": {
            "dbs": "fac_email_setting_loglevel",
            "label": L("fac_email_setting_loglevel"),
            "typ": "number",
            "required": true,
            "defaultvalue": 0,
            "multiedit": true,
            "readonly": !(user.has("WEB_FACTAB"))
        },
        "person": {
            "dbs": "prs_perslid_key_auth",
            "label": L("fac_email_setting_perslid_key"),
            "typ": "key",
            "foreign": "prs_perslid",
            "multiedit": true
        },
        "remark": {
            "dbs": "fac_email_setting_opmerking",
            "label": L("fac_email_setting_opmerking"),
            "typ": "memo"
        }
      };


    this.REST_GET    = generic_REST_GET(this);
    this.REST_POST   = generic_REST_POST(this);
    this.REST_PUT    = generic_REST_PUT(this);
    this.REST_DELETE = generic_REST_DELETE(this);
}
%>