|
|
|
@ -123,6 +123,7 @@
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if [3,4].include?(@training_type) %>
|
|
|
|
|
<div>
|
|
|
|
|
<p class="collegeInfo"><%= @training_type == 3 ? '信息技术新工科产学研联盟师资培训班' : '工程教育专业认证师资培训' %></p>
|
|
|
|
|
<%= form_for @training do |f| %>
|
|
|
|
@ -280,3 +281,66 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if @training_type == 5 %>
|
|
|
|
|
<div>
|
|
|
|
|
<p class="collegeInfo">EduCoder-创先源于实践</p>
|
|
|
|
|
<%= form_for @training do |f| %>
|
|
|
|
|
<%= hidden_field_tag(:friendly_id, @friendly_id) %>
|
|
|
|
|
|
|
|
|
|
<p class="subtitle">基本信息</p>
|
|
|
|
|
<li class="clearfix infoBar">
|
|
|
|
|
<span class="left_tag fl">姓名</span>
|
|
|
|
|
<input type="text" class="right_input" id="username" name="name"
|
|
|
|
|
placeholder="请输入真实姓名" value="<%= @training.name %>"/>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="clearfix infoBar">
|
|
|
|
|
<span class="left_tag fl">单位</span>
|
|
|
|
|
<input type="text" class="right_input" id="userUnit" placeholder="请输入单位名称或者学校"
|
|
|
|
|
name="school"
|
|
|
|
|
value="<%= @training.school %>"/>
|
|
|
|
|
</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>
|
|
|
|
|
|
|
|
|
|
<p style="height: 50px;"></p>
|
|
|
|
|
<a href="javascript:void(0)" class="EnrollNext" onclick="NextStep();"><%= @training.new_record? ? '提交' : '保存' %></a>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//下一步
|
|
|
|
|
function NextStep() {
|
|
|
|
|
var username = $("#username").val();
|
|
|
|
|
var userUnit = $("#userUnit").val();
|
|
|
|
|
var userphone = $("#userphone").val();
|
|
|
|
|
|
|
|
|
|
if (username == '') {
|
|
|
|
|
alert("请输入姓名");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (userUnit == '') {
|
|
|
|
|
alert("请输入单位名称或者学校");
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('form').submit();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<% end %>
|