mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch '256_activity_form_admin' into 'master'
Fix activity form admin bug See merge request Chill-Projet/chill-bundles!651
This commit is contained in:
commit
3871299346
6
.changes/unreleased/Fixed-20240130-140301.yaml
Normal file
6
.changes/unreleased/Fixed-20240130-140301.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixed
|
||||||
|
body: Fix the conditions upon which social actions should be optional or required
|
||||||
|
in relation to social issues within the activity creation form
|
||||||
|
time: 2024-01-30T14:03:01.942955636+01:00
|
||||||
|
custom:
|
||||||
|
Issue: "256"
|
@ -291,7 +291,11 @@ class ActivityType
|
|||||||
public function checkSocialActionsVisibility(ExecutionContextInterface $context, mixed $payload)
|
public function checkSocialActionsVisibility(ExecutionContextInterface $context, mixed $payload)
|
||||||
{
|
{
|
||||||
if ($this->socialIssuesVisible !== $this->socialActionsVisible) {
|
if ($this->socialIssuesVisible !== $this->socialActionsVisible) {
|
||||||
if (!(2 === $this->socialIssuesVisible && 1 === $this->socialActionsVisible)) {
|
// if social issues are invisible then social actions cannot be optional or required + if social issues are optional then social actions shouldn't be required
|
||||||
|
if (
|
||||||
|
(0 === $this->socialIssuesVisible && (1 === $this->socialActionsVisible || 2 === $this->socialActionsVisible))
|
||||||
|
|| (1 === $this->socialIssuesVisible && 2 === $this->socialActionsVisible)
|
||||||
|
) {
|
||||||
$context
|
$context
|
||||||
->buildViolation('The socialActionsVisible value is not compatible with the socialIssuesVisible value')
|
->buildViolation('The socialActionsVisible value is not compatible with the socialIssuesVisible value')
|
||||||
->atPath('socialActionsVisible')
|
->atPath('socialActionsVisible')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user