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 @@ -
-
+
+
Online trading can become addictive. Fill in the form below to limit your participation on the website or send a signed letter or fax to our customer support team. Once set, you can only tighten your limits. Limits - will only be removed or loosened after 7 days with the exception of the self- - exclusion date, which cannot be removed or altered once you have confirmed it. + will only be removed or loosened after 7 days with the exception of the + self-exclusion date, which cannot be removed or altered once you have confirmed it. To remove or increase your limits, please contact customer support.
-
-
-
Maximum account cash balance
-
- +
+

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.

+
+
+
+
Maximum account cash balance
+
+
- Once this limit is reached, you may no longer deposit. + Once this limit is reached, you may no longer deposit.
-
-
Daily turnover limit
-
- +
+
Daily turnover limit
+
+
- Maximum aggregate contract purchases per day + Maximum aggregate contract purchases per day
-
-
Daily limit on losses
-
- +
+
Daily limit on losses
+
+
- Maximum aggregate loss per day + Maximum aggregate loss per day
-
-
7-day turnover limit
-
- +
+
7-day turnover limit
+
+
- Maximum aggregate contract purchases over a 7-day period + Maximum aggregate contract purchases over a 7-day period
-
-
7-day limit on losses
-
- +
+
7-day limit on losses
+
+
- Maximum aggregate contract purchases over a 7-day period + Maximum aggregate contract purchases over a 7-day period
-
-
30-day turnover limit
-
- +
+
30-day turnover limit
+
+
- Maximum aggregate contract purchases over a 30-day period + Maximum aggregate contract purchases over a 30-day period
-
-
30-day limit on losses
-
- +
+
30-day limit on losses
+
+
- Maximum aggregate loss over a 30-day period + Maximum aggregate loss over a 30-day period
-
-
Maximum number of open positions
-
- +
+
Maximum number of open positions
+
+
-
-
Session duration limit, in minutes
-
- +
+
Session duration limit, in minutes
+
+
- You will be automatically logged out after such time + You will be automatically logged out after such time
-
-
Time out until
-
- +
+
Time out until
+
+
- Please enter date in the format YYYY-MM-DD + Please enter date in the format YYYY-MM-DD
-
- - Please enter time in the format HH:MM +
+ + Please enter time in the format HH:MM
-
-
Exclude me from the website until
-
- +
+
Exclude me from the website until
+
+
- Please enter date in the format YYYY-MM-DD + Please enter date in the format YYYY-MM-DD
-
- +
+ +
+
+

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.

diff --git a/src/selfexclusion/selfexclusion.scss b/src/selfexclusion/selfexclusion.scss new file mode 100644 index 0000000000..baed4ca4d9 --- /dev/null +++ b/src/selfexclusion/selfexclusion.scss @@ -0,0 +1,51 @@ +.self-exclusion { + padding-bottom: 20px; + + .webtrader-dialog { + width: auto !important; + } + .text-vertical-align { + line-height: 2em; + } + &_header { + padding: 10px; + + p { + margin-top: 0; + } + } + &_body { + margin: auto; + padding: 10px; + border: solid 1px #E5E5E5; + display: table; + } + &_row { + display: table-row; + } + &_col { + display: table-cell; + padding: 5px 5px 10px 5px; + } + &_input { + width : 270px; + + &-hint { + font-size: 11px; + } + } + &_update-btn { + &-container { + text-align: center; + margin-top: 20px; + } + } + &_notice { + margin: 10px auto; + color: #000; + background-color: #fef1cf; + padding: 10px; + overflow: hidden; + font-size: 16px; + } +} diff --git a/src/websitestatus/websitestatus.es6 b/src/websitestatus/websitestatus.es6 index c38e54ee9f..118d7fd469 100644 --- a/src/websitestatus/websitestatus.es6 +++ b/src/websitestatus/websitestatus.es6 @@ -32,4 +32,4 @@ const set_currency_config = (website_status) => { }; liveapi.events.on('website_status', website_status); -liveapi.cached.send({ website_status: 1 }).then(website_status); \ No newline at end of file +liveapi.cached.send({ website_status: 1 }).then(website_status);