mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 13:41:15 -07:00
Add option group type to notifier and newsletter config modal
This commit is contained in:
parent
741f3d836a
commit
15c7212031
2 changed files with 14 additions and 6 deletions
|
@ -326,10 +326,14 @@
|
|||
<div class="col-md-12">
|
||||
<select class="form-control" id="${item['name']}" name="${item['name']}">
|
||||
% for key, value in sorted(item['select_options'].items()):
|
||||
% if key == item['value']:
|
||||
<option value="${key}" selected>${value}</option>
|
||||
% if isinstance(value, list):
|
||||
<optgroup label="${key}">
|
||||
% for option in sorted(value, key=lambda x: x['text'].lower()):
|
||||
<option value="${option['value']}" ${'selected' if option['value'] == item['value'] else ''}>${option['text']}</option>
|
||||
% endfor
|
||||
</optgroup>
|
||||
% else:
|
||||
<option value="${key}">${value}</option>
|
||||
<option value="${key}" ${'selected' if key == item['value'] else ''}>${value}</option>
|
||||
% endif
|
||||
% endfor
|
||||
</select>
|
||||
|
|
|
@ -113,10 +113,14 @@
|
|||
<div class="col-md-12">
|
||||
<select class="form-control" id="${item['name']}" name="${item['name']}">
|
||||
% for key, value in sorted(item['select_options'].items()):
|
||||
% if key == item['value']:
|
||||
<option value="${key}" selected>${value}</option>
|
||||
% if isinstance(value, list):
|
||||
<optgroup label="${key}">
|
||||
% for option in sorted(value, key=lambda x: x['text'].lower()):
|
||||
<option value="${option['value']}" ${'selected' if option['value'] == item['value'] else ''}>${option['text']}</option>
|
||||
% endfor
|
||||
</optgroup>
|
||||
% else:
|
||||
<option value="${key}">${value}</option>
|
||||
<option value="${key}" ${'selected' if key == item['value'] else ''}>${value}</option>
|
||||
% endif
|
||||
% endfor
|
||||
</select>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue