Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13971166
D16753.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D16753.id.diff
View Options
diff --git a/src/applications/calendar/editor/PhabricatorCalendarEventEditEngine.php b/src/applications/calendar/editor/PhabricatorCalendarEventEditEngine.php
--- a/src/applications/calendar/editor/PhabricatorCalendarEventEditEngine.php
+++ b/src/applications/calendar/editor/PhabricatorCalendarEventEditEngine.php
@@ -164,6 +164,8 @@
if ($this->getIsCreate() || $object->getIsRecurring()) {
$fields[] = id(new PhabricatorEpochEditField())
+ ->setIsLockable(false)
+ ->setIsDefaultable(false)
->setAllowNull(true)
->setKey('until')
->setLabel(pht('Repeat Until'))
@@ -189,6 +191,8 @@
$fields[] = id(new PhabricatorEpochEditField())
->setKey('start')
->setLabel(pht('Start'))
+ ->setIsLockable(false)
+ ->setIsDefaultable(false)
->setTransactionType(
PhabricatorCalendarEventStartDateTransaction::TRANSACTIONTYPE)
->setDescription(pht('Start time of the event.'))
@@ -199,6 +203,8 @@
$fields[] = id(new PhabricatorEpochEditField())
->setKey('end')
->setLabel(pht('End'))
+ ->setIsLockable(false)
+ ->setIsDefaultable(false)
->setTransactionType(
PhabricatorCalendarEventEndDateTransaction::TRANSACTIONTYPE)
->setDescription(pht('End time of the event.'))
diff --git a/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php b/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php
--- a/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php
+++ b/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php
@@ -128,6 +128,9 @@
$values = $this->getProperty('defaults', array());
foreach ($fields as $key => $field) {
+ if (!$field->getIsDefaultable()) {
+ continue;
+ }
if ($is_new) {
if (array_key_exists($key, $values)) {
$field->readDefaultValueFromConfiguration($values[$key]);
@@ -157,6 +160,11 @@
}
}
+ // If the field isn't lockable, remove any lock we applied.
+ if (!$field->getIsLockable()) {
+ $field->setIsLocked(false);
+ }
+
$fields = $this->reorderFields($fields);
$preamble = $this->getPreamble();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 18 2024, 12:00 PM (4 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6726743
Default Alt Text
D16753.id.diff (2 KB)
Attached To
Mode
D16753: Don't allow "Start Time" / "End Time" in Calendar event forms to be locked or have defaults assigned
Attached
Detach File
Event Timeline
Log In to Comment