@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make the modal choice between "Edit This Event" and "Edit Future Events" more clear

Summary:
Fixes T11909. Ref T11816. Instead of offering a dropdown with choices between "Edit/Cancel/Reinstate This Event" and "Edit/Cancel/Reinstate Future Events", make the choice more explicit.

This dialog ends up pretty wordy but this edit is rare, so I think that's alright.

Test Plan: {F2046863}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11816, T11909

Differential Revision: https://secure.phabricator.com/D16956

+66 -18
+44 -8
src/applications/calendar/controller/PhabricatorCalendarEventCancelController.php
··· 138 138 ->addSubmitButton($submit); 139 139 140 140 if ($show_control) { 141 + $start_time = phutil_tag( 142 + 'strong', 143 + array(), 144 + phabricator_datetime($event->getStartDateTimeEpoch(), $viewer)); 145 + 146 + if ($is_cancelled) { 147 + $this_name = pht('Reinstate Only This Event'); 148 + $this_caption = pht( 149 + 'Reinstate only the event which occurs on %s.', 150 + $start_time); 151 + 152 + $future_name = pht('Reinstate This And All Later Events'); 153 + $future_caption = pht( 154 + 'Reinstate this event and all events in the series which occur '. 155 + 'on or after %s.', 156 + $start_time); 157 + } else { 158 + $this_name = pht('Cancel Only This Event'); 159 + $this_caption = pht( 160 + 'Cancel only the event which occurs on %s.', 161 + $start_time); 162 + 163 + $future_name = pht('Cancel This And All Later Events'); 164 + $future_caption = pht( 165 + 'Cancel this event and all events in the series which occur '. 166 + 'on or after %s.', 167 + $start_time); 168 + } 169 + 170 + 141 171 $form = id(new AphrontFormView()) 142 172 ->setViewer($viewer) 143 173 ->appendControl( 144 - id(new AphrontFormSelectControl()) 145 - ->setLabel(pht('Cancel Events')) 174 + id(new AphrontFormRadioButtonControl()) 146 175 ->setName('mode') 147 - ->setOptions( 148 - array( 149 - 'this' => pht('Only This Event'), 150 - 'future' => pht('All Future Events'), 151 - ))); 152 - $dialog->appendForm($form); 176 + ->setValue(PhabricatorCalendarEventEditEngine::MODE_THIS) 177 + ->addButton( 178 + PhabricatorCalendarEventEditEngine::MODE_THIS, 179 + $this_name, 180 + $this_caption) 181 + ->addButton( 182 + PhabricatorCalendarEventEditEngine::MODE_FUTURE, 183 + $future_name, 184 + $future_caption)); 185 + 186 + $dialog 187 + ->setWidth(AphrontDialogView::WIDTH_FORM) 188 + ->appendForm($form); 153 189 } 154 190 155 191 return $dialog;
+22 -10
src/applications/calendar/controller/PhabricatorCalendarEventEditController.php
··· 46 46 } 47 47 48 48 if (!$mode) { 49 + $start_time = phutil_tag( 50 + 'strong', 51 + array(), 52 + phabricator_datetime($event->getStartDateTimeEpoch(), $viewer)); 53 + 49 54 $form = id(new AphrontFormView()) 50 55 ->setViewer($viewer) 51 56 ->appendControl( 52 - id(new AphrontFormSelectControl()) 53 - ->setLabel(pht('Edit Events')) 57 + id(new AphrontFormRadioButtonControl()) 54 58 ->setName('mode') 55 - ->setOptions( 56 - array( 57 - PhabricatorCalendarEventEditEngine::MODE_THIS 58 - => pht('Edit Only This Event'), 59 - PhabricatorCalendarEventEditEngine::MODE_FUTURE 60 - => pht('Edit All Future Events'), 61 - ))); 62 - 59 + ->setValue(PhabricatorCalendarEventEditEngine::MODE_THIS) 60 + ->addButton( 61 + PhabricatorCalendarEventEditEngine::MODE_THIS, 62 + pht('Edit Only This Event'), 63 + pht( 64 + 'Edit only the event which occurs at %s.', 65 + $start_time)) 66 + ->addButton( 67 + PhabricatorCalendarEventEditEngine::MODE_FUTURE, 68 + pht('Edit This And All Later Events'), 69 + pht( 70 + 'Edit this event and all events in the series which '. 71 + 'occur on or after %s. This will overwrite previous '. 72 + 'edits!', 73 + $start_time))); 63 74 return $this->newDialog() 64 75 ->setTitle(pht('Edit Event')) 76 + ->setWidth(AphrontDialogView::WIDTH_FORM) 65 77 ->appendParagraph( 66 78 pht( 67 79 'This event is part of a series. Which events do you '.