From 923a33add544ba0c018e5ccb2ee08f44de0ab391 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 23 Oct 2014 10:44:06 +0800 Subject: [PATCH] =?UTF-8?q?#1397=E3=80=81#1396=E6=96=B0=E5=BB=BA=E7=AB=9E?= =?UTF-8?q?=E8=B5=9B=E9=80=9A=E7=9F=A5=E5=A2=9E=E5=8A=A0js=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/contestnotifications/_form.html.erb | 39 +++++------ app/views/contestnotifications/index.html.erb | 64 ++++++++++++++++++- config/locales/zh.yml | 4 ++ 3 files changed, 86 insertions(+), 21 deletions(-) diff --git a/app/views/contestnotifications/_form.html.erb b/app/views/contestnotifications/_form.html.erb index 36bcd78c6..908d1138d 100644 --- a/app/views/contestnotifications/_form.html.erb +++ b/app/views/contestnotifications/_form.html.erb @@ -3,24 +3,27 @@ <%= l(:bale_news_notice) %>
-

- <%= f.text_field :title, - :required => true, - :size => 60, - :maxlength => 60, - :style => "width:488px;" - %> -

-

- <%= f.text_area :description, - :required => true, - :cols => 60, - :rows => 11, - :class => 'wiki-edit', - :style => "width:490px;" - %> -

- +

+ <%= f.text_field :title, + :required => true, + :size => 60, + :maxlength => 60, + :style => "width:488px;", + :onblur => "regexTitle();" + %> +

+ +

+ <%= f.text_area :description, + :required => true, + :cols => 60, + :rows => 11, + :class => 'wiki-edit', + :style => "width:490px;", + :onblur => "regexDescription();" + %> +

+
<%= wikitoolbar_for 'news_description' %> diff --git a/app/views/contestnotifications/index.html.erb b/app/views/contestnotifications/index.html.erb index 8a4278551..a678d87e8 100644 --- a/app/views/contestnotifications/index.html.erb +++ b/app/views/contestnotifications/index.html.erb @@ -1,3 +1,62 @@ + + <%= l(:label_notification) %> @@ -12,10 +71,9 @@ <%= labelled_form_for @contestnotification, :url => contest_contestnotifications_path(@contest), :html => {:id => 'contestnotifications-form', :multipart => true} do |f| %> <%= render :partial => 'contestnotifications/form', :locals => {:f => f} %> - <%= submit_tag l(:button_create), :class => 'whiteButton m3p10 h30', :name => nil %> - <%#= preview_link preview_contestnotifications_path(:contest_id => @contest), 'contestnotifications-form', target='preview', {:class => 'whiteButton m3p10'} %> + | - <%= link_to l(:button_cancel), "#", :onclick => '$("#add-contestnotifications").hide(); return false;', :class => 'whiteButton m3p10' %> + <% end if @contest %>
diff --git a/config/locales/zh.yml b/config/locales/zh.yml index d20bb6e6d..2eb44a0a6 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -2165,3 +2165,7 @@ zh: lable_course_teacher: 主讲老师 lable_course_end: 课程学期已结束 lable_file_sharingarea: 资源共享区 + label_no_contest_news_description: 竞赛描述不能为空 + label_contest_news_condition: 竞赛描述超过5000个汉字 + label_no_contest_news_title: 竞赛标题不能为空 + label_contest_news_title_condition: 竞赛标题超过255个汉字