Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
recurring_events-3312242
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
recurring_events-3312242
Commits
779ac392
Commit
779ac392
authored
6 years ago
by
Owen Bush
Browse files
Options
Downloads
Patches
Plain Diff
Addressing notices thrown when creating and editing series
parent
3d2036e3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/EventCreationService.php
+4
-4
4 additions, 4 deletions
src/EventCreationService.php
src/Form/EventSeriesForm.php
+2
-2
2 additions, 2 deletions
src/Form/EventSeriesForm.php
with
6 additions
and
6 deletions
src/EventCreationService.php
+
4
−
4
View file @
779ac392
...
@@ -341,11 +341,11 @@ class EventCreationService {
...
@@ -341,11 +341,11 @@ class EventCreationService {
}
}
}
}
else
{
else
{
if
(
$entity_config
[
'month
day
'
]
!==
$form_config
[
'month
day
'
])
{
if
(
$entity_config
[
'
day_of_
month'
]
!==
$form_config
[
'
day_of_
month'
])
{
$diff
[
'month
day
'
]
=
[
$diff
[
'
day_of_
month'
]
=
[
'label'
=>
$this
->
translation
->
translate
(
'Day of the Month'
),
'label'
=>
$this
->
translation
->
translate
(
'Day of the Month'
),
'stored'
=>
implode
(
','
,
$entity_config
[
'month
day
'
]),
'stored'
=>
implode
(
','
,
$entity_config
[
'
day_of_
month'
]),
'override'
=>
implode
(
','
,
$form_config
[
'month
day
'
]),
'override'
=>
implode
(
','
,
$form_config
[
'
day_of_
month'
]),
];
];
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/Form/EventSeriesForm.php
+
2
−
2
View file @
779ac392
...
@@ -98,7 +98,6 @@ class EventSeriesForm extends ContentEntityForm {
...
@@ -98,7 +98,6 @@ class EventSeriesForm extends ContentEntityForm {
/* @var $entity \Drupal\recurring_events\Entity\EventSeries */
/* @var $entity \Drupal\recurring_events\Entity\EventSeries */
$entity
=
$this
->
entity
;
$entity
=
$this
->
entity
;
$original
=
$this
->
storage
->
loadUnchanged
(
$entity
->
id
());
$form
[
'custom_date'
][
'#states'
]
=
[
$form
[
'custom_date'
][
'#states'
]
=
[
'visible'
=>
[
'visible'
=>
[
...
@@ -107,6 +106,7 @@ class EventSeriesForm extends ContentEntityForm {
...
@@ -107,6 +106,7 @@ class EventSeriesForm extends ContentEntityForm {
];
];
if
(
$editing
)
{
if
(
$editing
)
{
$original
=
$this
->
storage
->
loadUnchanged
(
$entity
->
id
());
if
(
$this
->
step
===
1
)
{
if
(
$this
->
step
===
1
)
{
$diff_array
=
$this
->
creationService
->
buildDiffArray
(
$original
,
$form_state
);
$diff_array
=
$this
->
creationService
->
buildDiffArray
(
$original
,
$form_state
);
...
@@ -194,12 +194,12 @@ class EventSeriesForm extends ContentEntityForm {
...
@@ -194,12 +194,12 @@ class EventSeriesForm extends ContentEntityForm {
/* @var $entity \Drupal\recurring_events\Entity\EventSeries */
/* @var $entity \Drupal\recurring_events\Entity\EventSeries */
$entity
=
$this
->
entity
;
$entity
=
$this
->
entity
;
$original
=
$this
->
storage
->
loadUnchanged
(
$entity
->
id
());
$editing
=
(
$form_state
->
getBuildInfo
()[
'form_id'
]
==
'eventseries_edit_form'
);
$editing
=
(
$form_state
->
getBuildInfo
()[
'form_id'
]
==
'eventseries_edit_form'
);
$trigger
=
$form_state
->
getTriggeringElement
();
$trigger
=
$form_state
->
getTriggeringElement
();
if
(
$trigger
[
'#id'
]
!==
'edit-confirm'
&&
$editing
)
{
if
(
$trigger
[
'#id'
]
!==
'edit-confirm'
&&
$editing
)
{
$original
=
$this
->
storage
->
loadUnchanged
(
$entity
->
id
());
if
(
$this
->
creationService
->
checkForRecurConfigChanges
(
$original
,
$form_state
))
{
if
(
$this
->
creationService
->
checkForRecurConfigChanges
(
$original
,
$form_state
))
{
$this
->
step
=
1
;
$this
->
step
=
1
;
$form_state
->
setRebuild
(
TRUE
);
$form_state
->
setRebuild
(
TRUE
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment