GUAC-1176: Migrate all field types to the new field registration service. Use field registration service within guacFormField directive.

This commit is contained in:
Michael Jumper
2015-06-05 00:09:52 -07:00
parent d292eb94ea
commit 48e10ab69a
13 changed files with 330 additions and 164 deletions

View File

@@ -0,0 +1 @@
<input type="checkbox" ng-model="typedValue" autocorrect="off" autocapitalize="off"/>

View File

@@ -24,24 +24,8 @@
<!-- Field header -->
<span class="field-header">{{getFieldHeader() | translate}}</span>
<!-- Generic input types -->
<!-- Field content -->
<div class="form-field">
<input ng-show="field.type === 'TEXT'" type="text" ng-model="typedValue" autocorrect="off" autocapitalize="off"/>
<input ng-show="field.type === 'NUMERIC'" type="number" ng-model="typedValue" autocorrect="off" autocapitalize="off"/>
<input ng-show="field.type === 'USERNAME'" type="text" ng-model="typedValue" autocorrect="off" autocapitalize="off"/>
<input ng-show="field.type === 'BOOLEAN'" type="checkbox" ng-model="typedValue" autocorrect="off" autocapitalize="off"/>
<!-- Password field -->
<div ng-show="field.type === 'PASSWORD'" class="password-field">
<input type="{{passwordInputType}}" ng-model="typedValue" autocorrect="off" autocapitalize="off"/>
<div class="icon toggle-password" ng-click="togglePassword()" title="{{getTogglePasswordHelpText() | translate}}"></div>
</div>
<!-- Multiline field -->
<textarea ng-show="field.type === 'MULTILINE'" ng-model="typedValue" autocorrect="off" autocapitalize="off"></textarea>
<!-- Enumerated field -->
<select ng-show="field.type === 'ENUM'" ng-model="typedValue" ng-options="option.value as getFieldOption(option.value) | translate for option in field.options | orderBy: value"></select>
</div>
</label>

View File

@@ -0,0 +1 @@
<input type="number" ng-model="typedValue" autocorrect="off" autocapitalize="off"/>

View File

@@ -0,0 +1,4 @@
<div class="password-field">
<input type="{{passwordInputType}}" ng-model="model" autocorrect="off" autocapitalize="off"/>
<div class="icon toggle-password" ng-click="togglePassword()" title="{{getTogglePasswordHelpText() | translate}}"></div>
</div>

View File

@@ -0,0 +1 @@
<select ng-model="model" ng-options="option.value as getFieldOption(option.value) | translate for option in field.options | orderBy: value"></select>

View File

@@ -0,0 +1 @@
<textarea ng-model="model" autocorrect="off" autocapitalize="off"></textarea>

View File

@@ -0,0 +1 @@
<input type="text" ng-model="model" autocorrect="off" autocapitalize="off"/>