|
|
@@ -0,0 +1,70 @@ |
|
|
|
<form action="{{ @target }}" method="post"> |
|
|
|
<repeat group="{{ @fields }}" key="{{ @name }}" value="{{ @info }}"> |
|
|
|
|
|
|
|
<check if="{{ @info.type == 'text' }}"> |
|
|
|
<true> |
|
|
|
<input |
|
|
|
name="{{ @name }}" |
|
|
|
id="{{ @name }}" |
|
|
|
type="text" |
|
|
|
size="{{ @info.length }}" |
|
|
|
value="{{ @info.value }}" /> |
|
|
|
<label for="{{ @name }}">{{ @info.description }}</label><br> |
|
|
|
</true> |
|
|
|
</check> |
|
|
|
|
|
|
|
<check if="{{ @info.type == 'hidden' }}"> |
|
|
|
<true> |
|
|
|
<input |
|
|
|
name="{{ @name }}" |
|
|
|
id="{{ @name }}" |
|
|
|
type="hidden" |
|
|
|
value="{{ @info.value }}"/> |
|
|
|
</true> |
|
|
|
</check> |
|
|
|
|
|
|
|
<check if="{{ @info.type == 'textarea' }}"> |
|
|
|
<true> |
|
|
|
<textarea |
|
|
|
name="{{ @name }}" |
|
|
|
id="{{ @name }}" |
|
|
|
cols="{{ @info.cols }}" |
|
|
|
rows="{{ @info.rows }}" >{{ @info.value }}</textarea> |
|
|
|
<label for="{{ @name }}">{{ @info.description }}</label><br> |
|
|
|
</true> |
|
|
|
</check> |
|
|
|
|
|
|
|
<check if="{{ @info.type == 'checkbox' }}"> |
|
|
|
<true> |
|
|
|
<repeat group="{{ @info.options }}" key="{{ @key }}" value="{{ @val }}"> |
|
|
|
<input |
|
|
|
type="checkbox" |
|
|
|
id="{{ sprintf('%s[%s]',@name,@key) }}" |
|
|
|
name="{{ sprintf('%s[%s]',@name,@key) }}" |
|
|
|
value="true" |
|
|
|
{{ is_array(@info.checked) ? in_array(@key,@info.checked) ? 'checked' : '' : !strcmp(@key,@info.checked) ? 'checked' : '' }} /> |
|
|
|
<label for="{{ sprintf('%s[%s]',@name,@key) }}"> |
|
|
|
{{ @val }}</label><br> |
|
|
|
</repeat> |
|
|
|
</true> |
|
|
|
</check> |
|
|
|
|
|
|
|
<check if="{{ @info.type == 'radio' }}"> |
|
|
|
<true> |
|
|
|
<repeat group="{{ @info.options }}" key="{{ @key }}" value="{{ @val }}"> |
|
|
|
<input |
|
|
|
type="radio" |
|
|
|
id="{{ sprintf('%s-%s',@name,@key) }}" |
|
|
|
name="{{ sprintf('%s',@name) }}" |
|
|
|
value="true" |
|
|
|
{{ is_array(@info.checked) ? in_array(@key,@info.checked) ? 'checked' : '' : !strcmp(@key,@info.checked) ? 'checked' : '' }} /> |
|
|
|
<label for="{{ sprintf('%s-%s',@name,@key) }}"> |
|
|
|
{{ @val }}</label> |
|
|
|
</repeat> |
|
|
|
<br> |
|
|
|
</true> |
|
|
|
</check> |
|
|
|
|
|
|
|
</repeat> |
|
|
|
<button type="submit" >{{ @submit_text ? : 'save' }}</button> |
|
|
|
</form> |