Skip to content

Commit

Permalink
feat(view): prevent the user from updating the account type
Browse files Browse the repository at this point in the history
  • Loading branch information
DedrickEnc committed Oct 5, 2017
1 parent 5149eb8 commit bd95cd9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/src/modules/accounts/edit/accounts.edit.modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,20 @@

<!-- TODO(@jniles): can this just use ng-options? -->
<div class="form-group"
ng-class="{'has-error' : (AccountForm.type_id.$invalid && AccountForm.$submitted) || AccountEditCtrl.invalidTitleAccount}">
ng-class="{'has-error' : (AccountForm.type_id.$invalid && AccountForm.$submitted) || AccountEditCtrl.invalidTitleAccount}">
<label class="control-label" translate>FORM.LABELS.ACCOUNT_TYPE</label>
<select
class="form-control"
ng-model="AccountEditCtrl.account.type_id"
ng-change="AccountEditCtrl.titleChangedValidation(AccountEditCtrl.account.type_id)"
name="type_id"
ng-disabled="!AccountEditCtrl.isCreateState"
required>
<option value="" disabled translate>FORM.SELECT.ACCOUNT_TYPE</option>
<option ng-repeat="entry in AccountEditCtrl.types" value="{{entry.id}}" data-key="{{entry.translation_key}}" translate>{{entry.translation_key}}</option>
</select>


<div class="help-block" ng-if="AccountEditCtrl.invalidTitleAccount">
<span translate>ACCOUNT.TYPE_CHANGE_BLOCKED</span>
</div>
Expand Down

0 comments on commit bd95cd9

Please sign in to comment.