summaryrefslogtreecommitdiffstats
path: root/module/web/templates/default/captcha.html
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/templates/default/captcha.html')
-rw-r--r--module/web/templates/default/captcha.html73
1 files changed, 1 insertions, 72 deletions
diff --git a/module/web/templates/default/captcha.html b/module/web/templates/default/captcha.html
index 6c0099773..332a9c102 100644
--- a/module/web/templates/default/captcha.html
+++ b/module/web/templates/default/captcha.html
@@ -1,76 +1,5 @@
-<iframe id="upload_target" name="upload_target" src="" style="display: none; width:0;height:0"></iframe>
-
-<!-- Captcha form related functions -->
-<script type="text/javascript">
- document.addEvent("domready", function() {
- $('cap_reset').addEvent('click', function(){
- hide_cap()
- });
- $('cap_form').addEvent('submit', function(e){
- submit_cap();
- e.stop()
- });
- $('cap_positional').addEvent('click', on_cap_click);
- });
-
- function load_cap(method, post) {
- new Request.JSON({
- url: "/json/set_captcha",
- onSuccess: function(data) {
- if (data.captcha)
- set_captcha(data);
- else
- clear_captcha();
- },
- secure: false,
- async: true,
- method: method
- }).send(post);
- }
-
- function set_captcha(data) {
- $('cap_id').set('value', data.id);
- if (data.result_type == 'textual') {
- $('cap_textual_img').set('src', data.src);
- $('cap_title').set('text', '{{_("Please read the text on the captcha.")}}');
- $('cap_submit').setStyle('display', 'inline');
- $('cap_textual').setStyle('display', 'block');
- $('cap_positional').setStyle('display', 'none');
- }
- if (data.result_type == 'positional') {
- $('cap_positional_img').set('src', data.src);
- $('cap_title').set('text', '{{_("Please click on the right captcha position.")}}');
- $('cap_submit').setStyle('display', 'none');
- $('cap_textual').setStyle('display', 'none');
- $('cap_positional').setStyle('display', 'block');
- }
- }
-
- function clear_captcha() {
- $('cap_textual').setStyle('display', 'none');
- $('cap_textual_img').set('src', '');
- $('cap_positional').setStyle('display', 'none');
- $('cap_positional_img').set('src', '');
- $('cap_title').set('text', '{{_("No Captchas to read.")}}');
- }
-
- function submit_cap() {
- load_cap("post", "cap_id=" + $('cap_id').get('value') + "&cap_result=" + $('cap_result').get('value') );
- $('cap_result').set('value', '');
- return false;
- }
-
- function on_cap_click(e) {
- var position = e.target.getPosition();
- var x = e.page.x - position.x;
- var y = e.page.y - position.y;
- $('cap_result').value = x + "," + y;
- submit_cap();
- }
-</script>
-
<!-- Captcha box -->
-<div id="cap_box" class="myform">
+<div id="cap_box" class="window_box">
<form id="cap_form" action="/json/set_captcha" method="POST" enctype="multipart/form-data" onsubmit="return false;">