1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-09 19:56:48 +00:00

fix(virtsecrets): the create dialog offers only the usage types it can create

The usage list of the create-secret dialog came from the map that names
the usage types of existing secrets, so it offered none and tls too; the
form takes ceph, volume and iscsi only, and picking none or tls always
failed with "Select a valid choice". The dialog now lists the form's own
choices.
This commit is contained in:
catborise 2026-10-20 22:12:35 +03:00
parent 8c1d7d33bb
commit 084f2e8b60
3 changed files with 21 additions and 4 deletions

View file

@ -37,8 +37,8 @@
<label for="secret_usage_type" class="col-sm-3 col-form-label">{% trans "Usage" %}</label>
<div class="col-sm-6">
<select id="secret_usage_type" name="usage_type" class="form-control">
{% for key, usage_type in secret_usage_types.items %}
<option value="{{ usage_type }}">{{ usage_type }}</option>
{% for value, label in usage_choices %}
<option value="{{ value }}">{{ label }}</option>
{% endfor %}
</select>
</div>