|
|
@ -152,57 +152,25 @@
|
|
|
|
name="position"
|
|
|
|
name="position"
|
|
|
|
value="<%= @training.position %>"/>
|
|
|
|
value="<%= @training.position %>"/>
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="clearfix infoBar">
|
|
|
|
|
|
|
|
<span class="left_tag fl">手机号码</span>
|
|
|
|
|
|
|
|
<input type="text" class="right_input" placeholder="请输入手机号" id="userphone"
|
|
|
|
|
|
|
|
name="phone"
|
|
|
|
|
|
|
|
value="<%= @training.phone %>"/>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<% if @training_type == 3 %>
|
|
|
|
<% if @training_type == 3 %>
|
|
|
|
<p class="subtitle">您的授课/研究领域(最少选1项)</p>
|
|
|
|
<p class="subtitle">您关注的课程类型(最少选1项)</p>
|
|
|
|
<li class="clearfix infoBar">
|
|
|
|
|
|
|
|
<span class="left_tag fl">机器学习/深度学习</span>
|
|
|
|
<% %w(程序设计 操作系统 数据库 软件工程 云计算 大数据 人工智能 计算机网络 物联网 信息安全 其他).each_with_index do |name, index| %>
|
|
|
|
<span class="fr">
|
|
|
|
<li class="clearfix infoBar">
|
|
|
|
<input type="checkbox" name="research_field[]" value="机器学习/深度学习" <%= @training.research_field_include?("机器学习/深度学习") ? "checked" : "" %> id="check_1" class="magic-checkbox">
|
|
|
|
<span class="left_tag fl"><%= name %></span>
|
|
|
|
<label for="check_1" style="top:8px"> </label>
|
|
|
|
<span class="fr">
|
|
|
|
</span>
|
|
|
|
<input type="checkbox" name="research_field[]" value="<%= name %>" <%= @training.research_field_include?(name) ? "checked" : "" %> id="check_<%= index %>" class="magic-checkbox">
|
|
|
|
</li>
|
|
|
|
<label for="check_<%= index %>" style="top:8px"> </label>
|
|
|
|
<li class="clearfix infoBar">
|
|
|
|
</span>
|
|
|
|
<span class="left_tag fl">计算机结构与组成</span>
|
|
|
|
</li>
|
|
|
|
<span class="fr">
|
|
|
|
<% end %>
|
|
|
|
<input type="checkbox" name="research_field[]" value="计算机结构与组成" <%= @training.research_field_include?("计算机结构与组成") ? "checked" : "" %> id="check_2" class="magic-checkbox">
|
|
|
|
|
|
|
|
<label for="check_2" style="top:8px"> </label>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="clearfix infoBar">
|
|
|
|
|
|
|
|
<span class="left_tag fl">计算机系统</span>
|
|
|
|
|
|
|
|
<span class="fr">
|
|
|
|
|
|
|
|
<input type="checkbox" name="research_field[]" value="计算机系统" <%= @training.research_field_include?("计算机系统") ? "checked" : "" %> id="check_3" class="magic-checkbox">
|
|
|
|
|
|
|
|
<label for="check_3" style="top:8px"> </label>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="clearfix infoBar">
|
|
|
|
|
|
|
|
<span class="left_tag fl">计算机软件技术和应用</span>
|
|
|
|
|
|
|
|
<span class="fr">
|
|
|
|
|
|
|
|
<input type="checkbox" name="research_field[]" value="计算机软件技术和应用" <%= @training.research_field_include?("计算机软件技术和应用") ? "checked" : "" %> id="check_4" class="magic-checkbox">
|
|
|
|
|
|
|
|
<label for="check_4" style="top:8px"> </label>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="clearfix infoBar">
|
|
|
|
|
|
|
|
<span class="left_tag fl">计算机理论</span>
|
|
|
|
|
|
|
|
<span class="fr">
|
|
|
|
|
|
|
|
<input type="checkbox" name="research_field[]" value="计算机理论" <%= @training.research_field_include?("计算机理论") ? "checked" : "" %> id="check_5" class="magic-checkbox">
|
|
|
|
|
|
|
|
<label for="check_5" style="top:8px"> </label>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="clearfix infoBar">
|
|
|
|
|
|
|
|
<span class="left_tag fl">计算机应用与学科交叉</span>
|
|
|
|
|
|
|
|
<span class="fr">
|
|
|
|
|
|
|
|
<input type="checkbox" name="research_field[]" value="计算机应用与学科交叉" <%= @training.research_field_include?("计算机应用与学科交叉") ? "checked" : "" %> id="check_6" class="magic-checkbox">
|
|
|
|
|
|
|
|
<label for="check_6" style="top:8px"> </label>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="clearfix infoBar">
|
|
|
|
|
|
|
|
<span class="left_tag fl">其他</span>
|
|
|
|
|
|
|
|
<span class="fr">
|
|
|
|
|
|
|
|
<input type="checkbox" name="research_field[]" value="其他" <%= @training.research_field_include?("其他") ? "checked" : "" %> id="check_7" class="magic-checkbox">
|
|
|
|
|
|
|
|
<label for="check_7" style="top:8px"> </label>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <p class="subtitle">通讯地址</p>-->
|
|
|
|
<!-- <p class="subtitle">通讯地址</p>-->
|
|
|
@ -214,12 +182,6 @@
|
|
|
|
<!-- </div>-->
|
|
|
|
<!-- </div>-->
|
|
|
|
<!-- <textarea class="DetailAddress" placeholder="请输入详细地址" name="address" id="DetailAdd" style="margin-top: 15px;"><%#= @training.address %></textarea>-->
|
|
|
|
<!-- <textarea class="DetailAddress" placeholder="请输入详细地址" name="address" id="DetailAdd" style="margin-top: 15px;"><%#= @training.address %></textarea>-->
|
|
|
|
<!-- </li>-->
|
|
|
|
<!-- </li>-->
|
|
|
|
<li class="clearfix infoBar">
|
|
|
|
|
|
|
|
<span class="left_tag fl">手机号码</span>
|
|
|
|
|
|
|
|
<input type="text" class="right_input" placeholder="请输入手机号" id="userphone"
|
|
|
|
|
|
|
|
name="phone"
|
|
|
|
|
|
|
|
value="<%= @training.phone %>"/>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<!-- <li class="clearfix infoBar">-->
|
|
|
|
<!-- <li class="clearfix infoBar">-->
|
|
|
|
<!-- <span class="left_tag fl">Email</span>-->
|
|
|
|
<!-- <span class="left_tag fl">Email</span>-->
|
|
|
|
<!-- <input type="text" class="right_input" placeholder="请输入Email" id="userEmail" name="email" value="<%#= @training.email %>"/>-->
|
|
|
|
<!-- <input type="text" class="right_input" placeholder="请输入Email" id="userEmail" name="email" value="<%#= @training.email %>"/>-->
|
|
|
@ -258,40 +220,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
//下一步
|
|
|
|
//下一步
|
|
|
|
function NextStep() {
|
|
|
|
function NextStep() {
|
|
|
|
var username = $("#username").val();
|
|
|
|
var username = $("#username").val();
|
|
|
|
var userMajor = $("#userMajor").val();
|
|
|
|
var userUnit = $("#userUnit").val();
|
|
|
|
var userphone = $("#userphone").val();
|
|
|
|
var userPositional = $("#userPositional").val();
|
|
|
|
var userID = $("#userID").val();
|
|
|
|
var userphone = $("#userphone").val();
|
|
|
|
|
|
|
|
|
|
|
|
if (username == '') {
|
|
|
|
if (username == '') {
|
|
|
|
alert("请输入真实姓名");
|
|
|
|
alert("请输入姓名");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (userMajor == '') {
|
|
|
|
if (userUnit == '') {
|
|
|
|
alert("请输入专业");
|
|
|
|
alert("请输入单位名称或者学校");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (userID == '') {
|
|
|
|
if (userPositional == '') {
|
|
|
|
alert("请输入学号");
|
|
|
|
alert("请输入职称");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (userphone == '') {
|
|
|
|
|
|
|
|
alert("请输入手机号码");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
} else if (!/^1\d{10}$/.test(userphone) && !/^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/.test(userphone)) {
|
|
|
|
|
|
|
|
alert("请输入正确的手机号码");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
<% if @training_type == 3 %>
|
|
|
|
<% if @training_type == 3 %>
|
|
|
|
if ($("input[type='checkbox'][name='research_field[]']:checked").length == 0) {
|
|
|
|
if ($("input[type='checkbox'][name='research_field[]']:checked").length == 0) {
|
|
|
|
alert('请选择授课类型/研究领域');
|
|
|
|
alert('请选择您关注的课程类型');
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
if (userphone == '') {
|
|
|
|
|
|
|
|
alert("请输入手机号码");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
} else if (!/^1\d{10}$/.test(userphone) && !/^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/.test(userphone)) {
|
|
|
|
|
|
|
|
alert("请输入正确的手机号码");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('form').submit();
|
|
|
|
$('form').submit();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|