From 64b737761ef88cb1bfca8902641e0f984215c04c Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Sat, 11 Aug 2018 13:07:28 +0530 Subject: [PATCH] number issue --- .../application/models/Broadcast_model.php | 2 +- .../js/controllers/sendSMSsuperadminCtrl.js | 34 +++++++++++-------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Apollo/api/application/models/Broadcast_model.php b/Apollo/api/application/models/Broadcast_model.php index 4081ad80..e439c9e3 100755 --- a/Apollo/api/application/models/Broadcast_model.php +++ b/Apollo/api/application/models/Broadcast_model.php @@ -180,7 +180,7 @@ class Broadcast_model extends CI_Model { $this->db->insert_batch('T_BroadcastStatus', $data); if ($this->db->affected_rows() >= 1) { $result['msgStatus'] = true; - $result['message'] = "Successfully Messages Sended!!"; + $result['message'] = "Successfully Messages Sent!!"; } else { $result['msgStatus'] = false; $result['message'] = "error!!"; diff --git a/Apollo/assets/js/controllers/sendSMSsuperadminCtrl.js b/Apollo/assets/js/controllers/sendSMSsuperadminCtrl.js index c500cf8f..4081ab46 100755 --- a/Apollo/assets/js/controllers/sendSMSsuperadminCtrl.js +++ b/Apollo/assets/js/controllers/sendSMSsuperadminCtrl.js @@ -185,7 +185,7 @@ app.controller('sendSMSsuperadminCtrl', ["$scope", "$filter", "ngTableParams", " $scope.statusUpdate = { submit: function (form, msg_details) { - // alert() + //alert() var firstError = null; if (form.$invalid) { var field = null, firstError = null; @@ -363,22 +363,26 @@ app.controller('sendSMSsuperadminCtrl', ["$scope", "$filter", "ngTableParams", " var firstError = null; - // console.log(form.$invalid); - if (form.$invalid) { + var msgg = $scope.mobileNumList.message; + // console.log(msgg); + // return false; + if ((msgg =='')||(msgg ==undefined)) { + + swal(" ", "No Message Body.", "error"); // alert('in') - var field = null, firstError = null; - for (field in form) { - if (field[0] != '$') { - if (firstError === null && !form[field].$valid) { - firstError = form[field].$name; - } - if (form[field].$pristine) { - form[field].$dirty = true; - } - } - } - angular.element('.ng-invalid[name=' + firstError + ']').focus(); + // var field = null, firstError = null; + // for (field in form) { + // if (field[0] != '$') { + // if (firstError === null && !form[field].$valid) { + // firstError = form[field].$name; + // } + // if (form[field].$pristine) { + // form[field].$dirty = true; + // } + // } + // } + // angular.element('.ng-invalid[name=' + firstError + ']').focus(); } else {