Page MenuHomePhorge

D25420.1739162197.diff
No OneTemporary

D25420.1739162197.diff

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,26 @@
$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('(keep %s)', $current_zone_identifier))
+ ->setLabel(pht('Or Ignore Conflict')));
return $this->newDialog()
->setTitle(pht('Adjust Timezone'))
@@ -110,7 +117,7 @@
$this->formatOffset($server_offset)))
->appendForm($form)
->addCancelButton(pht('Cancel'))
- ->addSubmitButton(pht('Change Timezone'));
+ ->addSubmitButton(pht('Confirm'));
}
private function formatOffset($offset) {

File Metadata

Mime Type
text/plain
Expires
Mon, Feb 10, 04:36 (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1164398
Default Alt Text
D25420.1739162197.diff (2 KB)

Event Timeline