Add form submission, validation, rejection messaging

This commit is contained in:
gconsidine
2017-05-23 16:38:58 -04:00
parent c41dff7996
commit 19fa782fb4
21 changed files with 252 additions and 121 deletions

View File

@@ -1,10 +1,17 @@
<div class="col-sm-{{::col}}">
<div class="form-group at-u-flat">
<at-input-label state="state"></at-input-label>
<input type="text" class="form-control at-Input" ng-model="state.value"
<input type="text" class="form-control at-Input"
ng-class="{ 'at-Input--rejected': state.rejected }"
ng-model="state.value"
ng-attr-maxlength="{{ state.options.max_length || undefined }}"
ng-attr-tabindex="{{ tab || undefined }}"
ng-attr-placeholder="{{::state.placeholder || undefined }}"
ng-change="vm.check()" ng-disabled="state.disabled" />
ng-change="vm.check()"
ng-disabled="state.disabled || form.disabled" />
<p ng-if="state.rejected && !state.isValid" class="at-InputMessage--rejected">
{{ state.message }}
</p>
</div>
</div>