Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2883539
D25420.1737147282.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
2 KB
Referenced Files
None
Subscribers
None
D25420.1737147282.diff
View Options
diff --git a/src/applications/settings/controller/PhabricatorSettingsTimezoneController.php b/src/applications/settings/controller/PhabricatorSettingsTimezoneController.php
--- a/src/applications/settings/controller/PhabricatorSettingsTimezoneController.php
+++ b/src/applications/settings/controller/PhabricatorSettingsTimezoneController.php
@@ -5,7 +5,6 @@
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();
-
$client_offset = $request->getURIData('offset');
$client_offset = (int)$client_offset;
@@ -31,11 +30,12 @@
$did_calibrate = false;
if ($request->isFormPost()) {
$timezone = $request->getStr('timezone');
+ $ignore_conflict_checkbox = $request->getInt('ignoreConflict');
$pref_ignore = PhabricatorTimezoneIgnoreOffsetSetting::SETTINGKEY;
$pref_timezone = PhabricatorTimezoneSetting::SETTINGKEY;
- if ($timezone == 'ignore') {
+ if ($timezone == 'ignore' || $ignore_conflict_checkbox) {
$this->writeSettings(
array(
$pref_ignore => $client_offset,
@@ -83,20 +83,28 @@
$guess = 'ignore';
}
- $current_zone = $viewer->getTimezoneIdentifier();
- $current_zone = phutil_tag('strong', array(), $current_zone);
-
+ $current_zone_identifier = $viewer->getTimezoneIdentifier();
+ $current_zone_formatted = phutil_tag('strong', array(),
+ $current_zone_identifier);
$form = id(new AphrontFormView())
->appendChild(
id(new AphrontFormMarkupControl())
->setLabel(pht('Current Setting'))
- ->setValue($current_zone))
+ ->setValue($current_zone_formatted))
->appendChild(
id(new AphrontFormSelectControl())
->setName('timezone')
->setLabel(pht('New Setting'))
->setOptions($options)
- ->setValue($guess));
+ ->setValue($guess))
+ ->appendChild(hsprintf(
+ '<div style="text-align: center; font-weight: bold;">OR'))
+ ->appendChild(id(new AphrontFormCheckboxControl())
+ ->addCheckbox(
+ 'ignoreConflict',
+ 1,
+ pht('Ignore Conflict (keep %s)', $current_zone_identifier),
+ true));
return $this->newDialog()
->setTitle(pht('Adjust Timezone'))
@@ -110,7 +118,7 @@
$this->formatOffset($server_offset)))
->appendForm($form)
->addCancelButton(pht('Cancel'))
- ->addSubmitButton(pht('Change Timezone'));
+ ->addSubmitButton(pht('Confirm'));
}
private function formatOffset($offset) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 17, 20:54 (1 d, 3 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1120705
Default Alt Text
D25420.1737147282.diff (2 KB)
Attached To
Mode
D25420: Improving UX for ignoring timezone conflicts
Attached
Detach File
Event Timeline
Log In to Comment