Remove empty help spans from templates.

The empty spans from the templates mess up the layout sometimes, and are useless weight anyway.
Lets get rid of them.
This commit is contained in:
Andreas Neustifter 2018-04-23 19:15:54 +00:00
parent 2d8a4a923f
commit fe74a3d697
14 changed files with 43 additions and 15 deletions

View file

@ -4,6 +4,8 @@
<input type="checkbox" name="{{$field.0}}" id="id_{{$field.0}}" value="1" {{if $field.2}}checked="checked"{{/if}} aria-checked="{{if $field.2}}true{{else}}false{{/if}}" aria-describedby="{{$field.0}}_tip" {{if $field.4}}{{$field.4}}{{/if}}> <input type="checkbox" name="{{$field.0}}" id="id_{{$field.0}}" value="1" {{if $field.2}}checked="checked"{{/if}} aria-checked="{{if $field.2}}true{{else}}false{{/if}}" aria-describedby="{{$field.0}}_tip" {{if $field.4}}{{$field.4}}{{/if}}>
<label for="id_{{$field.0}}"> <label for="id_{{$field.0}}">
{{$field.1}} {{$field.1}}
{{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span> <span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span>
{{/if}}
</label> </label>
</div> </div>

View file

@ -6,6 +6,8 @@
{{if $field.4}}<span class="required">{{$field.4}}</span>{{/if}} {{if $field.4}}<span class="required">{{$field.4}}</span>{{/if}}
<span class="input-group-addon"><i></i></span> <span class="input-group-addon"><i></i></span>
</div> </div>
<span id="{{$field.0}}_tip" class="help-block" role="tooltip">{{$field.3}}</span> {{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span>
{{/if}}
<div id="end_{{$field.0}}" class="field_end"></div> <div id="end_{{$field.0}}" class="field_end"></div>
</div> </div>

View file

@ -2,5 +2,7 @@
<div class="form-group field custom"> <div class="form-group field custom">
<label for="{{$field.0}}">{{$field.1}}</label> <label for="{{$field.0}}">{{$field.1}}</label>
{{$field.2}} {{$field.2}}
<span class="help-block" id="{{$field.0}}_tip">{{$field.3}}</span> {{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span>
{{/if}}
</div> </div>

View file

@ -6,6 +6,8 @@
{{if $field.4}}<span class="required">{{$field.4}}</span>{{/if}} {{if $field.4}}<span class="required">{{$field.4}}</span>{{/if}}
<span class="input-group-addon image-select"><i class="fa fa-picture-o"></i></span> <span class="input-group-addon image-select"><i class="fa fa-picture-o"></i></span>
</div> </div>
<span id="{{$field.0}}_tip" class="help-block" role="tooltip">{{$field.3}}</span> {{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span>
{{/if}}
<div id="end_{{$field.0}}" class="field_end"></div> <div id="end_{{$field.0}}" class="field_end"></div>
</div> </div>

View file

@ -2,6 +2,8 @@
<div id="id_{{$field.0}}_wrapper" class="form-group field input"> <div id="id_{{$field.0}}_wrapper" class="form-group field input">
<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>
<input class="form-control" name="{{$field.0}}" id="id_{{$field.0}}"{{if $field.6 eq "email"}} type="email"{{elseif $field.6 eq "url"}} type="url"{{else}} type="text"{{/if}} value="{{$field.2|escape:'html'}}"{{if $field.4 eq "required"}} required{{/if}}{{if $field.5 eq "autofocus"}} autofocus{{elseif $field.5}} {{$field.5}}{{/if}} aria-describedby="{{$field.0}}_tip"> <input class="form-control" name="{{$field.0}}" id="id_{{$field.0}}"{{if $field.6 eq "email"}} type="email"{{elseif $field.6 eq "url"}} type="url"{{else}} type="text"{{/if}} value="{{$field.2|escape:'html'}}"{{if $field.4 eq "required"}} required{{/if}}{{if $field.5 eq "autofocus"}} autofocus{{elseif $field.5}} {{$field.5}}{{/if}} aria-describedby="{{$field.0}}_tip">
<span id="{{$field.0}}_tip" class="help-block" role="tooltip">{{$field.3}}</span> {{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span>
{{/if}}
<div class="clear"></div> <div class="clear"></div>
</div> </div>

View file

@ -2,6 +2,8 @@
<div class="form-group field checkbox"> <div class="form-group field checkbox">
<input type="checkbox" name="{{$field.0}}" id="id_{{$field.0}}" value="{{$field.3|escape:'html'}}" {{if $field.2}}checked="checked"{{/if}} aria-checked="{{if $field.2}}true{{else}}false{{/if}}" aria-describedby="{{$field.0}}_tip"> <input type="checkbox" name="{{$field.0}}" id="id_{{$field.0}}" value="{{$field.3|escape:'html'}}" {{if $field.2}}checked="checked"{{/if}} aria-checked="{{if $field.2}}true{{else}}false{{/if}}" aria-describedby="{{$field.0}}_tip">
<label for="id_{{$field.0}}">{{$field.1}}</label> <label for="id_{{$field.0}}">{{$field.1}}</label>
<span class="help-block" role="tooltip" id="{{$field.0}}_tip">{{$field.4}}</span> {{if $field.4}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.4}}</span>
{{/if}}
</div> </div>
<div class="clear"></div> <div class="clear"></div>

View file

@ -2,6 +2,8 @@
<div id="id_{{$field.0}}_wrapper" class="form-group field input openid"> <div id="id_{{$field.0}}_wrapper" class="form-group field input openid">
<label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1}}</label> <label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1}}</label>
<input class="form-control" name="{{$field.0}}" id="id_{{$field.0}}" type="text" value="{{$field.2|escape:'html'}}" aria-describedby="{{$field.0}}_tip"> <input class="form-control" name="{{$field.0}}" id="id_{{$field.0}}" type="text" value="{{$field.2|escape:'html'}}" aria-describedby="{{$field.0}}_tip">
<span id="{{$field.0}}_tip" class="help-block" role="tooltip">{{$field.3}}</span> {{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span>
{{/if}}
<div class="clear"></div> <div class="clear"></div>
</div> </div>

View file

@ -2,6 +2,8 @@
<div id="id_{{$field.0}}_wrapper" class="form-group field input password"> <div id="id_{{$field.0}}_wrapper" class="form-group field input password">
<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>
<input class="form-control" name="{{$field.0}}" id="id_{{$field.0}}" type="password" value="{{$field.2|escape:'html'}}" {{if $field.4 eq "required"}} required{{/if}}{{if $field.5 eq "autofocus"}} autofocus{{elseif $field.5}} {{$field.5}}{{/if}} aria-describedby="{{$field.0}}_tip"> <input class="form-control" name="{{$field.0}}" id="id_{{$field.0}}" type="password" value="{{$field.2|escape:'html'}}" {{if $field.4 eq "required"}} required{{/if}}{{if $field.5 eq "autofocus"}} autofocus{{elseif $field.5}} {{$field.5}}{{/if}} aria-describedby="{{$field.0}}_tip">
<span id="{{$field.0}}_tip" class="help-block" role="tooltip">{{$field.3}}</span> {{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span>
{{/if}}
<div class="clear"></div> <div class="clear"></div>
</div> </div>

View file

@ -4,7 +4,9 @@
<input type="radio" name="{{$field.0}}" id="id_{{$field.0}}_{{$field.2}}" value="{{$field.2}}" {{if $field.4}}checked{{/if}} aria-checked="{{if $field.4}}true{{else}}false{{/if}}" aria-describedby="{{$field.0}}_{{$field.2}}_tip"> <input type="radio" name="{{$field.0}}" id="id_{{$field.0}}_{{$field.2}}" value="{{$field.2}}" {{if $field.4}}checked{{/if}} aria-checked="{{if $field.4}}true{{else}}false{{/if}}" aria-describedby="{{$field.0}}_{{$field.2}}_tip">
<label for="id_{{$field.0}}_{{$field.2}}"> <label for="id_{{$field.0}}_{{$field.2}}">
{{$field.1}} {{$field.1}}
{{if $field.3}}
<span class="help-block" id="{{$field.0}}_{{$field.2}}_tip" role="tooltip">{{$field.3}}</span> <span class="help-block" id="{{$field.0}}_{{$field.2}}_tip" role="tooltip">{{$field.3}}</span>
{{/if}}
</label> </label>
</div> </div>
</div> </div>

View file

@ -4,5 +4,7 @@
<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|escape:'html'}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>{{/foreach}} {{foreach $field.4 as $opt=>$val}}<option value="{{$opt|escape:'html'}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>{{/foreach}}
</select> </select>
<span class="help-block" id="{{$field.0}}_tip">{{$field.3}}</span> {{if $field.3}}
</div> <span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span>
{{/if}}
</div>

View file

@ -4,5 +4,7 @@
<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}} {{$field.4}}
</select> </select>
<span class="help-block" id="{{$field.0}}_tip">{{$field.3}}</span> {{if $field.3}}
</div> <span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span>
{{/if}}
</div>

View file

@ -2,6 +2,8 @@
<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}}{{/if}} aria-describedby="{{$field.0}}_tip">{{$field.2}}</textarea>
<span id="{{$field.0}}_tip" class="help-block" role="tooltip">{{$field.3}}</span> {{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span>
{{/if}}
<div class="clear"></div> <div class="clear"></div>
</div> </div>

View file

@ -5,6 +5,8 @@
<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}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span> <span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span>
{{/if}}
{{if $field.5=="preview"}}<div id="theme-preview"></div>{{/if}} {{if $field.5=="preview"}}<div id="theme-preview"></div>{{/if}}
</div> </div>

View file

@ -14,6 +14,8 @@
<span class="toggle-handle btn btn-default btn-xs"></span> <span class="toggle-handle btn btn-default btn-xs"></span>
</div> </div>
</div> </div>
{{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span> <span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span>
{{/if}}
</div> </div>
<div class="clear"></div> <div class="clear"></div>