disabled save button for name change until value is different than stored name
This commit is contained in:
parent
7789eceea4
commit
ea900a1729
2 changed files with 8 additions and 1 deletions
|
|
@ -23,4 +23,11 @@ angular.module('copayApp.controllers').controller('preferencesAliasController',
|
||||||
$ionicHistory.goBack();
|
$ionicHistory.goBack();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
$scope.valueCheck = function() {
|
||||||
|
if ($scope.alias.value == wallet.credentials.walletName || $scope.alias.value == '') $scope.disableSave = true;
|
||||||
|
else $scope.disableSave = false;
|
||||||
|
};
|
||||||
|
$scope.$watch('alias.value', function(newvalue, oldvalue) {
|
||||||
|
$scope.valueCheck();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
class="button button-standard button-primary"
|
class="button button-standard button-primary"
|
||||||
ng-disabled="aliasForm.$invalid" translate>
|
ng-disabled="disableSave" translate>
|
||||||
Save
|
Save
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue