diff --git a/package.json b/package.json index 81424dd959..08677ddea7 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "node-sass": "^4.11.0" }, "scripts": { + "deploy-branch": "grunt deploy-branch", "deploy-gh-pages": "grunt deploy", "start": "grunt && concurrently -k \"grunt watch\" \"grunt connect\"", "watch": "grunt watch", diff --git a/src/selfexclusion/selfexclusion.css b/src/selfexclusion/selfexclusion.css deleted file mode 100644 index 9d3ac885b6..0000000000 --- a/src/selfexclusion/selfexclusion.css +++ /dev/null @@ -1,44 +0,0 @@ -.self-exclusion .webtrader-dialog { - width: auto !important; -} - -.selfexclusion { - padding-bottom: 20px; -} - -.selfexclusion_headerContent { - padding: 10px; -} - -.selfexclusion_bodyContent { - margin: auto; - padding: 10px; - border: solid 1px #E5E5E5; - display: table; -} - -.selfexclusion_row { - display: table-row; -} - -.selfexclusion_col { - display: table-cell; - padding: 5px 5px 10px 5px; -} - -.selfexclusion_inputHint { - font-size: 11px; -} - -.selfexclusion .text-vertical-align { - line-height:2em; -} - -.selfexclusion_input { - width : 270px; -} - -.selfexclusion_updateBtnContainer { - text-align: center; - margin-top: 5px; -} diff --git a/src/selfexclusion/selfexclusion.es6 b/src/selfexclusion/selfexclusion.es6 index f240462498..35c0f2b3ca 100644 --- a/src/selfexclusion/selfexclusion.es6 +++ b/src/selfexclusion/selfexclusion.es6 @@ -85,6 +85,9 @@ const settingsData = { max_open_bets: null, session_duration_limit: null, exclude_until: null, + has_exclude_until: null, + is_iom_malta: null, + is_gamstop_client: null, timeout_until_date: null, timeout_until_time: null, binary_url_contact: getBinaryUrl('contact.html'), @@ -109,7 +112,6 @@ const settingsData = { const time = moment(scope.timeout_until_time, "HH:mm"); time_out.add(time.format('HH'), 'hours') .add(time.format('mm'), 'minutes'); - console.log(time_out, time.format('HH'),time.format('mm')); } if (time_out.isAfter(moment().add(6, "weeks"))) { message.push("Please enter a value less than 6 weeks for time out until.".i18n()); @@ -156,7 +158,7 @@ const settingsData = { if (message.length > 0) { message.forEach(function(msg, i) { - $.growl.error({ message: msg }); + $.growl.error({ message: msg, fixed: true }); }) return; } @@ -172,10 +174,10 @@ const settingsData = { $.growl.notice({ message: 'Your changes have been updated'.i18n() }); logoutBasedOnExcludeDateAndTimeOut(); setOrRefreshTimer(); + refreshData(); }) .catch(function(err) { - $.growl.error({ message: err.message }); - console.error(err); + $.growl.error({ message: err.message, fixed: true }); }); } }; @@ -245,16 +247,27 @@ const refreshData = function() { limits[index].set = true; } }); - + settingsData.has_exclude_until = response.get_self_exclusion.exclude_until; + const country_status = getCountryStatus(); + settingsData.is_iom_malta = country_status.has_iom_malta; + settingsData.is_gamstop_client = country_status.has_uk && country_status.has_iom_malta; logoutBasedOnExcludeDateAndTimeOut(); } }) .catch(function(err) { - $.growl.error({ message: err.message }); + $.growl.error({ message: err.message, fixed: true }); console.error(err); }); }; +const getCountryStatus = function() { + const authorize = local_storage.get('authorize'); + return { + has_iom_malta: /iom|malta/.test(authorize.landing_company_name), + has_uk: /gb/.test(authorize.country), + }; +} + const setOrRefreshTimer = function() { if (_.isUndefined(settingsData.session_duration_limit) || _.isNull(settingsData.session_duration_limit) || !_.isFinite(_.toNumber(settingsData.session_duration_limit))) return; diff --git a/src/selfexclusion/selfexclusion.html b/src/selfexclusion/selfexclusion.html index f736bdf5bf..1408880d94 100644 --- a/src/selfexclusion/selfexclusion.html +++ b/src/selfexclusion/selfexclusion.html @@ -1,108 +1,118 @@ -
If you are considering self-exclusion, you may wish to register with GAMSTOP.
+GAMSTOP is a free service that enables you to self-exclude from all online gambling companies licensed in Great Britain.
+To find out more and to sign up with GAMSTOP, please visit www.gamstop.co.uk.
+Self-exclusion on this website only applies to your Binary.com account and does not include other companies or websites.
+Since you feel the need to self-exclude, we strongly encourage you to exclude yourself from similar services that you may have signed up for.
+To self-exclude from all online gambling companies licensed in Great Britain, you may go to www.gamstop.co.uk.