forked from fc2blog/blog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request fc2blog#368 from uzulla/issue339/build-html-by-twig
文字列連結でおこなっているInputタグ生成を、Twigで書き換え fc2blog#339
- Loading branch information
Showing
15 changed files
with
276 additions
and
68 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{% for key, option in option_list %}<input type="checkbox" value="{{ key }}" {% if key in is_checked_key_list %}checked="checked"{% endif %} {{ attr|raw }} id="{{ label_key }}{{ key }}" /><label for="{{ label_key }}{{ key }}">{{ option }}</label>{% endfor %} |
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 @@ | ||
<input type="file" {{ attr|raw }} /> |
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 @@ | ||
<input type="hidden" {{ attr|raw }} value="{{ rvalue }}"/> |
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,4 @@ | ||
<li {{ li_attr }}> | ||
{% include "fragment/radio.twig" %} | ||
{% include "fragment/radio_label.twig" %} | ||
</li> |
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 @@ | ||
<input type="password" {{ attr|raw }} value="{{ rvalue }}"/> |
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 @@ | ||
<input type="radio" value="{{ key }}" {% if key in is_checked_key_list %}checked="checked"{% endif %} {{ attr|raw }} id="{{ label_key }}{{ key }}"/> |
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 @@ | ||
<label for="{{ label_key }}{{ key }}" {{ label_attr|raw }}>{{ option }}</label> |
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,24 @@ | ||
<select {{ attr|raw }}> | ||
{% for key, option in option_list %} | ||
{% if option is iterable %} | ||
{% if value in option %} | ||
<optgroup label="{{ key }}"> | ||
{% for k, v in option %} | ||
<option value="{{ k }}" {% if k == rvalue %}selected="selected"{% endif %}>{{ v }}{{ suffix }}</option>; | ||
{% endfor %} | ||
</optgroup> | ||
{% else %} | ||
<option value="{{ key }}" | ||
{% if rvalue == key %}selected="selected"{% endif %} | ||
{% if option.disabled %}disabled="disabled"{% endif %}> | ||
{% if option.level>1 %} | ||
{% for i in range(1, option.level-1) %} {% endfor %}{# 字下げ #} | ||
{% endif %} | ||
{{ option.value }}{{ suffix }} | ||
</option> | ||
{% endif %} | ||
{% else %} | ||
<option value="{{ key }}" {% if rvalue == key %}selected="selected"{% endif %}>{{ option }}{{ suffix }}</option> | ||
{% endif %} | ||
{% endfor %} | ||
</select> |
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 @@ | ||
<input type="text" {{ attr|raw }} value="{{ rvalue }}"/> |
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 @@ | ||
<textarea {{ attr|raw }}>{{ rvalue }}</textarea> |
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,5 @@ | ||
<ul class="form-radio-list"> | ||
{% for key, option in option_list %} | ||
{% include "fragment/li.twig" with {key: key} %} | ||
{% endfor %} | ||
</ul> |
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 @@ | ||
<span>{{ type }}は未実装です</span> |
Oops, something went wrong.