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,11 +2,11 @@
|
|||
<div class="field select">
|
||||
<label for="id_{{$field.0}}">{{$field.1}}</label>
|
||||
<select name="{{$field.0}}" id="id_{{$field.0}}" aria-describedby="{{$field.0}}_tip" {{$field.5 nofilter}}>
|
||||
{{foreach $field.4 as $opt=>$val}}
|
||||
{{if $field.5=='multiple'}}
|
||||
<option value="{{$opt}}" dir="auto"{{if $opt|in_array:$field.2}} selected="selected"{{/if}}>{{$val}}</option>
|
||||
{{foreach $field.4 as $opt => $val}}
|
||||
{{if $field.5 == 'multiple'}}
|
||||
<option value="{{$opt}}" dir="auto"{{if in_array($opt, $field.2)}} selected="selected"{{/if}}>{{$val}}</option>
|
||||
{{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}}
|
||||
{{/foreach}}
|
||||
</select>
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
<div class="form-group field select">
|
||||
<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}}>
|
||||
{{foreach $field.4 as $opt=>$val}}
|
||||
{{if $field.5=='multiple'}}
|
||||
<option value="{{$opt}}" {{if $opt|in_array:$field.2}}selected="selected"{{/if}}>{{$val}}</option>
|
||||
{{foreach $field.4 as $opt => $val}}
|
||||
{{if $field.5 == 'multiple'}}
|
||||
<option value="{{$opt}}" {{if in_array($opt, $field.2)}}selected="selected"{{/if}}>{{$val}}</option>
|
||||
{{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}}
|
||||
{{/foreach}}
|
||||
</select>
|
||||
|
|
Loading…
Reference in a new issue