2013-02-05 14:16:51 -05:00
|
|
|
<div id='simple-container'>
|
|
|
|
<h2><%= t 'activation.welcome_to', site_name: SiteSetting.title %></h2>
|
2014-07-14 12:25:42 -04:00
|
|
|
<br/>
|
2016-07-14 06:40:50 -04:00
|
|
|
<button class='btn btn-primary' id='activate-account-button'><%= t 'activation.action' %></button>
|
2014-07-14 12:25:42 -04:00
|
|
|
|
|
|
|
<%= form_tag(perform_activate_account_path, method: :put, id: 'activate-account-form') do %>
|
2014-07-15 14:07:19 -04:00
|
|
|
<%= hidden_field_tag 'password_confirmation' %>
|
|
|
|
<%= hidden_field_tag 'challenge' %>
|
2013-02-05 14:16:51 -05:00
|
|
|
<% end %>
|
2014-07-14 12:25:42 -04:00
|
|
|
</div>
|
2013-02-25 11:42:20 -05:00
|
|
|
|
2015-01-15 15:56:53 -05:00
|
|
|
<%- content_for(:no_ember_head) do %>
|
2017-04-17 12:30:20 -04:00
|
|
|
<%= preload_script "ember_jquery" %>
|
|
|
|
<%= preload_script "vendor" %>
|
2016-04-01 15:59:08 -04:00
|
|
|
<%= render_google_universal_analytics_code %>
|
2014-07-15 14:07:19 -04:00
|
|
|
<%- end %>
|
|
|
|
|
2014-07-14 12:25:42 -04:00
|
|
|
<script language="javascript">
|
|
|
|
(function() {
|
2018-05-11 13:57:04 -04:00
|
|
|
setTimeout(function() {
|
|
|
|
var $activateButton = $('#activate-account-button');
|
|
|
|
$activateButton.on('click', function() {
|
|
|
|
$activateButton.prop('disabled', true);
|
|
|
|
$.ajax("<%= path "/u/hp" %>").then(function(hp) {
|
|
|
|
$('#password_confirmation').val(hp.value);
|
|
|
|
$('#challenge').val(hp.challenge.split("").reverse().join(""));
|
|
|
|
$('#activate-account-form').submit();
|
|
|
|
}).fail(function() {
|
|
|
|
$activateButton.prop('disabled', false);
|
|
|
|
});
|
2014-07-15 14:07:19 -04:00
|
|
|
});
|
2018-05-11 13:57:04 -04:00
|
|
|
}, 50);
|
2014-07-14 12:25:42 -04:00
|
|
|
})();
|
|
|
|
</script>
|