parent
a823700300
commit
4604720475
|
@ -1,51 +1,77 @@
|
|||
<%#= error_messages_for 'softapplication' %>
|
||||
|
||||
<script type="text/javascript" xmlns="http://www.w3.org/1999/html">
|
||||
<script type="text/javascript" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
|
||||
//验证作品名称
|
||||
function regexName()
|
||||
{
|
||||
var name = $("#softapplication_name").val();
|
||||
if(name.length ==0)
|
||||
if(name.length == 0)
|
||||
{
|
||||
$("#spane_name_notice").text("作品名称不能为空");
|
||||
$("#spane_name_notice").text("<%= l(:label_no_softapplication_name) %>");
|
||||
$("#spane_name_notice").css('color','#ff0000');
|
||||
$("#spane_name_notice").focus();
|
||||
return false;
|
||||
}
|
||||
else if(name.length <= 25)
|
||||
{
|
||||
$("#spane_name_notice").text("填写正确");
|
||||
$("#spane_name_notice").text("<%= l(:label_field_correct) %>");
|
||||
$("#spane_name_notice").css('color','#008000');
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#spane_name_notice").text("作品名称超过25个汉字");
|
||||
$("#spane_name_notice").text("<%= l(:label_work_name_condition) %>");
|
||||
$("#spane_name_notice").css('color','#ff0000');
|
||||
$("#spane_name_notice").focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// added by longjun
|
||||
//验证作品简介
|
||||
function regexDescription()
|
||||
{
|
||||
var name = $("#softapplication_description").val();
|
||||
if(name.length ==0)
|
||||
{
|
||||
$("#span_sofapplication_description").text("<%= l(:label_no_softapplication_description) %>");
|
||||
$("#span_sofapplication_description").css('color','#ff0000');
|
||||
$("#span_sofapplication_description").focus();
|
||||
return false;
|
||||
}
|
||||
else if(name.length <= 500)
|
||||
{
|
||||
$("#span_sofapplication_description").text("<%= l(:label_field_correct) %>");
|
||||
$("#span_sofapplication_description").css('color','#008000');
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#span_sofapplication_description").text("<%= l(:label_work_description_condition) %>");
|
||||
$("#span_sofapplication_description").css('color','#ff0000');
|
||||
$("#span_sofapplication_description").focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//验证运行平台
|
||||
function regexWorkdescription()
|
||||
{
|
||||
var workDescription = $("#softapplication_android_min_version_available").val();
|
||||
if(workDescription.length ==0)
|
||||
{
|
||||
$("#spane_workdescription_notice").text("运行平台不能为空");
|
||||
$("#spane_workdescription_notice").text("<%= l(:label_no_softapplication_platform) %>");
|
||||
$("#spane_workdescription_notice").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
if(workDescription.length <= 125)
|
||||
{
|
||||
$("#spane_workdescription_notice").text("填写正确");
|
||||
$("#spane_workdescription_notice").text("<%= l(:label_field_correct) %>");
|
||||
$("#spane_workdescription_notice").css('color','#008000');
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#spane_workdescription_notice").text("运行平台超过125个汉字");
|
||||
$("#spane_workdescription_notice").text("<%= l(:label_work_platform_condition) %>");
|
||||
$("#spane_workdescription_notice").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
|
@ -57,19 +83,19 @@
|
|||
var workDescription = $("#softapplication_application_developers").val();
|
||||
if(workDescription.length ==0)
|
||||
{
|
||||
$("#span_softapplication_application_developers").text(<%= l(:label_no_softapplication_developers) %>);
|
||||
$("#span_softapplication_application_developers").text("<%= l(:label_no_softapplication_developers) %>");
|
||||
$("#span_softapplication_application_developers").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
if(workDescription.length <= 125)
|
||||
{
|
||||
$("#span_softapplication_application_developers").text(<%= l(:label_field_correct) %>);
|
||||
$("#span_softapplication_application_developers").text("<%= l(:label_field_correct) %>");
|
||||
$("#span_softapplication_application_developers").css('color','#008000');
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#span_softapplication_application_developers").text(<%= l(:label_softapplication_developers_condition) %>);
|
||||
$("#span_softapplication_application_developers").text("<%= l(:label_softapplication_developers_condition) %>");
|
||||
$("#span_softapplication_application_developers").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
|
@ -77,7 +103,7 @@
|
|||
//提交验证
|
||||
function submit_new_softapplication()
|
||||
{
|
||||
if(regexName() && regexWorkdescription() && regexDevelopers())
|
||||
if(regexName() && regexDescription() && regexDevelopers())
|
||||
{
|
||||
$("#new_softapplication").submit();
|
||||
}
|
||||
|
@ -90,70 +116,36 @@
|
|||
<tr style="width:700px; margin-left: -10px;">
|
||||
<span><%= l(:label_work_name) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td>
|
||||
|
||||
<%= f.text_field :name,
|
||||
:required => true,
|
||||
:size => 60,
|
||||
:style => "width:320px;",
|
||||
:onblur => "regexName();"
|
||||
%>
|
||||
</td>
|
||||
|
||||
<span style="font-size: 10px;" id="spane_name_notice">(<%= l(:label_workname_lengthlimit) %>)</span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_running_platform) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px">
|
||||
<%= f.text_field :android_min_version_available,
|
||||
:required => true,
|
||||
:size => 60,
|
||||
:style => "width:320px;",
|
||||
:onblur=>"regexWorkdescription();"
|
||||
%>
|
||||
</td>
|
||||
<span style="font-size: 10px" id="spane_workdescription_notice">(<%= l(:label_workdescription_lengthlimit) %>)</span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_type) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px">
|
||||
<span>
|
||||
<%#= select_tag 'app_type_name', work_type_opttion, {:name => 'app_type_name',:style => "width:358px;"} %>
|
||||
</span>
|
||||
<%= f.select :app_type_name,work_type_opttion,
|
||||
{},
|
||||
{:style => "width:328px;",:onchange => "selectChange(this)"} %>
|
||||
<%#= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %>
|
||||
</td>
|
||||
<span style="font-size: 10px;display: none" id="other_span">
|
||||
<%#= f.text_field :other_input, :required => true, :size => 60, :style => "width:100px;" %>
|
||||
<input type="text" style="width: 120px;" id="other_input" name = "other_input"/>
|
||||
</span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<td style="padding-bottom: 290px;">
|
||||
<tr style="width:800px; padding-bottom: 30px;">
|
||||
|
||||
<span><%= l(:label_work_description) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
</td>
|
||||
<td style="width: 100px">
|
||||
<%= f.text_field :description,
|
||||
|
||||
<!-- modified by longjun 将单行输入框改成多行-->
|
||||
<%= f.text_area :description,
|
||||
:required => true,
|
||||
:size => 60,
|
||||
:style => "width:320px;"
|
||||
:rows => 3,
|
||||
:onblur => 'regexDescription();',
|
||||
:style => "width:320px; "
|
||||
%>
|
||||
</td>
|
||||
<span style="font-size: 10px;" id="span_sofapplication_description">(<%= l(:label_work_description_lengthlimit) %>)</span>
|
||||
<!--span style="font-size: 10px">(<%#= l(:label_workdescription_lengthlimit) %>)</span-->
|
||||
</tr>
|
||||
<br/>
|
||||
|
@ -163,14 +155,14 @@
|
|||
<tr style="width:800px;">
|
||||
<span><%= l(:label_softapplication_developers) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px">
|
||||
|
||||
<%= f.text_field :application_developers,
|
||||
:required => true,
|
||||
:size => 60,
|
||||
:style => "width:320px;",
|
||||
:onblur => 'regexDevelopers();'
|
||||
%>
|
||||
</td>
|
||||
|
||||
<span style="font-size: 10px" id="span_softapplication_application_developers">
|
||||
(<%= l(:label_workdescription_lengthlimit) %>)
|
||||
</span>
|
||||
|
@ -221,8 +213,8 @@
|
|||
</fieldset>
|
||||
</fieldset></br>
|
||||
<div class="align-center" style="padding-top: -3px; padding-bottom: 8px">
|
||||
<!--<input type="button" class="enterprise" value="<%=l(:button_create) %>" onclick="submit_new_softapplication();" >-->
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<input type="button" class="enterprise" value="<%=l(:button_create) %>" onclick="submit_new_softapplication();" >
|
||||
<%#= submit_tag l(:button_create) %>
|
||||
<%= submit_tag l(:button_cancel),
|
||||
:name => nil,
|
||||
:onclick => "cancel();",
|
||||
|
|
|
@ -2000,8 +2000,15 @@ zh:
|
|||
label_work_deposit_project_url: 托管项目网址
|
||||
label_work_deposit_project: 托管项目
|
||||
label_softapplication_name_condition: 25个汉字以内(50个字符)
|
||||
label_softapplication_description_condition: 125个汉字以内
|
||||
label_softapplication_description_condition: 125个汉字以内,开发人员用,隔开
|
||||
label_work_description_lengthlimit: 500个汉字以内
|
||||
label_softapplication_developers_condition: 开发人员超过125个汉字
|
||||
label_no_softapplication_name: 作品名称不能为空
|
||||
label_work_name_condition: 作品名称超过25个汉字
|
||||
label_no_softapplication_description: 作品简介不能为空
|
||||
label_work_description_condition: 作品简介名称超过500个汉字
|
||||
label_no_softapplication_platform: 运行平台不能为空
|
||||
label_work_platform_condition: 运行平台超过125个汉字
|
||||
label_no_softapplication_developers: 开发人员不能为空
|
||||
label_user_login_softapplication_board: 您还没有登录,请登录后参与应用评价。
|
||||
label_contest_description_no: 暂无描述。
|
||||
|
@ -2043,7 +2050,7 @@ zh:
|
|||
label_attending_contest: 参加竞赛
|
||||
label_new_attendingcontest_work: 新建参赛作品
|
||||
label_workname_lengthlimit: 25个汉字以内
|
||||
label_workdescription_lengthlimit: 125个汉字以内
|
||||
label_workdescription_lengthlimit: 125个汉字以内,用英文逗号隔开
|
||||
label_please_input_password: 请输入竞赛密码
|
||||
label_please_select_project: 请选择项目
|
||||
label_upload_softworkpacket_photo: 上传作品软件包和作品截图
|
||||
|
|
Loading…
Reference in New Issue