blob: b81da062400624de76c14f1a82f5b3af7ced4128 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
<% if @has_secret_key %>
<%= form_remote_tag :url => {:action => 'encrypt'},
:update => { :success => 'encryption_result', :failure => 'encryption_error' },
:failure => "$('encryption_error').show()" -%>
<input type="text" name="text" id="text"/>
<input type="submit" value="Encrypt" id="submit_encrypt"/>
</form>
<div id="encryption_result"></div>
<div id="encryption_error" class="error" style="display:none"></div>
<% else %>
<form action="<%= ApplicationController.root_context -%>/encryption/generate_secret" method="POST">
<input type="submit" value="Generate secret" id="submit_generate_secret"/>
</form>
<% end %>
|