1
0
Fork 0

Introduce range percent template

- Replace usage in frio theme settings
This commit is contained in:
Hypolite Petovan 2020-10-03 21:29:17 -04:00
parent b812065499
commit 94c53b3b23
2 changed files with 21 additions and 21 deletions

View file

@ -0,0 +1,20 @@
<div id="id_{{$field.0}}_wrapper" class="form-group field range">
{{if !isset($label) || $label != false }}
<label for="{{$field.0}}_range" id="label_{{$field.0}}">{{$field.1 nofilter}}{{if $field.4}}<span class="required"> {{$field.4}}</span>{{/if}}</label>
{{/if}}
<div class="row">
<div class="col-xs-9">
<input type="range" class="form-control" id="{{$field.0}}_range" min="0" max="100" step="1" value="{{$field.2}}" onchange="{{$field.0}}.value = this.value" oninput="{{$field.0}}.value = this.value">
</div>
<div class="col-xs-3">
<div class="input-group">
<input type="text" class="form-control input-sm" name="{{$field.0}}" id="{{$field.0}}" value="{{$field.2}}" onchange="{{$field.0}}_range.value = this.value" oninput="{{$field.0}}_range.value = this.value" aria-describedby="{{$field.0}}_tip">
<span class="input-group-addon image-select">%</span>
</div>
</div>
</div>
{{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span>
{{/if}}
<div class="clear"></div>
</div>

View file

@ -56,27 +56,7 @@
{{if $background_color}}{{include file="field_colorinput.tpl" field=$background_color}}{{/if}}
{{* The slider for the content opacity - We use no template for this since it is only used at this page *}}
{{if $contentbg_transp}}
<div class="form-group field input color">
<label for="id_{{$contentbg_transp.0}}" id="label_{{$contentbg_transp.0}}">{{$contentbg_transp.1}}</label>
<div class="row">
<div class="col-xs-9">
<input type="range" class="form-control" id="{{$contentbg_transp.0}}_range" min="0" max="100" step="1" value="{{$contentbg_transp.2}}" onchange="{{$contentbg_transp.0}}.value = this.value" oninput="{{$contentbg_transp.0}}.value = this.value">
</div>
<div class="col-xs-3">
<div class="input-group">
<input type="text" class="form-control input-sm" name="{{$contentbg_transp.0}}" id="{{$contentbg_transp.0}}" value="{{$contentbg_transp.2}}" onchange="{{$contentbg_transp.0}}_range.value = this.value" oninput="{{$contentbg_transp.0}}_range.value = this.value" aria-describedby="{{$contentbg_transp.0}}_tip">
<span class="input-group-addon image-select">%</span>
</div>
</div>
</div>
<span id="{{$contentbg_transp.0}}_tip" class="help-block" role="tooltip">{{$contentbg_transp.3}}</span>
<div id="end_{{$contentbg_transp.0}}" class="field_end"></div>
</div>
{{/if}}
{{if $contentbg_transp}}{{include file="field/range_percent.tpl" field=$contentbg_transp}}{{/if}}
{{if $background_image}}{{include file="field_fileinput.tpl" field=$background_image}}{{/if}}