Skip to content
Snippets Groups Projects
Unverified Commit 336b7abe authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

bugfix: Click the submit button in the new UI does not work on chrome.

parent 80a178ba
No related branches found
No related tags found
No related merge requests found
...@@ -98,13 +98,15 @@ ...@@ -98,13 +98,15 @@
</div> <!-- form-align--> </div> <!-- form-align-->
<br><br> <br><br>
<button class="pure-button pure-button-red pure-input-1-2 pure-input-sm-1-1 right" id="submit_button" type="submit" tabindex="6"> {%- for name, value in stateparams %}
{{ 'Login'|trans }}
</button> <input type="hidden" name="{{ name }}" value="{{ value }}"/>
<input type='hidden' id="processing_trans" value="{{ 'Processing...'|trans }}" />
{% for name, value in stateparams -%}
<input type="hidden" name="{{ name }}" value="{{ value }}" />
{%- endfor %} {%- endfor %}
<button class="pure-button pure-button-red pure-input-1-2 pure-input-sm-1-1 right" id="submit_button"
type="submit" tabindex="6" data-processing="{% trans %}Processing...{% endtrans %}">
{% trans %}Log in{% endtrans %}
</button>
</form> </form>
</div><!--center--> </div><!--center-->
{% if links -%} {% if links -%}
......
document.addEventListener( $(document).ready(function () {
'DOMContentLoaded', $('#submit_button').on('click', function () {
function () { $(this).attr('disabled', 'disabled');
var button = document.getElementById("submit_button"); $(this).html($(this).data('processing'));
button.addEventListener( });
'click', });
function () {
var translation = document.getElementById("processing_trans");
this.disabled = true;
this.innerHTML = translation.value;
return true;
}
);
}
);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment