Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scss/shared/_general.scss
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ input {
top: 2px;
position: relative;
}
&[type="date"] {
&[type="date"], &[type="datetime-local"] {
min-height: 30px!important;
}
&[type="date"]::-webkit-calendar-picker-indicator {
&[type="date"]::-webkit-calendar-picker-indicator, &[type="datetime-local"]::-webkit-calendar-picker-indicator {
color: $secondaryContentColor;
}
}
Expand Down
10 changes: 9 additions & 1 deletion www/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,15 @@
"success": "Success",
"warning": "Warning",
"not_zero": "Value can not be 0",
"error": "Sorry, an error occurred while processing your request."
"error": "Sorry, an error occurred while processing your request.",
"customer_support": "customer support",
"info": "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. To remove or increase your limits, please contact",
"ukgc_info_1": "If you are considering self-exclusion, you may wish to register with GAMSTOP.",
"ukgc_info_2": "GAMSTOP is a free service that enables you to self-exclude from all online gambling companies licensed in Great Britain.",
"ukgc_info_3": "To find out more and to sign up with GAMSTOP, please visit",
"info_bottom_1": "Self-exclusion on this website only applies to your Binary.com account and does not include other companies or websites.",
"info_bottom_2": "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.",
"info_bottom_3": "To self-exclude from all online gambling companies licensed in Great Britain, you may go to "
},
"profile": {
"personal_details": "Personal Details",
Expand Down
39 changes: 35 additions & 4 deletions www/js/pages/self-exclusion/self-exclusion.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,27 @@
(function() {
angular.module("binary.pages.self-exclusion.controllers").controller("SelfExclusionController", SelfExclusion);

SelfExclusion.$inject = ["$scope", "$translate", "alertService", "websocketService", "validationService"];

function SelfExclusion($scope, $translate, alertService, websocketService,
validationService) {
SelfExclusion.$inject = [
"$scope",
"$state",
"$translate",
"$ionicScrollDelegate",
"alertService",
"websocketService",
"accountService",
"validationService"
];

function SelfExclusion(
$scope,
$state,
$translate,
$ionicScrollDelegate,
alertService,
websocketService,
accountService,
validationService
) {
const vm = this;
vm.hasError = false;
vm.validation = validationService;
Expand All @@ -25,7 +42,10 @@
vm.disableUpdateButton = true;
vm.isDataLoaded = false;
vm.disableForZeroValues = false;
let isUpdated = false;
vm.data = {};
const account = accountService.getDefault();
vm.country = account.country;
const noZeroValues = ['max_balance', 'max_turnover', 'max_losses', 'max_7day_turnover', 'max_7day_losses',
'max_30day_turnover', 'max_30day_losses', 'max_open_bets'];

Expand Down Expand Up @@ -55,6 +75,12 @@
});
vm.limits = _.clone(vm.data);
vm.disableUpdateButton = false;
if (isUpdated) {
isUpdated = false;
if (vm.country === 'gb') {
$ionicScrollDelegate.scrollBottom();
}
}
});

$scope.$on("set-self-exclusion:error", (e, error) => {
Expand Down Expand Up @@ -97,6 +123,7 @@
let stringify = JSON.stringify(data);
stringify = stringify.replace(/:(\d+)([,}])/g, ':"$1"$2');
websocketService.sendRequestFor.setSelfExclusion(JSON.parse(stringify));
isUpdated = true;
}

$scope.$on('get_limits', (e, limits) => {
Expand All @@ -109,6 +136,10 @@
vm.hasError = true;
});

vm.goToContact = () => {
$state.go('contact');
};

const init = () => getLimits();

init();
Expand Down
64 changes: 59 additions & 5 deletions www/js/pages/self-exclusion/self-exclusion.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,38 @@ <h1 class="page-title">
</div>
</div>
<form name="self_exclusion_form" ng-submit="vm.submit()" ng-if="vm.isDataLoaded" novalidate>
<div class="row">
<div class="col">
<div class="row info-container">
<div class="col">
{{ 'self-exclusion.info' | translate }}
<a ng-click="vm.goToContact()">
{{ 'profile.customer_support' | translate }}.
</a>
</div>
</div>
</div>
</div>
<div class="row" ng-if="vm.country === 'gb'">
<div class="col">
<div class="row info-container">
<div class="col">
{{ 'self-exclusion.ukgc_info_1' | translate }}
</div>
</div>
<div class="row info-container">
<div class="col">
{{ 'self-exclusion.ukgc_info_2' | translate }}
</div>
</div>
<div class="row info-container">
<div class="col">
{{ 'self-exclusion.ukgc_info_3' | translate }}
<a href='https://www.gamstop.co.uk/' target="_blank">www.gamstop.co.uk</a>.
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="row">
Expand Down Expand Up @@ -407,11 +439,13 @@ <h1 class="page-title">
</div>
<div class="row">
<div class="col item-input">
<input name="exclude_me_until"
type="date"
ng-model="vm.data.exclude_until"
maxlength="10"
min="{{ vm.nextSixMonths }}"/>
<label class="item item-input">
<input name="exclude_me_until"
type="date"
ng-model="vm.data.exclude_until"
maxlength="10"
min="{{ vm.nextSixMonths }}"/>
</label>
<div class="hint"> {{ 'self-exclusion.exclude_me_hint' | translate }}</div>
<ng-messages for="self_exclusion_form.exclude_me_until.$error" role="alert" class="error">
<ng-message when="min, max">
Expand All @@ -437,6 +471,26 @@ <h1 class="page-title">
</button>
</div>
</div>
<div class="row" ng-if="vm.limits.exclude_until">
<div class="col">
<div class="row info-container">
<div class="col">
{{ 'self-exclusion.info_bottom_1' | translate }}
</div>
</div>
<div class="row info-container">
<div class="col">
{{ 'self-exclusion.info_bottom_2' | translate }}
</div>
</div>
<div class="row info-container">
<div class="col">
{{ 'self-exclusion.info_bottom_3' | translate }}
<a href='https://www.gamstop.co.uk/' target="_blank">www.gamstop.co.uk</a>.
</div>
</div>
</div>
</div>
</form>
</ion-content>
</ion-view>