Skip to content

Commit

Permalink
OP-558: Coding standard
Browse files Browse the repository at this point in the history
  • Loading branch information
jkindly committed Oct 9, 2024
1 parent 08fe848 commit 19965bc
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
php: [ "8.2", "8.3" ]
symfony: [ "^6.4", "^7.1" ]
symfony: [ "^6.4" ]
sylius: [ "~v2.0.0-alpha.2" ]
node: [ "20.x" ]
mysql: ["8.0"]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coding_standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
php: [ "8.2", "8.3" ]
symfony: [ "^6.4", "^7.1" ]
symfony: [ "^6.4" ]
sylius: [ "~v2.0.0-alpha.2" ]
node: [ "20.x" ]

Expand Down
9 changes: 0 additions & 9 deletions src/Form/Type/AutomaticBlacklistingConfigurationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,12 @@

final class AutomaticBlacklistingConfigurationType extends AbstractResourceType
{
/** @var array */
private $attributeChoices;

public function __construct(
private array $rules,
string $dataClass,
array $attributeChoices,
array $validationGroups = [],
) {
parent::__construct($dataClass, $validationGroups);
$this->attributeChoices = $attributeChoices;
}

public function buildForm(FormBuilderInterface $builder, array $options): void
Expand Down Expand Up @@ -75,10 +70,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
],
'placeholder' => 'bitbag_sylius_blacklist_plugin.ui.choose_time_range',
])
// ->add('rules', AutomaticBlacklistingRuleCollectionType::class, [
// 'label' => 'bitbag_sylius_blacklist_plugin.form.automatic_blacklisting_rule.rules',
// 'button_add_label' => 'sylius.form.promotion.add_rule',
// ])
->add('rules', LiveCollectionType::class, [
'entry_type' => AutomaticBlacklistingRuleType::class,
'allow_add' => true,
Expand Down
1 change: 0 additions & 1 deletion src/Resources/config/services/form.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
class="BitBag\SyliusBlacklistPlugin\Form\Type\AutomaticBlacklistingConfigurationType">
<argument>%bitbag.sylius_blacklist_plugin.automatic_blacklisting_rules%</argument>
<argument>%bitbag_sylius_blacklist_plugin.model.automatic_blacklisting_configuration.class%</argument>
<argument>%bitbag.sylius_blacklist_plugin.form.type.automatic_blacklisting_configuration.validation_groups%</argument>
<argument>%bitbag.sylius_blacklist_plugin.form.type.validation_groups%</argument>
<tag name="form.type" />
</service>
Expand Down
28 changes: 0 additions & 28 deletions src/Resources/views/Form/theme.html.twig
Original file line number Diff line number Diff line change
@@ -1,33 +1,5 @@
{% extends '@SyliusAdmin/shared/form_theme.html.twig' %}

{% block bitbag_sylius_customer_autocomplete_choice_row %}
<div class="{% if required %}required {% endif %}{% if disabled %}disabled {% endif %}field{% if (not compound or force_error|default(false)) and not valid %} error{% endif %}">
{{- form_label(form) -}}
<div
class="sylius-autocomplete ui fluid search selection dropdown {% if multiple %}multiple{% endif %}"
data-url="{{ path('bitbag_sylius_blacklist_plugin_admin_ajax_customer_by_email') }}"
data-choice-name="{{ choice_name }}"
data-choice-value="{{ choice_value }}"
data-criteria-type="{{ remote_criteria_type }}"
data-criteria-name="{{ remote_criteria_name }}"
data-load-edit-url="{{ path('bitbag_sylius_blacklist_plugin_admin_ajax_customer_by_id') }}"
>
{{- form_widget(form, {'attr': {'class' : 'autocomplete'}}) -}}
<i class="dropdown icon"></i>
<div class="default text">{% if placeholder is defined %} {{ placeholder|trans }} {% endif %}</div>
<div class="menu"></div>
</div>
{{- form_errors(form) -}}
</div>

{% endblock %}

{% block bitbag_sylius_blacklist_plugin_automatic_blacklisting_rule_widget %}
<div class="ui segment">
{{ block('form_widget') }}
</div>
{% endblock %}

{%- block bitbag_sylius_blacklist_plugin_automatic_blacklisting_rule_row -%}
<div id="{{ id }}" {{ block('attributes') }} {{ sylius_test_html_attribute('entry-row') }}>
{{- form_errors(form) -}}
Expand Down

0 comments on commit 19965bc

Please sign in to comment.