Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
availability_timing
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
availability_timing
Commits
f14b5bf8
Commit
f14b5bf8
authored
5 years ago
by
Juan Natera Cruces
Browse files
Options
Downloads
Patches
Plain Diff
Corrected behavior when a widget schedule item is removed and adds twice instead leave it empty
parent
8d523919
Branches
8.x-1.x
No related tags found
1 merge request
!1
Resolve #3036115 "Add the label"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Plugin/Field/FieldWidget/AvailabilityTimingWidget.php
+0
-4
0 additions, 4 deletions
src/Plugin/Field/FieldWidget/AvailabilityTimingWidget.php
with
0 additions
and
4 deletions
src/Plugin/Field/FieldWidget/AvailabilityTimingWidget.php
+
0
−
4
View file @
f14b5bf8
...
...
@@ -119,10 +119,6 @@ class AvailabilityTimingWidget extends WidgetBase {
],
];
$deltas
=
$form_state
->
get
(
$baseName
.
'_deltas'
)
?
$form_state
->
get
(
$baseName
.
'_deltas'
)
:
0
;
if
(
empty
(
$deltas
)
&&
!
empty
(
$timing
[
$day_key
]))
{
$deltas
=
count
(
$timing
[
$day_key
]);
$form_state
->
set
(
$baseName
.
'_deltas'
,
$deltas
);
}
for
(
$i
=
0
;
$i
<
$deltas
;
$i
++
)
{
$element
[
'timing'
][
$day_key
][
'schedule'
][
$i
]
=
[
'#type'
=>
'container'
,
...
...
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