Skip to content

Commit b914575

Browse files
committed
luci-base: give TextValue form elements separate readonly and disabled
textarea widgets have more value as readonly and not disabled, than just disabled: you can scroll through them when they're readonly and not disabled. So give the form element separate readonly and disabled properties, so textarea elements defined as readonly with a large amount of content still cannot be modified, but at least the whole content can be viewed (because the textarea scrollbars still function). Signed-off-by: Paul Donald <[email protected]>
1 parent 01201ee commit b914575

File tree

1 file changed

+2
-1
lines changed
  • modules/luci-base/htdocs/luci-static/resources

1 file changed

+2
-1
lines changed

modules/luci-base/htdocs/luci-static/resources/form.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4601,7 +4601,8 @@ const CBITextValue = CBIValue.extend(/** @lends LuCI.form.TextValue.prototype */
46014601
rows: this.rows,
46024602
wrap: this.wrap,
46034603
validate: L.bind(this.validate, this, section_id),
4604-
disabled: (this.readonly != null) ? this.readonly : this.map.readonly
4604+
readonly: (this.readonly != null) ? this.readonly : this.map.readonly,
4605+
disabled: (this.disabled != null) ? this.disabled : null,
46054606
});
46064607

46074608
return widget.render();

0 commit comments

Comments
 (0)