<%= content_for :headers do%> <%= javascript_include_tag 'jquery.jeditable', 'jquery.filestyle','jquery.jcrop' %> <%end%> <%= content_for :javascript do %> $("#jedit_form #public_checkbox").livequery('click', function(event) { if ($(this).is(':checked')) { $("#private_check").hide(); $('#moderatorPW').attr('disabled', true); $('#attendeePW').attr('disabled', true); } else{ $("#private_check").show(); $('#moderatorPW').removeAttr('disabled'); $('#attendeePW').removeAttr('disabled'); } }); $("#nonjavascript_form").remove(); $("#jedit_form").show(); edit_description = function(){ $('#space_description').click(); $('#edit_description_icon').hide(); }; $('#space_description').editable('<%=space_path(@space, :format => 'js')%>', { method : 'PUT', type : 'textarea', cancel : '<%= t('cancel')%>', submit : '<%= t('ok')%>', tooltip : '<%= t('space.clic')%>', name : 'space[description]', onblur : 'ignore', width : 185, height : 90, submitdata : {authenticity_token: "<%=form_authenticity_token()%>"}, callback : function(value, settings) { $('#edit_description_icon').show(); }, onreset : function() { $('#edit_description_icon').show(); } }); edit_moderatorPW = function(){ $('#space_moderatorPW').show(); $('#space_moderatorPW').click(); $('#edit_moderatorPW_icon').hide(); }; $('#space_moderatorPW').editable('<%=space_path(@space, :format => 'js')%>', { method : 'PUT', cancel : '<%= t('cancel')%>', submit : '<%= t('ok')%>', tooltip : '<%= t('space.clic')%>', name : 'space[bigbluebutton_room_attributes][moderator_password]', onblur: 'ignore', width : 185, submitdata : { authenticity_token: "<%=form_authenticity_token()%>", "space[bigbluebutton_room_attributes][id]": <%= @space.bigbluebutton_room.id %> }, callback : function(value, settings) { $('#space_moderatorPW').hide(); $('#edit_moderatorPW_icon').show(); }, onreset : function() { $('#space_moderatorPW').hide(); $('#edit_moderatorPW_icon').show(); } }); edit_attendeePW = function(){ $('#space_attendeePW').show(); $('#space_attendeePW').click(); $('#edit_attendeePW_icon').hide(); }; $('#space_attendeePW').editable('<%=space_path(@space, :format => 'js')%>', { method : 'PUT', cancel : '<%= t('cancel')%>', submit : '<%= t('ok')%>', tooltip : '<%= t('space.clic')%>', name : 'space[bigbluebutton_room_attributes][attendee_password]', onblur : 'ignore', width : 185, submitdata : { authenticity_token: "<%=form_authenticity_token()%>", "space[bigbluebutton_room_attributes][id]": <%= @space.bigbluebutton_room.id %> }, callback : function(value, settings) { $('#space_attendeePW').hide(); $('#edit_attendeePW_icon').show(); }, onreset : function() { $('#space_attendeePW').hide(); $('#edit_attendeePW_icon').show(); } }); $("#public_checkbox").click(function () { var val = $(this).is(":checked"); $.post("<%=space_path(@space)%>",{ _method: "put", authenticity_token: "<%=form_authenticity_token()%>", 'space[public]': val }); }); $("#repository_checkbox").click(function () { var val = $(this).is(":checked"); $.post("<%=space_path(@space)%>",{ _method: "put", authenticity_token: "<%=form_authenticity_token()%>", 'space[repository]': val },function(data){ eval(data); }, "script" ); }); $("#edit_space_button").click(function(){ $("form#edit_logo_form").submit(); }); <% render :partial => 'logos/crop_logo.js.erb', :locals => { :url_form => edit_space_url(@space), :form_id => 'form_update_avatar', :container_id => 'for_lightbox', :aspect_ratio => Logo::ASPECT_RATIO_S } %> edit_logo_fun = function(){ $('div#update_logo').show(); $('#logo_preview').hide(); // //$("#selected_logo_image").hide(); $(".user").fadeOut("slow",function(){$("#edit_logo_menu").fadeIn("slow");$("#default_space_images").fadeIn("slow");}); closeTextLogo(); closeUploadLogo(); }; <%end%>

<%=t('space.configuration')%>

<%= form_for @space, :html => { :multipart => true} do |f| %>

<%= f.text_field :name %>


<%= f.text_area :description%>

<%= check_box("space", "public")%>

<%= check_box("space", "repository")%>

<% end %>

<%=t('space.logo')%>

<%= form_for :logo, :url => space_logo_path(@space.id),:html => { :multipart => true } do |f| %>
<%= f.file_field :media %>
<%end%>