]> git.openstreetmap.org Git - rails.git/commitdiff
Use HTML5 email and url field types where appropriate
authorTom Hughes <tom@compton.nu>
Fri, 21 Oct 2011 10:53:53 +0000 (11:53 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 14 Nov 2011 09:42:57 +0000 (09:42 +0000)
app/assets/stylesheets/common.css.scss
app/views/user/account.html.erb
app/views/user/login.html.erb
app/views/user/new.html.erb

index 1c8f72c242e0fa34e666d55fb4e9cbfbeb8cd6a7..d8992b637f5d7ea0ce8bd4965c8685a26684c9d3 100644 (file)
@@ -979,7 +979,7 @@ p#contributorGuidance {
   font-size: 0.8em;
 }
 
-input[type="text"], input[type="password"], textarea {
+input[type="text"], input[type="email"], input[type="url"], input[type="password"], textarea {
   border: 1px solid black;
 }
 
index 606e8c35830532af1f6425a8e3abf11a3054e1bb..0da8b2530d30edf82979e0ac6ed61dbdf80e9963 100644 (file)
@@ -14,7 +14,7 @@
 
   <tr>
     <td class="fieldName"><%= t 'user.account.new email address' %></td>
-    <td><%= f.text_field :new_email, {:size => 50, :maxlength => 255} %> <span class="minorNote"><%= t 'user.account.email never displayed publicly' %></span></td>
+    <td><%= f.email_field :new_email, {:size => 50, :maxlength => 255} %> <span class="minorNote"><%= t 'user.account.email never displayed publicly' %></span></td>
   </tr>
 
   <tr>
@@ -29,7 +29,7 @@
 
   <tr>
     <td class="fieldName" ><%= t 'user.account.openid.openid' %></td>
-    <td><%= f.text_field :openid_url, {:id => "openid_url", :class => "openid_url"} %> <span class="minorNote">(<a href="<%= t 'user.account.openid.link' %>" target="_new"><%= t 'user.account.openid.link text' %></a>)</span></td>
+    <td><%= f.url_field :openid_url, {:id => "openid_url", :class => "openid_url"} %> <span class="minorNote">(<a href="<%= t 'user.account.openid.link' %>" target="_new"><%= t 'user.account.openid.link text' %></a>)</span></td>
   </tr>
 
   <tr>
index 66392095b88682eb1fd0e96d07072f34bf5154cb..9a4f50abc62b3822799bed00010dc6499191f275 100644 (file)
@@ -45,7 +45,7 @@
             <%= raw t 'user.login.openid', :logo => openid_logo %>
           </td>
           <td>
-            <%= text_field_tag("openid_url", "", { :size => 28, :maxlength => 255, :tabindex => 3, :class => "openid_url" }) %>
+            <%= url_field_tag("openid_url", "", { :size => 28, :maxlength => 255, :tabindex => 3, :class => "openid_url" }) %>
             <span class="minorNote">(<a href="<%= t 'user.account.openid.link' %>" target="_new"><%= t 'user.account.openid.link text' %></a>)</span>
           </td>
         </tr>
index 97622ae138d1ab1113843b9a7a0c37196cef2a95..104a889591d287eb77023a09a9100c0ffc948222 100644 (file)
   <table id="signupForm">
     <tr>
       <td class="fieldName"><%= t 'user.new.email address' %></td>
-      <td><%= text_field(:user, :email, { :size => 50, :maxlength => 255, :tabindex => 1 }) %></td>
+      <td><%= email_field(:user, :email, { :size => 50, :maxlength => 255, :tabindex => 1 }) %></td>
     </tr>
     <tr>
       <td class="fieldName"><%= t 'user.new.confirm email address' %></td>
-      <td><%= text_field(:user, :email_confirmation, { :size => 50, :maxlength => 255, :tabindex => 2 }) %></td>
+      <td><%= email_field(:user, :email_confirmation, { :size => 50, :maxlength => 255, :tabindex => 2 }) %></td>
     </tr>
     <tr>
       <td></td>
@@ -43,7 +43,7 @@
 
     <tr id="openid_field">
       <td class="fieldName"><%= raw t 'user.new.openid', :logo => openid_logo %></td>
-      <td><%= text_field(:user, :openid_url, { :id => "openid_url", :size => 50, :maxlength => 255, :tabindex => 4, :class => "openid_url" }) %></td>
+      <td><%= url_field(:user, :openid_url, { :id => "openid_url", :size => 50, :maxlength => 255, :tabindex => 4, :class => "openid_url" }) %></td>
     </tr>
 
     <tr><td colspan="2">&nbsp;<!--vertical spacer--></td></tr>