sms erros on pin reset
authorMark <mark@nirph.com>
Fri, 23 Dec 2016 12:57:45 +0000 (14:57 +0200)
committerMark <mark@nirph.com>
Fri, 23 Dec 2016 12:57:45 +0000 (14:57 +0200)
module/Config/src/Config/Entity/Config.php
module/User/src/User/Service/Profile.php
module/Utility/src/Utility/Comms/Notification.php
public/js/app/admin-workspace/systemuserview.js
public/js/app/portal-workspace/stockview.js
public/js/app/workspace.js

index bbd0b6f..3374ed4 100644 (file)
@@ -82,7 +82,7 @@ class Config
        /**
         * @ORM\Column(type="boolean", name="sms_new_pin");
         */
        /**
         * @ORM\Column(type="boolean", name="sms_new_pin");
         */
-       protected $smsNewPin = false;
+       protected $smsNewPin = true;
 
        /**
         * @ORM\Column(type="boolean", name="sms_customer_valuation");
 
        /**
         * @ORM\Column(type="boolean", name="sms_customer_valuation");
index bb40e11..5ffaa7b 100644 (file)
@@ -411,7 +411,7 @@ class Profile extends \User\DataBin\Profile
                                $templateName,
                                $params
                );
                                $templateName,
                                $params
                );
-               \Utility\Debug::errorLog("Profile","send from template");
+               \Utility\Debug::errorLog("sendPinResetNotification","sms:".$mobile." email:".$email);
        }
 
        /**
        }
 
        /**
index 05bddc4..818b74e 100644 (file)
@@ -78,7 +78,7 @@ class Notification
                $disableSms = false, $offline = false
        )
        {
                $disableSms = false, $offline = false
        )
        {
-               \Utility\Debug::errorLog("send from template","sms & email");
+               \Utility\Debug::errorLog("send from template","sms:".$mobile." email:".$email);
                #-> Unsubscribe check.
                $em = \Utility\Registry::getEntityManager();
                if (!self::$_sendAsNewsletter && !self::$_skipSubscriptionCheck)
                #-> Unsubscribe check.
                $em = \Utility\Registry::getEntityManager();
                if (!self::$_sendAsNewsletter && !self::$_skipSubscriptionCheck)
index 958e9e6..b167914 100644 (file)
                                App.API.getTask(
                                                'PinReset:' + _w.systemuserview.itemId, 'User', 'Profile.ForgotPassword', null,
                                                {}, function () {
                                App.API.getTask(
                                                'PinReset:' + _w.systemuserview.itemId, 'User', 'Profile.ForgotPassword', null,
                                                {}, function () {
+                                               //( id, data, options, callback, errorCallback, method, direct )
                                                        App.API.execTask(
                                                                        'PinReset:' + _w.systemuserview.itemId, {
                                                                                Reset : {
                                                        App.API.execTask(
                                                                        'PinReset:' + _w.systemuserview.itemId, {
                                                                                Reset : {
-                                                                                       email : _w.systemuserview.itemData.email
+                                                                                       email : _w.systemuserview.itemData.email,
+                                                                                       mobile : _w.systemuserview.itemData.mobile
                                                                                }
                                                                }, {},
                                                                function() {
                                                                                }
                                                                }, {},
                                                                function() {
-                                                                       alert('Pin reset successfull.');
+                                                                       alert('Pin reset successful.');
                                                                }, _w.taskExecError
                                                        );
                                                }, _w.taskContractError
                                                                }, _w.taskExecError
                                                        );
                                                }, _w.taskContractError
index 4807290..e3aec03 100644 (file)
@@ -13,6 +13,7 @@
 
                onStockViewTemplateReady : function( template, event, eventData )
                {
 
                onStockViewTemplateReady : function( template, event, eventData )
                {
+                       console.log('onstockready');
                        _w.stockview.itemData = null;
                        _w.stockview.ti = _t[template];
                        _w.stockview.limited = ('limitedstockview' == template)
                        _w.stockview.itemData = null;
                        _w.stockview.ti = _t[template];
                        _w.stockview.limited = ('limitedstockview' == template)
index e672f1b..2af4f2a 100644 (file)
 
                taskContractError : function( response )
                {
 
                taskContractError : function( response )
                {
-                       console.log('here2', this.itemId);
-                       console.log('here2',this.itemData);
-                       console.log('here2',this.formMeta);
                        App.API.getTask(
                                        'getActiveAccount', 'User', 'Profile.ActiveAccount', null,
                                        {}, function() {
                        App.API.getTask(
                                        'getActiveAccount', 'User', 'Profile.ActiveAccount', null,
                                        {}, function() {
 
                taskExecError : function( response )
                {
 
                taskExecError : function( response )
                {
-                       console.log('here1', this.itemId);
-                       console.log('here1',this.itemData);
-                       console.log('here1',this.formMeta);
                        App.API.getTask(
                                        'getActiveAccount', 'User', 'Profile.ActiveAccount', null,
                                        {}, function() {
                        App.API.getTask(
                                        'getActiveAccount', 'User', 'Profile.ActiveAccount', null,
                                        {}, function() {