_create_community.rhtml
1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<h2><%= _('New community') %></h2>
<%= link_to( profile_image(task.requestor, :minor, :border => 0), task.requestor.public_profile_url ) %>
<%= _('%s wants to create community %s.') %
[content_tag('strong', link_to( task.requestor.name, task.requestor.public_profile_url ) ),
content_tag('strong', task.name )] %>
<% form_for('task', task, :url => { :action => 'close', :id => task.id } ) do |f| %>
<div>
<% if !Profile.is_available?(task.name.to_slug, environment) %>
<p><b><%= _('This name was already taken, this community cannot be approved') %></b></p>
<%= hidden_field_tag(:decision, 'cancel') %>
<% else %>
<%= radio_button_tag(:decision, 'finish', true,
:id => "decision-finish-#{task.id}",
:onclick => "hide_closing_statement_area(#{task.id})") %>
<label for="<%= "decision-finish-#{task.id}" %>"><b><%= _('Approve') %></b></label>
<%= radio_button_tag(:decision, 'cancel', false,
:id => "decision-cancel-#{task.id}",
:onclick => "show_closing_statement_area(#{task.id})") %>
<label for="<%= "decision-cancel-#{task.id}" %>"><b><%= _('Reject') %></b></label>
<% end %>
<script type='text/javascript'>
function show_closing_statement_area(id) {
$('task-closing-statement-' + id).show();
}
function hide_closing_statement_area(id) {
$('task-closing-statement-' + id).hide();
}
</script>
<div style='display:none' id=<%= "task-closing-statement-#{task.id}" %> >
<%= labelled_form_field _('Please provide an explanation for the rejection'), f.text_area(:closing_statement, :style => 'height:200px; width:80%;') %>
</div>
</div>
<% button_bar do %>
<%= submit_button(:ok, _('Ok!')) %>
<% end %>
<% end %>