Don't make the connection URL input required

It might be that it's shown in response to a failed XEP-156 lookup
because the user mistyped.

In which case the user can just correct the JID and try again, without
entering a connection URL.
This commit is contained in:
JC Brand 2022-03-25 08:54:38 +01:00
parent fca275b7c9
commit d570b6095e

View File

@ -34,7 +34,6 @@ const connection_url_input = () => {
<p class="form-help instructions">${i18n_form_help}</p> <p class="form-help instructions">${i18n_form_help}</p>
<input id="converse-conn-url" <input id="converse-conn-url"
class="form-control" class="form-control"
required="required"
type="url" type="url"
name="connection-url" name="connection-url"
placeholder="${i18n_placeholder}"/> placeholder="${i18n_placeholder}"/>
@ -84,7 +83,6 @@ const auth_fields = (el) => {
const default_domain = api.settings.get('default_domain'); const default_domain = api.settings.get('default_domain');
const placeholder_username = ((locked_domain || default_domain) && __('Username')) || __('user@domain'); const placeholder_username = ((locked_domain || default_domain) && __('Username')) || __('user@domain');
const show_trust_checkbox = api.settings.get('allow_user_trust_override'); const show_trust_checkbox = api.settings.get('allow_user_trust_override');
const show_connection_url_input = api.settings.get('show_connection_url_input')
return html` return html`
<div class="form-group"> <div class="form-group">
@ -100,7 +98,7 @@ const auth_fields = (el) => {
placeholder="${placeholder_username}"/> placeholder="${placeholder_username}"/>
</div> </div>
${ (authentication !== _converse.EXTERNAL) ? password_input() : '' } ${ (authentication !== _converse.EXTERNAL) ? password_input() : '' }
${ show_connection_url_input ? connection_url_input() : '' } ${ api.settings.get('show_connection_url_input') ? connection_url_input() : '' }
${ show_trust_checkbox ? trust_checkbox(show_trust_checkbox === 'off' ? false : true) : '' } ${ show_trust_checkbox ? trust_checkbox(show_trust_checkbox === 'off' ? false : true) : '' }
<fieldset class="form-group buttons"> <fieldset class="form-group buttons">
<input class="btn btn-primary" type="submit" value="${i18n_login}"/> <input class="btn btn-primary" type="submit" value="${i18n_login}"/>