-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contact page #323
Contact page #323
Conversation
8caf291
to
895584a
Compare
@zarino - could you check I've not broken your design before I hand this over for a review of the Rails code? |
<p> | ||
<label class="form_label" for="contact_name">My name:</label> | ||
<%= f.text_field :name, :size => 20 %> | ||
(or <%= link_to "sign in", signin_url(:r => request.fullpath) %>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lizconlan – This return path should include the "#wdtk" location fragment, so that when they return to the contact page after logging in, they're automatically taken down to the right section of the page.
@lizconlan – I've added a few commits tidying up the error styles, but other than that, it all looks good! |
@zarino I got a bit confused (easily done, admittedly) when there were "required" form fields as it just seemed as though the form was broken - I missed the visual cue of the disable submit button and was wondering why nothing was happening when I clicked on it. Although to be fair, I was expecting me to have broken something so... |
Have fixed the post signin redirect. But... the client-side validation doesn't work in Safari, it just looks like the form submit's broken. |
Sigh. Safari (on Mac and iOS) doesn't show a notification when a required form input is left empty: http://caniuse.com/#search=required (webkit bug from 7 years ago). It is, however, beneficial for users with more compliant browsers, because it saves the page having to reload before you see your mistake. Maybe we use JavaScript to remove the "required" attribute on Safari only? Would the form submit then? |
7 year old bug in Safari, you say? Wish I could be more surprised. Yeah that should work - the only other thing I can think is to make the disabled submit button more obvious but that's probably harder/more disruptive. |
Yes, we should aim to avoid the submit button being disabled at all. If that means we have to remove form validation entirely for all browsers, just so that it works for Safari, then so be it. But it'd be nice if we could just remove it for Safari, and keep it for the more modern browsers. |
A bit clunkily done - if I say so myself - but should be Safari-proof now |
<li> | ||
If you want to make a public Freedom Of Information | ||
request to a UK government department, you can | ||
<a href="<%= new_request_path %>">start here</a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clicking this redirects you to the homepage, You want select_authority_path
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D'oh! Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(ah, that's been copied across from the original and is what's currently on the site - good catch @garethrees)
Couple of minor bits but after that good to go. Lets handle the Welsh translations as part of mysociety/alaveteli#3137, as there'll be some additional translation to do there. |
Assigned to @lizconlan to handle minor fixups and merge |
a055043
to
00ee1ea
Compare
a4e551d
to
4e69443
Compare
Connects to mysociety/alaveteli#74.
To-do:
houdini-input
should be "checked" so the form is visible, and the user should be sent down to the#wdtk
anchor.