Mercurial > kallithea
changeset 7985:f9801165dc97 stable
admin: fix 'Settings > Visual' form validation after commit 574218777086
Commit 574218777086 introduced a setting for 'SSH Clone URL' in 'Admin >
Settings > Visual' and placed it under a check 'if c.ssh_enabled', which
means that the corresponding form field is not present when SSH is not
enabled.
In this case, when trying to save the form (changing any or none setting),
form validation reports an error 'Missing value' without much detail. At the
top of the HTML document, even before the opening HTML tag, we can see:
<!-- for: clone_ssh_tmpl -->
<span class="error-message">Missing value</span><br />
Fix this problem by adding a hidden form field for clone_ssh_tmpl, with the
current value from the database, in case SSH is not enabled.
author | Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> |
---|---|
date | Sat, 30 Nov 2019 19:55:45 +0100 |
parents | 09c92e6995fd |
children | 25f6f0c54e0f |
files | kallithea/templates/admin/settings/settings_visual.html |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/templates/admin/settings/settings_visual.html Wed Nov 27 20:44:12 2019 +0100 +++ b/kallithea/templates/admin/settings/settings_visual.html Sat Nov 30 19:55:45 2019 +0100 @@ -58,6 +58,8 @@ ${h.text('clone_ssh_tmpl', size=80, class_='form-control')} <span class="help-block">${_('''Schema for constructing SSH clone URL, eg. 'ssh://{system_user}@{hostname}/{repo}'.''')}</span> </div> + %else: + ${h.hidden('clone_ssh_tmpl', size=80, class_='form-control')} %endif </div>