-
-
Notifications
You must be signed in to change notification settings - Fork 893
Standalone: add a default global timezone setting #36400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,6 +2,23 @@ | |||||||||||||||||
| use CRM_Standaloneusers_ExtensionUtil as E; | ||||||||||||||||||
|
|
||||||||||||||||||
| return [ | ||||||||||||||||||
| 'standalone_timezone_default' => [ | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe also we can use settings_pages key to put this on a different page from Login settings. I'm not sure whether |
||||||||||||||||||
| 'name' => 'standalone_timezone_default', | ||||||||||||||||||
| 'group' => 'standaloneusers', | ||||||||||||||||||
| 'type' => 'String', | ||||||||||||||||||
| 'default' => date_default_timezone_get(), | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would avoid this kind of dynamic default. There's lots of ways it gets confusing:
All this is to say, I think it might be better to have an empty default, with a placeholder like "- use server timezone -"? |
||||||||||||||||||
| 'html_type' => 'select', | ||||||||||||||||||
| 'html_attributes' => [ | ||||||||||||||||||
| 'class' => 'huge crm-select2', | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe something like this for the placeholder?
Suggested change
|
||||||||||||||||||
| ], | ||||||||||||||||||
| 'title' => E::ts('Default Timezone'), | ||||||||||||||||||
| 'is_domain' => 1, | ||||||||||||||||||
| 'is_contact' => 0, | ||||||||||||||||||
| 'description' => E::ts('Default timezone for anonymous users and for users using the default timezone.'), | ||||||||||||||||||
|
Comment on lines
+14
to
+17
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I think "default" is confusing here, because there's a default value for Default timezone; and the default value of User timezone is "use the default timezone" and... |
||||||||||||||||||
| 'pseudoconstant' => [ | ||||||||||||||||||
| 'callback' => ['CRM_Standaloneusers_BAO_User', 'getTimeZones'], | ||||||||||||||||||
| ], | ||||||||||||||||||
| ], | ||||||||||||||||||
| 'standaloneusers_session_max_lifetime' => [ | ||||||||||||||||||
| 'name' => 'standaloneusers_session_max_lifetime', | ||||||||||||||||||
| 'group' => 'standaloneusers', | ||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be...
?