mirror of
https://github.com/friendica/friendica
synced 2024-11-18 00:23:47 +00:00
Replace last occurrences of in_array used as a Smarty modifier
- Address https://github.com/friendica/friendica/issues/13158#issuecomment-1826266366
This commit is contained in:
parent
fb19176201
commit
3b3d0231bc
2 changed files with 8 additions and 8 deletions
|
@ -2,11 +2,11 @@
|
||||||
<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" {{$field.5 nofilter}}>
|
<select name="{{$field.0}}" id="id_{{$field.0}}" aria-describedby="{{$field.0}}_tip" {{$field.5 nofilter}}>
|
||||||
{{foreach $field.4 as $opt=>$val}}
|
{{foreach $field.4 as $opt => $val}}
|
||||||
{{if $field.5=='multiple'}}
|
{{if $field.5 == 'multiple'}}
|
||||||
<option value="{{$opt}}" dir="auto"{{if $opt|in_array:$field.2}} selected="selected"{{/if}}>{{$val}}</option>
|
<option value="{{$opt}}" dir="auto"{{if in_array($opt, $field.2)}} selected="selected"{{/if}}>{{$val}}</option>
|
||||||
{{else}}
|
{{else}}
|
||||||
<option value="{{$opt}}" dir="auto"{{if $opt==$field.2}} selected="selected"{{/if}}>{{$val}}</option>
|
<option value="{{$opt}}" dir="auto"{{if $opt == $field.2}} selected="selected"{{/if}}>{{$val}}</option>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
<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" {{$field.5 nofilter}}>
|
<select name="{{$field.0}}" id="id_{{$field.0}}" class="form-control" aria-describedby="{{$field.0}}_tip" {{$field.5 nofilter}}>
|
||||||
{{foreach $field.4 as $opt=>$val}}
|
{{foreach $field.4 as $opt => $val}}
|
||||||
{{if $field.5=='multiple'}}
|
{{if $field.5 == 'multiple'}}
|
||||||
<option value="{{$opt}}" {{if $opt|in_array:$field.2}}selected="selected"{{/if}}>{{$val}}</option>
|
<option value="{{$opt}}" {{if in_array($opt, $field.2)}}selected="selected"{{/if}}>{{$val}}</option>
|
||||||
{{else}}
|
{{else}}
|
||||||
<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>
|
<option value="{{$opt}}" {{if $opt == $field.2}}selected="selected"{{/if}}>{{$val}}</option>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</select>
|
</select>
|
||||||
|
|
Loading…
Reference in a new issue