Commit b678502c9c0a242fa33b97738e8d38194cd810ca

Authored by Palak Handa
1 parent 7e3bb10184
Exists in master and in 1 other branch paytm

update

Showing 2 changed files with 52 additions and 52 deletions   Show diff stats
pages/ambassador.html
... ... @@ -33,7 +33,7 @@
33 33 <div class="icon-circle-d">
34 34 <i class="material-icons" style="line-height: 30px;">email</i>
35 35 </div>
36   - <input type="email" name="email" ng-pattern="/^[^\s@]+@[^\s@]+\.[^\s@]+$/" class="text-input" required class="" ng-model="data.email" placeholder="Email Address" ng-blur="emailcheck(data.email)" ng-focus="removeError()" ng-change="enteremail(data.email); emailkeyPress(data.email)">
  36 + <input type="email" name="email" ng-pattern="/^[^\s@]+@[^\s@]+\.[^\s@]+$/" class="text-input" required class="" ng-model="data.email" placeholder="Email Address" ng-change="enteremail(data.email); emailkeyPress(data.email)">
37 37 <label class="error-message f-family" id="invalidEmail">Please enter a valid email address.</label>
38 38 <label ng-if="check">Email already exist.</label>
39 39 </div>
... ... @@ -42,7 +42,7 @@
42 42 <div class="icon-circle-e">
43 43 <i class="material-icons" style="line-height: 30px;">phone</i>
44 44 </div>
45   - <input type="text" ng-pattern="/^\d*(?:\.\d{1,2})?$/" title="Please enter only numberic numbers" maxlength="10" required class="text-input" ng-model="data.mobile" placeholder="Mobile No." ng-blur="numbercheck(data.mobile)" ng-focus="removeNoError()" ng-change="enternumber(data.mobile); phonekeyPress(data.mobile)">
  45 + <input type="text" ng-pattern="/^\d*(?:\.\d{1,2})?$/" title="Please enter only numberic numbers" maxlength="10" required class="text-input" ng-model="data.mobile" placeholder="Mobile No." ng-change="enternumber(data.mobile); phonekeyPress(data.mobile)">
46 46 <!-- <label class="error-message f-family" id="invalidNumber">Please enter only numeric value in mobile number field.</label> -->
47 47 <label ng-if="numberCheck">Contact Number already exist.</label>
48 48 </div>
... ...
... ... @@ -24,7 +24,7 @@
24 24 })
25 25  
26 26 // route for the ambassador page
27   - .when('/ambassador', {
  27 + .when('/startupJalsaPromocode', {
28 28 templateUrl: 'pages/ambassador.html',
29 29 controller: 'ambassadorController'
30 30 })
... ... @@ -1075,55 +1075,55 @@
1075 1075 $('#alreadyExist').css('display', 'none');
1076 1076 };
1077 1077  
1078   - $scope.emailcheck = function(val) {
1079   - consol.log("kdsbd")
1080   - $scope.space = /\s/g.test(val);
1081   - console.log("space",$scope.space)
1082   - if (val == undefined) {
1083   - $('#invalidEmail').css('display', 'block');
1084   - } else {
1085   - $http({
1086   - method: 'GET',
1087   - url: BASE_URL + '/ambassadors?filter={"where": {"email": {"like":"%25' + $scope.data.email + '%25"}}}',
1088   - headers: {}
1089   - }).then(function mySuccess(searchResult) {
1090   - console.log("searchResult1===>", searchResult)
1091   - if (searchResult.data.length == 0) {
1092   - $scope.check = false;
1093   - } else {
1094   - $scope.check = true;
1095   - $('#alreadyExist').css('display', 'block');
1096   - }
1097   - }, function myError(error) {});
1098   - }
1099   - };
1100   -
1101   - $scope.removeNoError = function() {
1102   - $('#invalidNumber').css('display', 'none');
1103   - $('#noExist').css('display', 'none');
1104   - };
1105   -
1106   - $scope.numbercheck = function(number) {
1107   - // if (val == undefined) {
1108   - // $('#invalidNumber').css('display', 'block');
1109   - // } else {
1110   - $http({
1111   - method: 'GET',
1112   - url: BASE_URL + '/ambassadors?filter={"where": {"mobile": {"like":"%25' + number + '%25"}}}',
1113   - data: $scope.data,
1114   - headers: {}
1115   - }).then(function mySuccess(searchResult) {
1116   - console.log("searchResult===>", searchResult)
1117   - if (searchResult.data.length == 0) {
1118   - $scope.numberCheck = false;
1119   - } else {
1120   - $scope.numberCheck = true;
1121   - $('#noExist').css('display', 'block');
1122   - }
1123   - }, function myError(error) {});
1124   - //}
1125   -
1126   - };
  1078 + // $scope.emailcheck = function(val) {
  1079 + // consol.log("kdsbd")
  1080 + // $scope.space = /\s/g.test(val);
  1081 + // console.log("space",$scope.space)
  1082 + // if (val == undefined) {
  1083 + // $('#invalidEmail').css('display', 'block');
  1084 + // } else {
  1085 + // $http({
  1086 + // method: 'GET',
  1087 + // url: BASE_URL + '/ambassadors?filter={"where": {"email": {"like":"%25' + $scope.data.email + '%25"}}}',
  1088 + // headers: {}
  1089 + // }).then(function mySuccess(searchResult) {
  1090 + // console.log("searchResult1===>", searchResult)
  1091 + // if (searchResult.data.length == 0) {
  1092 + // $scope.check = false;
  1093 + // } else {
  1094 + // $scope.check = true;
  1095 + // $('#alreadyExist').css('display', 'block');
  1096 + // }
  1097 + // }, function myError(error) {});
  1098 + // }
  1099 + // };
  1100 +
  1101 + // $scope.removeNoError = function() {
  1102 + // $('#invalidNumber').css('display', 'none');
  1103 + // $('#noExist').css('display', 'none');
  1104 + // };
  1105 +
  1106 + // $scope.numbercheck = function(number) {
  1107 + // // if (val == undefined) {
  1108 + // // $('#invalidNumber').css('display', 'block');
  1109 + // // } else {
  1110 + // $http({
  1111 + // method: 'GET',
  1112 + // url: BASE_URL + '/ambassadors?filter={"where": {"mobile": {"like":"%25' + number + '%25"}}}',
  1113 + // data: $scope.data,
  1114 + // headers: {}
  1115 + // }).then(function mySuccess(searchResult) {
  1116 + // console.log("searchResult===>", searchResult)
  1117 + // if (searchResult.data.length == 0) {
  1118 + // $scope.numberCheck = false;
  1119 + // } else {
  1120 + // $scope.numberCheck = true;
  1121 + // $('#noExist').css('display', 'block');
  1122 + // }
  1123 + // }, function myError(error) {});
  1124 + // //}
  1125 +
  1126 + // };
1127 1127  
1128 1128 $scope.submit = function() {
1129 1129 console.log($scope.data.name)
... ...