mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Convert input to select box
This commit is contained in:
@@ -65,13 +65,13 @@ habitrpg.controller('SettingsCtrl',
|
||||
$scope.dayStart = User.user.preferences.dayStart;
|
||||
|
||||
$scope.openDayStartModal = function(dayStart) {
|
||||
var flooredDayStart = Math.floor(dayStart);
|
||||
$scope.dayStart = +dayStart;
|
||||
var flooredDayStart = Math.floor($scope.dayStart);
|
||||
|
||||
if (dayStart !== flooredDayStart || dayStart < 0 || dayStart > 24 ) {
|
||||
if ($scope.dayStart !== flooredDayStart || $scope.dayStart < 0 || $scope.dayStart > 24 ) {
|
||||
return alert(window.env.t('enterNumber'));
|
||||
}
|
||||
|
||||
$scope.dayStart = dayStart;
|
||||
$scope.nextCron = _calculateNextCron();
|
||||
|
||||
$rootScope.openModal('change-day-start', { scope: $scope });
|
||||
|
||||
Reference in New Issue
Block a user