-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Translated boolean labels when using "toggle" fields
- Loading branch information
1 parent
62329ce
commit 8866b28
Showing
5 changed files
with
46 additions
and
22 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
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,6 +1,7 @@ | ||
{% trans_default_domain "EasyAdminBundle" %} | ||
|
||
{% if value == true %} | ||
<span class="label label-success">{{ 'boolean.true'|trans }}</span> | ||
<span class="label label-success">{{ 'label.true'|trans }}</span> | ||
{% else %} | ||
<span class="label label-danger">{{ 'boolean.false'|trans }}</span> | ||
{% endif %} | ||
<span class="label label-danger">{{ 'label.false'|trans }}</span> | ||
{% endif %} |
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,8 +1,14 @@ | ||
{% trans_default_domain "EasyAdminBundle" %} | ||
|
||
{% if view == 'show' %} | ||
<span class="label label-{{ value == true ? 'success' : 'danger' }}">{{ value == true ? 'YES' : 'NO' }}</span> | ||
{% if value == true %} | ||
<span class="label label-success">{{ 'label.true'|trans }}</span> | ||
{% else %} | ||
<span class="label label-danger">{{ 'label.false'|trans }}</span> | ||
{% endif %} | ||
{% else %} | ||
<input type="checkbox" {{ value == true ? 'checked' : '' }} | ||
data-toggle="toggle" data-size="mini" | ||
data-onstyle="success" data-offstyle="danger" | ||
data-on="YES" data-off="NO"> | ||
data-on="{{ 'label.true'|trans }}" data-off="{{ 'label.false'|trans }}"> | ||
{% endif %} |