Fix DB picker, theme picker per Buefy conventions

This commit is contained in:
Lance Edgar 2023-11-17 17:00:50 -06:00
parent dd9e41f651
commit e39581695f
2 changed files with 11 additions and 5 deletions

View file

@ -339,9 +339,15 @@
${h.form(url('change_db_engine'), ref='dbPickerForm')} ${h.form(url('change_db_engine'), ref='dbPickerForm')}
${h.csrf_token(request)} ${h.csrf_token(request)}
${h.hidden('engine_type', value=master.engine_type_key)} ${h.hidden('engine_type', value=master.engine_type_key)}
<div class="select"> <b-select name="dbkey"
${h.select('dbkey', db_picker_selected, db_picker_options, **{'@change': 'changeDB()'})} value="${db_picker_selected}"
</div> @input="changeDB()">
% for option in db_picker_options:
<option value="${option.value}">
${option.label}
</option>
% endfor
</b-select>
${h.end_form()} ${h.end_form()}
</div> </div>
% endif % endif
@ -397,7 +403,7 @@
<span>Theme:</span> <span>Theme:</span>
<b-select name="theme" <b-select name="theme"
v-model="globalTheme" v-model="globalTheme"
@change="changeTheme()"> @input="changeTheme()">
% for option in theme_picker_options: % for option in theme_picker_options:
<option value="${option.value}"> <option value="${option.value}">
${option.label} ${option.label}

View file

@ -2783,7 +2783,7 @@ class MasterView(View):
# would therefore share the "current" engine) # would therefore share the "current" engine)
selected = self.get_current_engine_dbkey() selected = self.get_current_engine_dbkey()
kwargs['expose_db_picker'] = True kwargs['expose_db_picker'] = True
kwargs['db_picker_options'] = [tags.Option(k) for k in engines] kwargs['db_picker_options'] = [tags.Option(k, value=k) for k in engines]
kwargs['db_picker_selected'] = selected kwargs['db_picker_selected'] = selected
# add info for downloadable input file templates, if any # add info for downloadable input file templates, if any