]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/user_blocks/edit.html.erb
First version of blocking feature. Allows both time-based (for map protection) and...
[rails.git] / app / views / user_blocks / edit.html.erb
diff --git a/app/views/user_blocks/edit.html.erb b/app/views/user_blocks/edit.html.erb
new file mode 100644 (file)
index 0000000..3ca0b90
--- /dev/null
@@ -0,0 +1,25 @@
+<h1><%= t('user_block.edit.title', :name => @user_block.user.display_name) %></h1>
+
+<% form_for(@user_block) do |f| %>
+  <%= f.error_messages %>
+
+  <p>
+    <%= f.label :reason, t('user_block.edit.reason', :name => @user_block.user.display_name) %><br />
+    <%= f.text_area :reason %>
+  </p>
+  <p>
+    <%= label_tag 'user_block_period', t('user_block.edit.period') %><br />
+    <%= hidden_field_tag 'what is the period', params[:user_block_period] %>
+    <%= select_tag('user_block_period', options_for_select(UserBlock::PERIODS.collect { |h| [t('user_block.period', :count => h), h.to_s] }, params[:user_block_period])) %>
+  </p>
+  <p>
+    <%= f.check_box :needs_view %>
+    <%= f.label :needs_view, t('user_block.edit.needs_view') %>
+  </p>
+  <p>
+    <%= f.submit t('user_block.edit.submit') %>
+  </p>
+<% end %>
+
+<%= link_to t('user_block.edit.show'), @user_block %> |
+<%= link_to t('user_block.edit.back'), user_blocks_path %>