mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-11 23:47:42 +00:00
Add support for multiline text fields.
This commit is contained in:
@@ -121,6 +121,36 @@ GuacAdmin.Field.TEXT = function() {
|
||||
GuacAdmin.Field.TEXT.prototype = new GuacAdmin.Field._HTML_INPUT();
|
||||
|
||||
|
||||
/**
|
||||
* A basic multiline text field.
|
||||
*
|
||||
* @augments GuacAdmin.Field
|
||||
*/
|
||||
GuacAdmin.Field.MULTILINE = function() {
|
||||
|
||||
// Call parent constructor
|
||||
GuacAdmin.Field.apply(this);
|
||||
|
||||
// Create backing element
|
||||
var element = GuacUI.createElement("textarea");
|
||||
|
||||
this.getValue = function() {
|
||||
return element.value;
|
||||
};
|
||||
|
||||
this.getElement = function() {
|
||||
return element;
|
||||
};
|
||||
|
||||
this.setValue = function(value) {
|
||||
element.value = value;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
GuacAdmin.Field.MULTILINE.prototype = new GuacAdmin.Field();
|
||||
|
||||
|
||||
/**
|
||||
* A basic password field.
|
||||
*
|
||||
@@ -882,6 +912,11 @@ GuacAdmin.ConnectionEditor = function(connection, parameters) {
|
||||
field = new GuacAdmin.Field.ENUM(parameter.options);
|
||||
break;
|
||||
|
||||
// Multiline text field
|
||||
case GuacamoleService.Protocol.Parameter.MULTILINE:
|
||||
field = new GuacAdmin.Field.MULTILINE();
|
||||
break;
|
||||
|
||||
default:
|
||||
continue;
|
||||
|
||||
|
Reference in New Issue
Block a user