new_community.rhtml
2.36 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<% if @wizard %>
<%= render :partial => 'account/wizard_steps' %>
<% end %>
<h1><%= __('Creating new community') %></h1>
<% if environment.enabled?('admin_must_approve_new_communities') %>
<div class='explanation'>
<%= _("Note that the creation of communities in this environment is restricted. Your request to create this new community will be sent to %{environment} administrators and will be approved or rejected according to their methods and criteria.") % { :environment => environment.name }%>
</div>
<%end %>
<%= error_messages_for :community %>
<div>
<% labelled_form_for :community, @community, :html => { :multipart => true } do |f| %>
<%= required_fields_message %>
<%= required f.text_field(:name) %>
<%= hidden_field_tag :wizard, params[:wizard] %>
<%= render :partial => 'shared/custom_fields', :locals => { :f => f, :object_name => 'community', :profile => @community, :only_required => true } %>
<%= f.text_field('tag_list', :size => 64) %>
<%= content_tag( 'small', _('Separate tags with commas.') + '<br/>' + __("Tags are important to new users, they'll be able to find your new community more easily.") ) %>
<% f.fields_for :image_builder, @community.image do |i| %>
<%= file_field_or_thumbnail(_('Image:'), @community.image, i) %>
<% end %>
<div style='margin-bottom: 1em; margin-top: 1em;'>
<%= _('New members must be approved:')%>
</div>
<div style='margin-bottom: 0.5em' id='community-join-before'>
<%= radio_button 'community', 'closed', 'true', :style => 'float: left' %>
<div style='margin-left: 30px'>
<%= _('<strong>Before</strong> joining this group (a moderator has to accept the member in pending request before member can access the intranet and/or the website).') %>
</div>
</div>
<div id='community-join-after'>
<%= radio_button 'community', 'closed', 'false', :style => 'float: left' %>
<div style='margin-left: 30px'>
<%= _('<strong>After</strong> joining this group (a moderator can always desactivate access for users later).') %>
</div>
</div>
<% button_bar do %>
<%= submit_button(:save, _('Create')) %>
<% if @wizard %>
<%= button(:back, _('Back'), {:controller => 'search', :action => 'assets', :asset => 'communities', :wizard => true}) %>
<% else %>
<%= button(:cancel, _('Cancel'), :action => 'index') %>
<% end %>
<% end %>
<% end %>
</div>