Form-Validierung angepasst
This commit is contained in:
@@ -5,21 +5,8 @@ angular.module('starter.controllers', [])
|
||||
$scope.preis="";
|
||||
$scope.name="";
|
||||
$scope.freitext="";
|
||||
var showAlert=0;
|
||||
|
||||
$scope.validate = function() {
|
||||
showAlert=0;
|
||||
if ($scope.name.length < 1){
|
||||
showAlert=1;
|
||||
}
|
||||
if ($scope.freitext.length < 1){
|
||||
showAlert=1;
|
||||
}
|
||||
|
||||
if (showAlert==1){
|
||||
$scope.showAlert();
|
||||
return;
|
||||
}
|
||||
|
||||
var link = 'http://api.raataar.de/rosen/vorschau.php';
|
||||
|
||||
@@ -31,18 +18,9 @@ angular.module('starter.controllers', [])
|
||||
|
||||
};
|
||||
|
||||
$scope.showAlert = function() {
|
||||
var alertPopup = $ionicPopup.alert({
|
||||
title: 'Uuuupppsssiii',
|
||||
template: 'Bitte prüfe deine Eingaben.'
|
||||
});
|
||||
alertPopup.then(function(res) {
|
||||
console.log('Thank you for not eating my delicious ice cream cone');
|
||||
});
|
||||
};
|
||||
|
||||
function buysuccessHandler (result) {
|
||||
inappbilling.consumePurchase(successHandler, errorHandler, "3xrose");
|
||||
inappbilling.consumePurchase(successHandler, errorHandler, $scope.preis);
|
||||
}
|
||||
|
||||
function successHandler (result) {
|
||||
@@ -64,7 +42,7 @@ angular.module('starter.controllers', [])
|
||||
alert($scope.preis);
|
||||
|
||||
if((window.device && device.platform == "Android") && typeof inappbilling !== "undefined") {
|
||||
inappbilling.buy(buysuccessHandler, errorHandler,"3xrose");
|
||||
inappbilling.buy(buysuccessHandler, errorHandler, $scope.preis);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user