Merge pull request #5331 from gabrielbazan7/fix/doubleButtons

fix send feedback repeated buttons
This commit is contained in:
Javier Donadío 2016-12-23 10:45:21 -03:00 committed by GitHub
commit 6150e105c5
2 changed files with 4 additions and 3 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, $ionicHistory, $ionicConfig, $window, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess) {
angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, $ionicHistory, $ionicConfig, $window, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess, platformInfo) {
$scope.sendFeedback = function(feedback, goHome) {
@ -42,6 +42,7 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
};
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.isCordova = platformInfo.isCordova;
$scope.score = (data.stateParams && data.stateParams.score) ? parseInt(data.stateParams.score) : null;
$scope.feedback = {};

View file

@ -10,7 +10,7 @@
</button>
</ion-nav-buttons>
<ion-nav-buttons side="secondary">
<button ng-disabled="!feedback.value" class="button no-border" type="submit" ng-click="sendFeedback(feedback.value)" translate>
<button ng-show="isCordova" ng-disabled="!feedback.value" class="button no-border" type="submit" ng-click="sendFeedback(feedback.value)" translate>
Send
</button>
</ion-nav-buttons>
@ -40,7 +40,7 @@
</div>
<div ng-if="showForm" class="form-fade-in">
<textarea class="user-feedback" ng-model="feedback.value" rows="5" placeholder="{{'Your ideas, feedback, or comments' | translate}}" autofocus></textarea>
<button ng-disabled="!feedback.value" type="submit" class="button button-standard button-primary" ng-click="sendFeedback(feedback.value)" translate>
<button ng-show="!isCordova" ng-disabled="!feedback.value" type="submit" class="button button-standard button-primary" ng-click="sendFeedback(feedback.value)" translate>
Send
</button>
</div>