Disable spellcheck on some fields

This commit is contained in:
emanuele-f 2016-12-31 17:10:53 +01:00 committed by Simone Mainardi
parent 75b5fd068e
commit af9fc2fa10

View file

@ -39,7 +39,7 @@ alerts_active = ""
users_active = ""
ifaces_active = ""
logging_active = ""
local PREFS_INPUT_WIDTH_MEDIUM = "19em"
local PREFS_INPUT_WIDTH_MEDIUM = "18em"
if (subpage_active == nil or subpage_active == "") then
subpage_active = "users"
@ -274,11 +274,11 @@ function printAlerts()
prefsInputFieldPrefs("Notification Sender Username",
"Set the username of the sender of slack notifications", "ntopng.alerts.", "sender_username",
"ntopng Webhook", nil, showElements and showSlackNotificationPrefs, false)
"ntopng Webhook", nil, showElements and showSlackNotificationPrefs, false, nil, {attributes={spellcheck="false"}})
prefsInputFieldPrefs("Notification Wekhook",
"Send your notification to this slack URL", "ntopng.alerts.", "slack_webhook",
"", nil, showElements and showSlackNotificationPrefs, true, true)
"", nil, showElements and showSlackNotificationPrefs, true, true, {attributes={spellcheck="false"}, style={width=PREFS_INPUT_WIDTH_MEDIUM}})
if (ntop.isPro()) then
@ -367,7 +367,7 @@ function printUsers()
,
"ntopng.prefs.",
"google_apis_browser_key",
"", false, nil, nil, nil, {style={width="24em;"}, attributes={pattern="[a-zA-Z0-9]{39}"} --[[ Google API keys consist of 39 alphanumeric characters ]] })
"", false, nil, nil, nil, {style={width="25em;"}, attributes={pattern="[a-zA-Z0-9]{39}", spellcheck="false"} --[[ Google API keys consist of 39 alphanumeric characters ]] })
if ntop.isPro() then
print('<tr><th colspan=2 class="info">Authentication</th></tr>')
@ -401,7 +401,7 @@ function printUsers()
"Choose your account type",
labels_account, values_account, "posix", "primary", "multiple_ldap_account_type", "ntopng.prefs.ldap.account_type", nil, nil, nil, nil, showElements)
prefsInputFieldPrefs("LDAP Server Address", "IP address and port of LDAP server (e.g. ldaps://localhost:636). Default: \"ldap://localhost:389\".", "ntopng.prefs.ldap", "server", "ldap://localhost:389", nil, showElements, true, true, {attributes={pattern="ldap(s)?://[0-9.\\-A-Za-z]+(:[0-9]+)?", required="required"}, style={width=PREFS_INPUT_WIDTH_MEDIUM}})
prefsInputFieldPrefs("LDAP Server Address", "IP address and port of LDAP server (e.g. ldaps://localhost:636). Default: \"ldap://localhost:389\".", "ntopng.prefs.ldap", "server", "ldap://localhost:389", nil, showElements, true, true, {attributes={pattern="ldap(s)?://[0-9.\\-A-Za-z]+(:[0-9]+)?", spellcheck="false", required="required"}, style={width=PREFS_INPUT_WIDTH_MEDIUM}})
local elementToSwitchBind = {"bind_dn","bind_pwd"}
toggleTableButtonPrefs("LDAP Anonymous Binding","Enable anonymous binding.","On", "1", "success", "Off", "0", "danger", "toggle_ldap_anonymous_bind", "ntopng.prefs.ldap.anonymous_bind", "0", nil, elementToSwitchBind, true, showElements)
@ -419,12 +419,12 @@ function printUsers()
print('<input style="display:none;" type="text" name="_" data-ays-ignore="true" />')
print('<input style="display:none;" type="password" name="__" data-ays-ignore="true" />')
--
prefsInputFieldPrefs("LDAP Bind DN", "Bind Distinguished Name of LDAP server. Example: \"CN=ntop_users,DC=ntop,DC=org,DC=local\".", "ntopng.prefs.ldap", "bind_dn", "", nil, showElementsBind, true, false, {style={width=PREFS_INPUT_WIDTH_MEDIUM}})
prefsInputFieldPrefs("LDAP Bind DN", "Bind Distinguished Name of LDAP server. Example: \"CN=ntop_users,DC=ntop,DC=org,DC=local\".", "ntopng.prefs.ldap", "bind_dn", "", nil, showElementsBind, true, false, {attributes={spellcheck="false"}, style={width=PREFS_INPUT_WIDTH_MEDIUM}})
prefsInputFieldPrefs("LDAP Bind Authentication Password", "Bind password used for authenticating with the LDAP server.", "ntopng.prefs.ldap", "bind_pwd", "", "password", showElementsBind, true, false)
prefsInputFieldPrefs("LDAP Search Path", "Root path used to search the users.", "ntopng.prefs.ldap", "search_path", "", "text", showElements, nil, nil, {style={width=PREFS_INPUT_WIDTH_MEDIUM}})
prefsInputFieldPrefs("LDAP User Group", "Group name to which user has to belong in order to authenticate as unprivileged user.", "ntopng.prefs.ldap", "user_group", "", "text", showElements)
prefsInputFieldPrefs("LDAP Admin Group", "Group name to which user has to belong in order to authenticate as an administrator.", "ntopng.prefs.ldap", "admin_group", "", "text", showElements)
prefsInputFieldPrefs("LDAP Search Path", "Root path used to search the users.", "ntopng.prefs.ldap", "search_path", "", "text", showElements, nil, nil, {attributes={spellcheck="false"}, style={width=PREFS_INPUT_WIDTH_MEDIUM}})
prefsInputFieldPrefs("LDAP User Group", "Group name to which user has to belong in order to authenticate as unprivileged user.", "ntopng.prefs.ldap", "user_group", "", "text", showElements, nil, nil, {attributes={spellcheck="false"}})
prefsInputFieldPrefs("LDAP Admin Group", "Group name to which user has to belong in order to authenticate as an administrator.", "ntopng.prefs.ldap", "admin_group", "", "text", showElements, nil, nil, {attributes={spellcheck="false"}})
end
print('<tr><th colspan=2 style="text-align:right;"><button type="submit" onclick="return save_button_users();" class="btn btn-primary" style="width:115px">Save</button></th></tr>')