diff --git a/src/Squidex/Areas/Api/Controllers/UI/MyUIOptions.cs b/src/Squidex/Areas/Api/Controllers/UI/MyUIOptions.cs index 1cbd22cdc..b415ed1b3 100644 --- a/src/Squidex/Areas/Api/Controllers/UI/MyUIOptions.cs +++ b/src/Squidex/Areas/Api/Controllers/UI/MyUIOptions.cs @@ -25,6 +25,8 @@ namespace Squidex.Areas.Api.Controllers.UI public bool HideOnboarding { get; set; } + public bool HideDateButtons { get; set; } + public bool RedirectToLogin { get; set; } public bool OnlyAdminsCanCreateApps { get; set; } diff --git a/src/Squidex/app/framework/angular/forms/date-time-editor.component.html b/src/Squidex/app/framework/angular/forms/date-time-editor.component.html index d7f0d21a7..9fdc867e5 100644 --- a/src/Squidex/app/framework/angular/forms/date-time-editor.component.html +++ b/src/Squidex/app/framework/angular/forms/date-time-editor.component.html @@ -13,12 +13,12 @@ -
+
-
+
diff --git a/src/Squidex/app/framework/angular/forms/date-time-editor.component.ts b/src/Squidex/app/framework/angular/forms/date-time-editor.component.ts index 83b535bf8..9bb161826 100644 --- a/src/Squidex/app/framework/angular/forms/date-time-editor.component.ts +++ b/src/Squidex/app/framework/angular/forms/date-time-editor.component.ts @@ -9,7 +9,11 @@ import { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, E import { FormControl, NG_VALUE_ACCESSOR } from '@angular/forms'; import * as moment from 'moment'; -import { StatefulControlComponent, Types } from '@app/framework/internal'; +import { + StatefulControlComponent, + Types, + UIOptions +} from '@app/framework/internal'; declare module 'pikaday/pikaday'; @@ -49,6 +53,8 @@ export class DateTimeEditorComponent extends StatefulControlComponent<{}, string public timeControl = new FormControl(); public dateControl = new FormControl(); + public hideDateButtons: boolean; + public get showTime() { return this.mode === 'DateTime'; } @@ -57,8 +63,10 @@ export class DateTimeEditorComponent extends StatefulControlComponent<{}, string return !!this.dateValue; } - constructor(changeDetector: ChangeDetectorRef) { + constructor(changeDetector: ChangeDetectorRef, uiOptions: UIOptions) { super(changeDetector, {}); + + this.hideDateButtons = !!uiOptions.get('hideDateButtons'); } public ngOnInit() { diff --git a/src/Squidex/app/theme/_mixins.scss b/src/Squidex/app/theme/_mixins.scss index 43f51c3fd..baa6cf23f 100644 --- a/src/Squidex/app/theme/_mixins.scss +++ b/src/Squidex/app/theme/_mixins.scss @@ -36,7 +36,7 @@ &:active, &:hover { - color: darken($color, 8%); + color: darken($color, 15%); } } diff --git a/src/Squidex/appsettings.json b/src/Squidex/appsettings.json index 451a0c350..48f009471 100644 --- a/src/Squidex/appsettings.json +++ b/src/Squidex/appsettings.json @@ -93,6 +93,10 @@ * Hide all onboarding tooltips and dialogs. */ "hideOnboarding": false, + /* + * Hide the today and now button. + */ + "hideDateButtons": false, /* * Show the exposed values as information on the apps overview page. */