Differential D19842 Diff 47384 src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | $fields = array( | ||||
->setValue($object->getName()), | ->setValue($object->getName()), | ||||
id(new PhabricatorBoolEditField()) | id(new PhabricatorBoolEditField()) | ||||
->setKey('disabled') | ->setKey('disabled') | ||||
->setOptions(pht('Active'), pht('Disabled')) | ->setOptions(pht('Active'), pht('Disabled')) | ||||
->setLabel(pht('Disabled')) | ->setLabel(pht('Disabled')) | ||||
->setDescription(pht('Disable the import.')) | ->setDescription(pht('Disable the import.')) | ||||
->setTransactionType( | ->setTransactionType( | ||||
PhabricatorCalendarImportDisableTransaction::TRANSACTIONTYPE) | PhabricatorCalendarImportDisableTransaction::TRANSACTIONTYPE) | ||||
->setIsConduitOnly(true) | ->setIsFormField(false) | ||||
->setConduitDescription(pht('Disable or restore the import.')) | ->setConduitDescription(pht('Disable or restore the import.')) | ||||
->setConduitTypeDescription(pht('True to cancel the import.')) | ->setConduitTypeDescription(pht('True to cancel the import.')) | ||||
->setValue($object->getIsDisabled()), | ->setValue($object->getIsDisabled()), | ||||
id(new PhabricatorBoolEditField()) | id(new PhabricatorBoolEditField()) | ||||
->setKey('delete') | ->setKey('delete') | ||||
->setLabel(pht('Delete Imported Events')) | ->setLabel(pht('Delete Imported Events')) | ||||
->setDescription(pht('Delete all events from this source.')) | ->setDescription(pht('Delete all events from this source.')) | ||||
->setTransactionType( | ->setTransactionType( | ||||
PhabricatorCalendarImportDisableTransaction::TRANSACTIONTYPE) | PhabricatorCalendarImportDisableTransaction::TRANSACTIONTYPE) | ||||
->setIsConduitOnly(true) | ->setIsFormField(false) | ||||
->setConduitDescription(pht('Disable or restore the import.')) | ->setConduitDescription(pht('Disable or restore the import.')) | ||||
->setConduitTypeDescription(pht('True to delete imported events.')) | ->setConduitTypeDescription(pht('True to delete imported events.')) | ||||
->setValue(false), | ->setValue(false), | ||||
id(new PhabricatorBoolEditField()) | id(new PhabricatorBoolEditField()) | ||||
->setKey('reload') | ->setKey('reload') | ||||
->setLabel(pht('Reload Import')) | ->setLabel(pht('Reload Import')) | ||||
->setDescription(pht('Reload events imported from this source.')) | ->setDescription(pht('Reload events imported from this source.')) | ||||
->setTransactionType( | ->setTransactionType( | ||||
PhabricatorCalendarImportDisableTransaction::TRANSACTIONTYPE) | PhabricatorCalendarImportDisableTransaction::TRANSACTIONTYPE) | ||||
->setIsConduitOnly(true) | ->setIsFormField(false) | ||||
->setConduitDescription(pht('Disable or restore the import.')) | ->setConduitDescription(pht('Disable or restore the import.')) | ||||
->setConduitTypeDescription(pht('True to reload the import.')) | ->setConduitTypeDescription(pht('True to reload the import.')) | ||||
->setValue(false), | ->setValue(false), | ||||
); | ); | ||||
if ($can_trigger) { | if ($can_trigger) { | ||||
$frequency_map = PhabricatorCalendarImport::getTriggerFrequencyMap(); | $frequency_map = PhabricatorCalendarImport::getTriggerFrequencyMap(); | ||||
$frequency_options = ipull($frequency_map, 'name'); | $frequency_options = ipull($frequency_map, 'name'); | ||||
Show All 23 Lines |