Skip to content

Commit c0905b5

Browse files
committed
Remove "password" text field variant type, as it gives a false sense of data security (use a secret vault instead).
1 parent 110cf58 commit c0905b5

3 files changed

Lines changed: 6 additions & 11 deletions

File tree

htdocs/js/pages/Base.class.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2495,14 +2495,8 @@ Page.Base = class Base extends Page {
24952495
var variant_def = find_object( config.ui.text_field_variants, { id: param.variant } );
24962496
if (variant_def) elem_icon = variant_def.icon;
24972497
}
2498-
if (param.variant == 'password') {
2499-
html += '<i class="mdi mdi-' + elem_icon + '">&nbsp;</i>';
2500-
html += '<span class="data_value">********</span>';
2501-
}
2502-
else {
2503-
html += '<i class="link mdi mdi-' + elem_icon + '" onClick="$P().copyPluginParamValue(this)" title="Copy to Clipboard">&nbsp;</i>';
2504-
html += '<span class="data_value">' + encode_entities(elem_value) + '</span>';
2505-
}
2498+
html += '<i class="link mdi mdi-' + elem_icon + '" onClick="$P().copyPluginParamValue(this)" title="Copy to Clipboard">&nbsp;</i>';
2499+
html += '<span class="data_value">' + encode_entities(elem_value) + '</span>';
25062500
}
25072501
else html += none;
25082502
break;

htdocs/js/pages/PageUtils.class.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4164,8 +4164,10 @@ Page.PageUtils = class PageUtils extends Page.Base {
41644164
case 'text':
41654165
if (param.variant && (param.variant !== 'text')) {
41664166
var variant = find_object( config.ui.text_field_variants, { id: param.variant } );
4167-
nice_type = variant.title;
4168-
nice_icon = variant.icon;
4167+
if (variant) {
4168+
nice_type = variant.title;
4169+
nice_icon = variant.icon;
4170+
}
41694171
}
41704172
if (param.value.toString().length) pairs.push([ 'Default', '&ldquo;' + strip_html(param.value) + '&rdquo;' ]);
41714173
else pairs.push([ "(No default)" ]);

internal/ui.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,6 @@
10481048
{ "id": "datetime-local", "title": "Date / Time", "icon": "calendar-clock" },
10491049
{ "id": "email", "title": "Email Address", "icon": "email-edit-outline" },
10501050
{ "id": "number", "title": "Number", "icon": "counter" },
1051-
{ "id": "password", "title": "Password", "icon": "form-textbox-lock" },
10521051
{ "id": "text", "title": "Plain Text", "icon": "form-textbox" },
10531052
{ "id": "time", "title": "Time", "icon": "clock-edit-outline" },
10541053
{ "id": "tel", "title": "Phone Number", "icon": "phone-dial" },

0 commit comments

Comments
 (0)