-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finish rich radio button implementation
- Loading branch information
1 parent
a7557f7
commit 6587d89
Showing
7 changed files
with
150 additions
and
55 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
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 |
---|---|---|
@@ -1,9 +1,22 @@ | ||
{% with id=widget.attrs.id %}<fieldset{% if id %} id="{{ id }}"{% endif %} class="fr-fieldset{% if widget.attrs.class %} {{ widget.attrs.class }}{% endif %}"> | ||
{% for group, options, index in widget.optgroups %} | ||
{% if group %}<div><legend class="fr-fieldset__legend{% if widget.attrs.legend_classes %} {{ widget.attrs.legend_classes }}{% endif %}">{{ group }}</legend>{% endif %} | ||
{% with id=widget.attrs.id %} | ||
<fieldset | ||
{% if id %}id="{{ id }}"{% endif %} | ||
class="fr-fieldset{% if widget.attrs.class %} {{ widget.attrs.class }}{% endif %}" | ||
{% if id %}aria-labelledby="{{ id }}-legend"{% endif %} | ||
> | ||
{% for group, options, index in widget.optgroups %} | ||
{% if group %} | ||
<legend | ||
id="{{ group }}-legend" | ||
class="fr-fieldset__legend{% if widget.attrs.legend_classes %} {{ widget.attrs.legend_classes }}{% endif %}" | ||
> | ||
{{ group }} | ||
</legend> | ||
<fieldset aria-labelledby="{{ group }}-legend"> | ||
{% endif %} | ||
{% for option in options %} | ||
<div>{% include option.template_name with widget=option %}</div> | ||
{% include option.template_name with widget=option %} | ||
{% endfor %} | ||
{% if group %}</div>{% endif %} | ||
{% endfor %} | ||
</fieldset>{% endwith %} | ||
{% if group %}</fieldset>{% endif %} | ||
{% endfor %} | ||
</fieldset>{% endwith %} |
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 |
---|---|---|
@@ -1,15 +1,14 @@ | ||
<div class="fr-fieldset__element"> | ||
<div class="fr-radio-group fr-radio-rich"> | ||
<input value="1" type="radio" id="radio-rich-1" name="radio-rich"> | ||
<label class="fr-label" for="radio-rich-1"> | ||
Libellé bouton radio | ||
</label> | ||
<div class="fr-radio-rich__pictogram"> | ||
<svg aria-hidden="true" class="fr-artwork" viewBox="0 0 80 80" width="80px" height="80px"> | ||
<use class="fr-artwork-decorative" href="../../../dist/artwork/pictograms/buildings/city-hall.svg#artwork-decorative"></use> | ||
<use class="fr-artwork-minor" href="../../../dist/artwork/pictograms/buildings/city-hall.svg#artwork-minor"></use> | ||
<use class="fr-artwork-major" href="../../../dist/artwork/pictograms/buildings/city-hall.svg#artwork-major"></use> | ||
</svg> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="fr-fieldset__element{% if widget.inline %} fr-fieldset__element--inline{% endif %}"> | ||
<div class="fr-radio-group fr-radio-rich"> | ||
<input value="{{ widget.value }}" type="{{ widget.type }}" id="{{ widget.attrs.id }}" name="{{ widget.name }}"> | ||
<label class="fr-label" for="{{ widget.attrs.id }}">{{ widget.html_label }}</label> | ||
{% if widget.pictogram %} | ||
<div class="fr-radio-rich__pictogram"> | ||
<img | ||
src="{{ widget.pictogram }}" | ||
{% if widget.pictogram_alt is not None %} alt="{{ widget.pictogram_alt }}"{% endif %} | ||
/> | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> |
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