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/>
|
|
|
|
<button class='btn' id='activate-account-button'><%= t 'activation.action' %></button>
|
|
|
|
|
|
|
|
<%= form_tag(perform_activate_account_path, method: :put, id: 'activate-account-form') do %>
|
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
|
|
|
|
2014-07-14 12:25:42 -04:00
|
|
|
<script language="javascript">
|
|
|
|
(function() {
|
|
|
|
var t1 = new Date().getTime(),
|
|
|
|
button = document.getElementById('activate-account-button'),
|
|
|
|
form = document.getElementById('activate-account-form');
|
2013-02-05 14:16:51 -05:00
|
|
|
|
2014-07-14 12:25:42 -04:00
|
|
|
button.addEventListener('click', function() {
|
|
|
|
var diff = new Date().getTime() - t1;
|
|
|
|
|
|
|
|
// Ensure the form has been visible for a few ms before allowing the
|
|
|
|
// user to submit.
|
|
|
|
if (diff > 50) {
|
|
|
|
form.submit();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})();
|
|
|
|
</script>
|