]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/edit.rhtml
Require data to be public before editing
[rails.git] / app / views / site / edit.rhtml
index 8ff98a3b1d00d9a376da105c009dc7094a01b6ed..de276411572166787fffe5e5e8b4ae32ae2a7e36 100644 (file)
@@ -6,6 +6,11 @@
 <p>The OpenStreetMap database is currently in read-only mode while
    essential database maintenance work is carried out.
 </p>
 <p>The OpenStreetMap database is currently in read-only mode while
    essential database maintenance work is carried out.
 </p>
+<% elsif !@user.data_public? %>
+<p>You haven't set your edits to be public.</p>
+<p>You can't use the online editor unless you do so. You can set your edits as public from your 
+<%= link_to 'user page', {:controller => 'user', :action => 'account', :display_name => @user.display_name}%>.</p>
+<p>(<a href="http://wiki.openstreetmap.org/index.php/Disabling_anonymous_edits">Find out why this is the case.</a>)</p>
 <% else %>
 <% content_for :greeting do %>
 <% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
 <% else %>
 <% content_for :greeting do %>
 <% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
   window.onresize = handleResize;
   window.onload = handleResize;
 
   window.onresize = handleResize;
   window.onload = handleResize;
 
-
-<% unless @user.data_public? %>
-    var warningtext ="<div style='padding-left:8px;padding-right:8px;'><p>You haven't set your edits to be public.</p><p><b>From mid-November, you will no longer be able to use the online editor unless you do so.</b> You can set your edits as public from your ";
-       var warningtext=warningtext+'<%= link_to 'user page', {:controller => 'user', :action => 'account', :display_name => @user.display_name}%>.</p>';
-       var warningtext=warningtext+'<p>(<a href="http://wiki.openstreetmap.org/index.php/Disabling_anonymous_edits">Find out why this is changing.</a>)</p></div>';
-       updateSidebar("Warning",warningtext);
-       openSidebar();
-<% end %>
-
-
 </script>
 <% end %>
 </script>
 <% end %>