aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/layouts/default.rhtml2
-rw-r--r--app/views/request/new.rhtml4
-rw-r--r--spec/controllers/request_controller_spec.rb2
3 files changed, 7 insertions, 1 deletions
diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml
index f9f8d356f..e6c1b2851 100644
--- a/app/views/layouts/default.rhtml
+++ b/app/views/layouts/default.rhtml
@@ -1,8 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-gb">
<head>
- <!-- <script type="text/javascript" src="/js.js"></script> -->
<%= javascript_include_tag :defaults %>
+ <script type="text/javascript" src="/jslib/spell/spellChecker.js"></script>
<title><%=@title%> <%= @title ? "-" : "" %> foi.mysociety.org</title>
<%= stylesheet_link_tag 'main' %>
</head>
diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml
index 2bf80eb1b..97404e118 100644
--- a/app/views/request/new.rhtml
+++ b/app/views/request/new.rhtml
@@ -61,6 +61,10 @@
</p>
<% end %>
+ <div class="form_button">
+ <script type="text/javascript">document.write('<tr><td><input name="doSpell" type="button" value="Check spelling" onClick="openSpellChecker(document.getElementById(\'write_form\').body);"/> (optional)</td></tr>')</script>
+ </div>
+
<p class="form_note">
<strong>Privacy warning:</strong> All information that you enter, except
for your email address, will be displayed publically on this website. Any
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index b97cfcf12..22f354cae 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -120,6 +120,8 @@ describe RequestController, "when creating a new request" do
# post_redirect.post_params.should == params # XXX get this working. there's a : vs '' problem amongst others
end
+ # XXX preview stuff not covered here
+
it "should create the request and outgoing message, and send the outgoing message by email, and redirect to request page when input is good and somebody is logged in" do
session[:user_id] = users(:bob_smith_user).id
post :new, :info_request => { :public_body_id => public_bodies(:geraldine_public_body).id,