Normalize field_*.tpl formatting

This commit is contained in:
Hypolite Petovan 2019-02-03 15:33:59 -05:00
parent ba7ffab3c2
commit 8c9ef56a71
11 changed files with 75 additions and 62 deletions

View File

@ -1,9 +1,10 @@
<div class='field select'> <div class='field select'>
<label for='id_{{$field.0}}'>{{$field.1}}</label> <label for='id_{{$field.0}}'>{{$field.1}}</label>
<select name='{{$field.0}}' id='id_{{$field.0}}' aria-describedby='{{$field.0}}_tip'> <select name='{{$field.0}}' id='id_{{$field.0}}' aria-describedby='{{$field.0}}_tip'>
{{foreach $field.4 as $opt=>$val}}<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>{{/foreach}} {{foreach $field.4 as $opt=>$val}}
<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>
{{/foreach}}
</select> </select>
{{if $field.3}} {{if $field.3}}
<span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3 nofilter}}</span> <span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3 nofilter}}</span>

View File

@ -1,8 +1,7 @@
<div class="field select">
<div class='field select'> <label for="id_{{$field.0}}">{{$field.1}}</label>
<label for='id_{{$field.0}}'>{{$field.1}}</label> <select name="{{$field.0}}" id="id_{{$field.0}}" aria-describedby="{{$field.0}}_tip">
<select name='{{$field.0}}' id='id_{{$field.0}}' aria-describedby='{{$field.0}}_tip'>
{{$field.4 nofilter}} {{$field.4 nofilter}}
</select> </select>
{{if $field.3}} {{if $field.3}}

View File

@ -1,8 +1,7 @@
<div class="field textarea">
<div class='field textarea'> <label for="id_{{$field.0}}">{{$field.1}}</label>
<label for='id_{{$field.0}}'>{{$field.1}}</label> <textarea name="{{$field.0}}" id="id_{{$field.0}}" aria-describedby="{{$field.0}}_tip">{{$field.2}}</textarea>
<textarea name='{{$field.0}}' id='id_{{$field.0}}' aria-describedby='{{$field.0}}_tip'>{{$field.2 nofilter}}</textarea>
{{if $field.3}} {{if $field.3}}
<span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3 nofilter}}</span> <span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3 nofilter}}</span>
{{/if}} {{/if}}

View File

@ -1,12 +1,18 @@
{{if $field.5}}<script>$(function(){ previewTheme($("#id_{{$field.0}}")[0]); });</script>{{/if}} {{if $field.5}}
<div class='field select'> <script>$(function(){ previewTheme($("#id_{{$field.0}}")[0]); });</script>
<label for='id_{{$field.0}}'>{{$field.1}}</label> {{/if}}
<select name='{{$field.0}}' id='id_{{$field.0}}' {{if $field.5}}onchange="previewTheme(this);"{{/if}} aria-describedby='{{$field.0}}_tip'> <div class="field select">
{{foreach $field.4 as $opt=>$val}}<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>{{/foreach}} <label for="id_{{$field.0}}">{{$field.1}}</label>
<select name="{{$field.0}}" id="id_{{$field.0}}" {{if $field.5}}onchange="previewTheme(this);"{{/if}} aria-describedby="{{$field.0}}_tip">
{{foreach $field.4 as $opt=>$val}}
<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>
{{/foreach}}
</select> </select>
{{if $field.3}} {{if $field.3}}
<span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3 nofilter}}</span> <span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3 nofilter}}</span>
{{/if}} {{/if}}
{{if $field.5}}<div id="theme-preview"></div>{{/if}} {{if $field.5}}
<div id="theme-preview"></div>
{{/if}}
</div> </div>

View File

@ -1,12 +1,12 @@
<div class='field yesno'> <div class="field yesno">
<label for='id_{{$field.0}}'>{{$field.1}}</label> <label for="id_{{$field.0}}">{{$field.1}}</label>
<div class='onoff' id="id_{{$field.0}}_onoff"> <div class="onoff" id="id_{{$field.0}}_onoff">
<input type="hidden" name='{{$field.0}}' id='id_{{$field.0}}' value="{{$field.2 nofilter}}" aria-describedby='{{$field.0}}_tip'> <input type="hidden" name="{{$field.0}}" id="id_{{$field.0}}" value="{{$field.2 nofilter}}" aria-describedby="{{$field.0}}_tip">
<a href="#" class='off'> <a href="#" class="off">
{{if $field.4}}{{$field.4.0}}{{else}}OFF{{/if}} {{if $field.4}}{{$field.4.0}}{{else}}OFF{{/if}}
</a> </a>
<a href="#" class='on'> <a href="#" class="on">
{{if $field.4}}{{$field.4.1}}{{else}}ON{{/if}} {{if $field.4}}{{$field.4.1}}{{else}}ON{{/if}}
</a> </a>
</div> </div>

View File

@ -1,5 +1,5 @@
<div id="id_{{$field.0}}_wrapper" class="form-group field input"> <div id="id_{{$field.0}}_wrapper" class="form-group field input">
{{if !isset($label) || $label != false }} {{if !isset($label) || $label != false }}
<label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1}}{{if $field.4}}<span class="required"> {{$field.4}}</span>{{/if}}</label> <label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1}}{{if $field.4}}<span class="required"> {{$field.4}}</span>{{/if}}</label>
{{/if}} {{/if}}
@ -8,4 +8,4 @@
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span> <span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span>
{{/if}} {{/if}}
<div class="clear"></div> <div class="clear"></div>
</div> </div>

View File

@ -1,10 +1,12 @@
<div class="form-group field select"> <div class="form-group field select">
<label for="id_{{$field.0}}">{{$field.1}}</label> <label for="id_{{$field.0}}">{{$field.1}}</label>
<select name="{{$field.0}}" id="id_{{$field.0}}" class="form-control" aria-describedby="{{$field.0}}_tip"> <select name="{{$field.0}}" id="id_{{$field.0}}" class="form-control" aria-describedby="{{$field.0}}_tip">
{{foreach $field.4 as $opt=>$val}}<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>{{/foreach}} {{foreach $field.4 as $opt=>$val}}
<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>
{{/foreach}}
</select> </select>
{{if $field.3}} {{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span> <span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span>
{{/if}} {{/if}}
</div> </div>

View File

@ -1,5 +1,5 @@
<div class="form-group field select"> <div class="form-group field select">
<label for="id_{{$field.0}}">{{$field.1}}</label> <label for="id_{{$field.0}}">{{$field.1}}</label>
<select class="form-control" name="{{$field.0}}" id="id_{{$field.0}}" aria-describedby="{{$field.0}}_tip"> <select class="form-control" name="{{$field.0}}" id="id_{{$field.0}}" aria-describedby="{{$field.0}}_tip">
{{$field.4 nofilter}} {{$field.4 nofilter}}
@ -7,4 +7,4 @@
{{if $field.3}} {{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span> <span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span>
{{/if}} {{/if}}
</div> </div>

View File

@ -1,7 +1,7 @@
<div class="form-group field textarea"> <div class="form-group field textarea">
<label for="id_{{$field.0}}">{{$field.1}}</label> <label for="id_{{$field.0}}">{{$field.1}}</label>
<textarea class="form-control text-autosize" name="{{$field.0}}" id="id_{{$field.0}}" {{if $field.4}}{{$field.4}}{{/if}} aria-describedby="{{$field.0}}_tip">{{$field.2}}</textarea> <textarea class="form-control text-autosize" name="{{$field.0}}" id="id_{{$field.0}}" {{if $field.4}}{{$field.4 nofilter}}{{/if}} aria-describedby="{{$field.0}}_tip">{{$field.2}}</textarea>
{{if $field.3}} {{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span> <span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span>
{{/if}} {{/if}}

View File

@ -1,12 +1,18 @@
{{if $field.5=="preview"}}<script type="text/javascript">$(document).ready(function(){ previewTheme($("#id_{{$field.0}}")[0]); });</script>{{/if}} {{if $field.5=="preview"}}
<div class="form-group field select"> <script type="text/javascript">$(document).ready(function(){ previewTheme($("#id_{{$field.0}}")[0]); });</script>
{{/if}}
<div class="form-group field select">
<label for="id_{{$field.0}}">{{$field.1}}</label> <label for="id_{{$field.0}}">{{$field.1}}</label>
<select class="form-control" name="{{$field.0}}" id="id_{{$field.0}}" {{if $field.5=="preview"}}onchange="previewTheme(this);"{{/if}} aria-describedby="{{$field.0}}_tip" > <select class="form-control" name="{{$field.0}}" id="id_{{$field.0}}" {{if $field.5=="preview"}}onchange="previewTheme(this);"{{/if}} aria-describedby="{{$field.0}}_tip" >
{{foreach $field.4 as $opt=>$val}}<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>{{/foreach}} {{foreach $field.4 as $opt=>$val}}
<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>
{{/foreach}}
</select> </select>
{{if $field.3}} {{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span> <span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span>
{{/if}} {{/if}}
{{if $field.5=="preview"}}<div id="theme-preview"></div>{{/if}} {{if $field.5=="preview"}}
</div> <div id="theme-preview"></div>
{{/if}}
</div>