-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[shopsys] out of stock products behavior (#3587)
- Loading branch information
Showing
47 changed files
with
708 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,7 @@ | |
|
||
.tooltip-inner { | ||
min-width: 120px; | ||
} | ||
white-space: normal; | ||
word-break: break-word; | ||
overflow-wrap: break-word; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Shopsys\FrameworkBundle\Form; | ||
|
||
use Override; | ||
use Symfony\Component\Form\AbstractType; | ||
use Symfony\Component\Form\FormInterface; | ||
use Symfony\Component\Form\FormView; | ||
use Symfony\Component\OptionsResolver\OptionsResolver; | ||
|
||
class MessageType extends AbstractType | ||
{ | ||
public const string MESSAGE_LEVEL_WARNING = 'warning'; | ||
public const string MESSAGE_LEVEL_INFO = 'info'; | ||
|
||
/** | ||
* @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver | ||
*/ | ||
#[Override] | ||
public function configureOptions(OptionsResolver $resolver): void | ||
{ | ||
$resolver | ||
->setDefined('message_level') | ||
->setAllowedValues('message_level', [self::MESSAGE_LEVEL_WARNING, self::MESSAGE_LEVEL_INFO]) | ||
->setDefaults([ | ||
'mapped' => false, | ||
'required' => false, | ||
'message_level' => self::MESSAGE_LEVEL_WARNING, | ||
]); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
#[Override] | ||
public function buildView(FormView $view, FormInterface $form, array $options): void | ||
{ | ||
parent::buildView($view, $form, $options); | ||
|
||
$view->vars['message_level'] = $options['message_level']; | ||
} | ||
} |
Oops, something went wrong.