1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 04:50:55 +01:00

Make some confusing/weird Calendar fields not configurable on custom EditEngine forms

Summary:
Ref T11816.

  - Host gets weird behavior around defaulting to the viewer.
  - Invitees get weird behavior around defaulting to the viewer.
  - "All Day" is just sort of weird since start / end date aren't customizable.
  - Recurring/Frequency are weird here and don't make much sense.

I can't immediately come up with reasons that any of these are particularly useful/valuable to default. More of them can be made editable after T10222 gets sorted out.

Test Plan: Edited edit engine custom forms for Calendar events, saw a more sensible list of customizable fields (e.g., policy stuff).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11816

Differential Revision: https://secure.phabricator.com/D16878
This commit is contained in:
epriestley 2016-11-16 06:55:42 -08:00
parent 78bd6c1ce4
commit 91ee6b78df

View file

@ -108,6 +108,8 @@ final class PhabricatorCalendarEventEditEngine
->setConduitTypeDescription(pht('New event name.')) ->setConduitTypeDescription(pht('New event name.'))
->setValue($object->getName()), ->setValue($object->getName()),
id(new PhabricatorBoolEditField()) id(new PhabricatorBoolEditField())
->setIsLockable(false)
->setIsDefaultable(false)
->setKey('isAllDay') ->setKey('isAllDay')
->setOptions(pht('Normal Event'), pht('All Day Event')) ->setOptions(pht('Normal Event'), pht('All Day Event'))
->setAsCheckbox(true) ->setAsCheckbox(true)
@ -151,6 +153,8 @@ final class PhabricatorCalendarEventEditEngine
->setConduitTypeDescription(pht('True to cancel the event.')) ->setConduitTypeDescription(pht('True to cancel the event.'))
->setValue($object->getIsCancelled()), ->setValue($object->getIsCancelled()),
id(new PhabricatorUsersEditField()) id(new PhabricatorUsersEditField())
->setIsLockable(false)
->setIsDefaultable(false)
->setKey('hostPHID') ->setKey('hostPHID')
->setAliases(array('host')) ->setAliases(array('host'))
->setLabel(pht('Host')) ->setLabel(pht('Host'))
@ -162,6 +166,8 @@ final class PhabricatorCalendarEventEditEngine
->setConduitTypeDescription(pht('New event host.')) ->setConduitTypeDescription(pht('New event host.'))
->setSingleValue($object->getHostPHID()), ->setSingleValue($object->getHostPHID()),
id(new PhabricatorDatasourceEditField()) id(new PhabricatorDatasourceEditField())
->setIsLockable(false)
->setIsDefaultable(false)
->setIsHidden($is_future) ->setIsHidden($is_future)
->setKey('inviteePHIDs') ->setKey('inviteePHIDs')
->setAliases(array('invite', 'invitee', 'invitees', 'inviteePHID')) ->setAliases(array('invite', 'invitee', 'invitees', 'inviteePHID'))
@ -203,6 +209,8 @@ final class PhabricatorCalendarEventEditEngine
id(new PhabricatorBoolEditField()) id(new PhabricatorBoolEditField())
->setIsHidden(true) ->setIsHidden(true)
->setIsLockable(false)
->setIsDefaultable(false)
->setKey('isRecurring') ->setKey('isRecurring')
->setLabel(pht('Recurring')) ->setLabel(pht('Recurring'))
->setOptions(pht('One-Time Event'), pht('Recurring Event')) ->setOptions(pht('One-Time Event'), pht('Recurring Event'))
@ -213,6 +221,8 @@ final class PhabricatorCalendarEventEditEngine
->setConduitTypeDescription(pht('Mark the event as a recurring event.')) ->setConduitTypeDescription(pht('Mark the event as a recurring event.'))
->setValue(true), ->setValue(true),
id(new PhabricatorSelectEditField()) id(new PhabricatorSelectEditField())
->setIsLockable(false)
->setIsDefaultable(false)
->setKey('frequency') ->setKey('frequency')
->setLabel(pht('Frequency')) ->setLabel(pht('Frequency'))
->setOptions($frequency_options) ->setOptions($frequency_options)