user can change the expand_alias setting
This commit is contained in:
parent
8de9931b28
commit
c0fe72ccd0
|
@ -368,6 +368,27 @@
|
|||
</div>
|
||||
<!-- END Reverse-alias -->
|
||||
|
||||
<!-- Always expand alias info -->
|
||||
<div class="card" id="expand-alias-info-section">
|
||||
<div class="card-body">
|
||||
<div class="card-title">Always expand alias info</div>
|
||||
<div class="mb-3">
|
||||
By default, additional alias info is shown after clicking on the "More" button. <br>
|
||||
When this option is enabled, alias additional info will always be shown. <br>
|
||||
</div>
|
||||
<form method="post" action="#expand-alias-info-section">
|
||||
<input type="hidden" name="form-name" value="expand-alias-info">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" id="expand-alias-info" name="enable"
|
||||
{% if current_user.expand_alias_info %} checked {% endif %} class="form-check-input">
|
||||
<label for="expand-alias-info">Automatically expand alias info</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-outline-primary">Update</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END Always expand alias info -->
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-title">Quarantine</div>
|
||||
|
|
|
@ -284,6 +284,16 @@ def setting():
|
|||
flash("Your preference has been updated", "success")
|
||||
return redirect(url_for("dashboard.setting"))
|
||||
|
||||
elif request.form.get("form-name") == "expand-alias-info":
|
||||
choose = request.form.get("enable")
|
||||
if choose == "on":
|
||||
current_user.expand_alias_info = True
|
||||
else:
|
||||
current_user.expand_alias_info = False
|
||||
db.session.commit()
|
||||
flash("Your preference has been updated", "success")
|
||||
return redirect(url_for("dashboard.setting"))
|
||||
|
||||
elif request.form.get("form-name") == "export-data":
|
||||
return redirect(url_for("api.export_data"))
|
||||
elif request.form.get("form-name") == "export-alias":
|
||||
|
|
Loading…
Reference in New Issue