Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2689291
D25420.1734731602.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.1734731602.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
@@ -31,11 +31,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 +84,29 @@
$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(id(new AphrontFormCheckboxControl())
+ ->addCheckbox(
+ 'ignoreConflict',
+ 1,
+ pht('Ignore New Setting and Keep %s', $current_zone_identifier)));
+
return $this->newDialog()
->setTitle(pht('Adjust Timezone'))
@@ -110,7 +120,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, Dec 20, 21:53 (13 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1015404
Default Alt Text
D25420.1734731602.diff (2 KB)
Attached To
Mode
D25420: Improving UX for ignoring timezone conflicts
Attached
Detach File
Event Timeline
Log In to Comment