GUACAMOLE-292: Add support for email fields.

This commit is contained in:
Michael Jumper
2017-02-22 01:04:27 -08:00
parent afd051e59f
commit 8830123c9b
8 changed files with 73 additions and 2 deletions

View File

@@ -47,6 +47,16 @@ angular.module('form').provider('formService', function formServiceProvider() {
templateUrl : 'app/form/templates/textField.html'
},
/**
* Email address field type.
*
* @see {@link Field.Type.EMAIL}
* @type FieldType
*/
'EMAIL' : {
templateUrl : 'app/form/templates/emailField.html'
},
/**
* Numeric field type.
*

View File

@@ -0,0 +1,8 @@
<div class="email-field">
<input type="email"
ng-model="model"
ng-hide="readOnly"
autocorrect="off"
autocapitalize="off"/>
<a href="mailto:{{model}}" ng-show="readOnly">{{model}}</a>
</div>

View File

@@ -17,11 +17,11 @@
* under the License.
*/
input[type=checkbox], input[type=number], input[type=text], input[type=radio], label, textarea {
input[type=checkbox], input[type=number], input[type=text], input[type=email], input[type=radio], label, textarea {
-webkit-tap-highlight-color: rgba(128,192,128,0.5);
}
div.location, input[type=text], input[type=number], input[type=password], textarea {
div.location, input[type=text], input[type=email], input[type=number], input[type=password], textarea {
border: 1px solid #777;
-moz-border-radius: 0.2em;
-webkit-border-radius: 0.2em;

View File

@@ -19,6 +19,7 @@
/* Do not stretch attributes to fit available area */
.attributes input[type=text],
.attributes input[type=email],
.attributes input[type=password],
.attributes input[type=number] {
width: auto;

View File

@@ -19,6 +19,7 @@
/* Do not stretch connection parameters to fit available area */
.connection-parameters input[type=text],
.connection-parameters input[type=email],
.connection-parameters input[type=password],
.connection-parameters input[type=number] {
width: auto;

View File

@@ -75,6 +75,14 @@ angular.module('rest').factory('Field', [function defineField() {
*/
TEXT : 'TEXT',
/**
* The type string associated with parameters that may contain an email
* address.
*
* @type String
*/
EMAIL : 'EMAIL',
/**
* The type string associated with parameters that may contain an
* arbitrary string, where that string represents the username of the