Navigation Menu

Skip to content

Commit

Permalink
Merge branch '1.2'
Browse files Browse the repository at this point in the history
* 1.2:
  Fix missing "required" class on some form fields
  Quote row_number identifier for MySQL queries
  • Loading branch information
pamil committed Aug 2, 2018
2 parents 4428b33 + 5389f8f commit 831e4bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/migrations/Version20161223091334.php
Expand Up @@ -17,7 +17,7 @@ public function up(Schema $schema)
$this->addSql('ALTER TABLE sylius_product_variant ADD position INT NOT NULL');
$this->addSql('SET @row_number = -1');
$this->addSql('CREATE TEMPORARY TABLE IF NOT EXISTS variants_count
SELECT sylius_product.id AS product_id, COUNT(sylius_product_variant.id) AS row_number FROM sylius_product
SELECT sylius_product.id AS product_id, COUNT(sylius_product_variant.id) AS `row_number` FROM sylius_product
INNER JOIN sylius_product_variant ON sylius_product.id = sylius_product_variant.product_id
GROUP BY sylius_product.id'
);
Expand Down
Expand Up @@ -19,7 +19,7 @@
{%- endblock form_errors -%}

{% block checkbox_row -%}
<div class="field{% if (not compound or force_error|default(false)) and not valid %} error{% endif %}">
<div class="{% if required %}required {% endif %}field{% if (not compound or force_error|default(false)) and not valid %} error{% endif %}">
<div class="ui toggle checkbox">
{{- form_widget(form) -}}
{{- form_label(form) -}}
Expand Down Expand Up @@ -56,7 +56,7 @@

{%- block choice_widget_expanded -%}
<div {{ block('widget_container_attributes') }}>
<div class="grouped fields">
<div class="{% if required %}required {% endif %}grouped fields">
{%- for child in form %}
<div class="field">
<div class="ui toggle checkbox">
Expand Down

0 comments on commit 831e4bf

Please sign in to comment.