socialforge/app/views/org_document_comments/new.html.erb

43 lines
1.4 KiB
Plaintext

<%= content_for(:header_tags) do %>
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
<%= javascript_include_tag "des_kindEditor" %>
<% end %>
<script>
$(function(){
init_des_data(150);
});
function check_org_title()
{
if($("#document_title").val().trim() == "")
{
$("#doc_title_hint").html("<span class='c_red'>标题不能为空</span>").show();
return false;
}
else
{
$("#doc_title_hint").hide();
return true;
}
}
function create_org_document()
{
if(check_org_title() == true)
{
org_document_description_editor.sync();
$('#new_org_document_form').submit();
}
}
function cancel_create_org_document(){
location.href = document.referrer;
}
</script>
<div class="homepageRightBanner" style="margin-top:<%= User.current.logged? ? '0px':'10px' %>; margin-bottom:10px;">
<div class="NewsBannerName"><%= OrgSubfield.try(:find, params[:field_id]).try(:name) %></div>
</div>
<div class="resources" nhname="new_topic_form" >
<%= form_tag organization_org_document_comments_path(:organization_id => @organization.id, :field_id => params[:field_id]), :id => 'new_org_document_form' do |f| %>
<%= render :partial => "form" %>
<% end %>
</div>