diff --git a/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php b/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php index 9a4a7c0107..7be3969671 100644 --- a/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php +++ b/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php @@ -83,12 +83,6 @@ final class PhabricatorCalendarImportEditEngine $engine = $object->getEngine(); $can_trigger = $engine->supportsTriggers($object); - // calendar URI import - // note that it can contains a secret token - // if we are here you have enough privileges to edit and see the value - $uri_key = PhabricatorCalendarImportICSURITransaction::PARAMKEY_URI; - $uri = $object->getParameter($uri_key); - $fields = array( id(new PhabricatorTextEditField()) ->setKey('name') @@ -100,15 +94,6 @@ final class PhabricatorCalendarImportEditEngine ->setConduitTypeDescription(pht('New import name.')) ->setPlaceholder($object->getDisplayName()) ->setValue($object->getName()), - id(new PhabricatorTextEditField()) - ->setKey('uri') - ->setLabel(pht('URI')) - ->setDescription(pht('URI to import.')) - ->setTransactionType( - PhabricatorCalendarImportICSURITransaction::TRANSACTIONTYPE) - ->setConduitDescription(pht('URI to import.')) - ->setConduitTypeDescription(pht('New URI.')) - ->setValue($uri), id(new PhabricatorBoolEditField()) ->setKey('disabled') ->setOptions(pht('Active'), pht('Disabled')) diff --git a/src/applications/calendar/import/PhabricatorCalendarICSURIImportEngine.php b/src/applications/calendar/import/PhabricatorCalendarICSURIImportEngine.php index bd52ec5bc2..6c992e0836 100644 --- a/src/applications/calendar/import/PhabricatorCalendarICSURIImportEngine.php +++ b/src/applications/calendar/import/PhabricatorCalendarICSURIImportEngine.php @@ -58,16 +58,19 @@ final class PhabricatorCalendarICSURIImportEngine PhabricatorCalendarImport $import) { $fields = array(); - if ($engine->getIsCreate()) { - $fields[] = id(new PhabricatorTextEditField()) - ->setKey('uri') - ->setLabel(pht('URI')) - ->setDescription(pht('URI to import.')) - ->setTransactionType( - PhabricatorCalendarImportICSURITransaction::TRANSACTIONTYPE) - ->setConduitDescription(pht('URI to import.')) - ->setConduitTypeDescription(pht('New URI.')); - } + // If you are here, you already have the "can edit" capability. + // So you are supposed to be able to edit again your Calendar import URI. + $uri_key = PhabricatorCalendarImportICSURITransaction::PARAMKEY_URI; + $uri = $import->getParameter($uri_key); + $fields[] = id(new PhabricatorTextEditField()) + ->setKey('uri') + ->setLabel(pht('URI')) + ->setDescription(pht('URI to import.')) + ->setTransactionType( + PhabricatorCalendarImportICSURITransaction::TRANSACTIONTYPE) + ->setConduitDescription(pht('URI to import.')) + ->setConduitTypeDescription(pht('New URI.')) + ->setValue($uri); return $fields; }