/**
 * File:	include/security/widgets.ycp
 * Module:	Security configuration
 * Summary:	Security widgets definitions
 * Authors:	Michal Svec <msvec@suse.cz>
 *
 * $Id: widgets.ycp 20097 2004-11-02 08:45:37Z jsuchome $
 *
 * This file contains the definitions of all widgets used by the
 * security module. They are all in one map (function) called
 * WIDGETS.

<pre>

The WIDGETS format:
-------------------

map WIDGETS = $[
    "Item unique ID" : $[
	"Widget" : "ComboBox",
	"Label" : "Item Label",
	"Options" : [ "option1", "option2", ... ],
	"Value" : "option2"
    ],
  ...
];

The "Value" is the current value of this option and one from "Options".

Particular "Options" can be either <string> or [ <string>, <string> ]. In the
latter case, the first string is used as ID and the second is displayed. For
example: [ "option1", ["option2",_("Option2 translation")], ... ].

Possible "Widget" values so far: "ComboBox, CheckBox, TextEntry".

Implementation:
---------------

map2widget("ID")
- look up the "ID" in the "WIDGETS" map
- create the widget

widget2value("ID")
- query UI for the widget with `id(ID)
- return its current value

updatewidget("ID")
- look up the "ID" and change its "Value" to the "val"
- updates the WIDGETS map
- called after start and after each subdialog [OK]
- must check if the value is in "Options"! (TODO)

processinput()
- return true (OK) or false (abort, back, nil, help!, ...)

</pre>

 *
 */

/**
 * @return map all widgets
 */

{

textdomain "security";

/**
 * All widgets are here
 */
map WIDGETS = $[

    "CONSOLE_SHUTDOWN" : $[
	"Widget" : "ComboBox",
	/* ComboBox label */
	"Label" : _("&Interpretation of Ctrl + Alt + Del:"),
	"Options" : [
	    /* ComboBox value */
	    ["ignore", _("Ignore")],
	    /* ComboBox value */
	    ["reboot", _("Reboot")],
	    /* ComboBox value */
	    ["halt", _("Halt")],
	],
	"Value" : "reboot"
    ],

    "CWD_IN_ROOT_PATH" : $[
	"Widget" : "CheckBox",
	/* CheckBox label */
	"Label" : _("&Current Directory in root's Path"),
	"Value" : "yes"
    ],

    "CWD_IN_USER_PATH" : $[
	"Widget" : "CheckBox",
	/* CheckBox label */
	"Label" : _("Curr&ent Directory in Path of Regular Users"),
	"Value" : "yes"
    ],

    "DISPLAYMANAGER_REMOTE_ACCESS" : $[
	"Widget" : "CheckBox",
	/* CheckBox label */
	"Label" : _("Allow Remote &Graphical Login"),
	"Value" : "no"
    ],

    "ENABLE_SYSRQ" : $[
	"Widget" : "CheckBox",
	/* CheckBox label */
	"Label" : _("Enable &Magic SysRq Keys"),
	"Value" : "no"
    ],

    "FAILLOG_ENAB" : $[
	"Widget" : "CheckBox",
	/* CheckBox label */
	"Label" : _("Record &Failed Login Attempts"),
	"Value" : "yes"
    ],

    "FAIL_DELAY" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("&Delay after Incorrect Login Attempt:"),
	"Value" : "3"
    ],

    "GID_MAX" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("Maxim&um"),
	"Value" : "60000"
    ],

    "GID_MIN" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("M&inimum"),
	"Value" : "101"
    ],

    "KDM_SHUTDOWN" : $[
	"Widget" : "ComboBox",
	/* ComboBox label */
	"Label" : _("&Shutdown Behavior of KDM:"),
	"Options" : [
	    /* ComboBox value */
	    ["root",_("Only root")],
	    /* ComboBox value */
	    ["all",_("All users")],
	    /* ComboBox value */
	    ["none",_("Nobody")],
	    /* ComboBox value */
	    ["local",_("Local users")],
	    /* ComboBox value */
	    ["auto",_("Automatic")],
	],
	"Value" : "all"
    ],

    "LASTLOG_ENAB" : $[
	"Widget" : "CheckBox",
	/* CheckBox label */
	"Label" : _("R&ecord Successful Login Attempts"),
	"Value" : "yes"
    ],

    "OBSCURE_CHECKS_ENAB" : $[
	"Widget" : "CheckBox",
	/* CheckBox label */
	"Label" : _("&Plausibility Test for Password"),
	"Value" : "yes"
    ],

    "PASSWD_ENCRYPTION" : $[
	"Widget" : "ComboBox",
	/* ComboBox label */
	"Label" : _("P&assword Encryption Method"),
	/* ComboBox values */
	"Options" : [["des","DES"],["md5","MD5"],["blowfish","Blowfish"]],
	"Value" : "des",
	"Notify" : "yes",
    ],

    "PASSWD_USE_CRACKLIB" : $[
	"Widget" : "CheckBox",
	/* CheckBox label */
	"Label" : _("&Checking New Passwords"),
	"Value" : "yes"
    ],

    "PASS_MAX_DAYS" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("Maxim&um"),
	"Value" : "99999"
    ],

    "PASS_MIN_DAYS" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("M&inimum"),
	"Value" : "0"
    ],

    "PASS_MIN_LEN" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("&Minimum Acceptable Password Length"),
	"Value" : "5"
    ],

    "PASS_WARN_AGE" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("&Days before Password Expires Warning:"),
	"Value" : "7"
    ],

    "PERMISSION_SECURITY" : $[
	"Widget" : "ComboBox",
	/* ComboBox label */
	"Label" : _("&Setting of File Permissions:"),
	"Options" : [
	    /* ComboBox value */
	    ["easy",_("Easy")],
	    /* ComboBox value */
	    ["secure",_("Secure")],
	    /* ComboBox value */
	    ["paranoid",_("Paranoid")],
	],
	"Value" : "secure"
    ],

    "RUN_UPDATEDB_AS" : $[
	"Widget" : "ComboBox",
	/* ComboBox label */
	"Label" : _("&User Launching updatedb:"),
	"Options" : [ "nobody", "root" ],
	"Value" : "nobody"
    ],

    "UID_MAX" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("Ma&ximum"),
	"Value" : "60000"
    ],

    "UID_MIN" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("&Minimum"),
	"Value" : "100"
    ],

/*
    "" : $[
	"Widget" : "",
	/* Widget label * /
	"Label" : _(""),
	/* Widget values * /
	"Options" : [["",_("")]],
	"Value" : ""
    ],

*/

];

/* EOF */
}
