2016-05-04 16:17:37 +08:00
|
|
|
<div>
|
|
|
|
<div class="ni_con">
|
2016-05-06 18:47:38 +08:00
|
|
|
<%= form_tag(apply_for_homework_user_path(:id=>User.current.id,:homework_id=>homework.id), :multipart => true,:remote => true,:name=>"apply_for_homework_form",:id=>'apply_for_homework_form') do %>
|
2016-05-12 15:29:20 +08:00
|
|
|
<h2>申请分享</h2>
|
|
|
|
<p style="color: #000;">
|
|
|
|
申请说明(必选):
|
|
|
|
<textarea type="text" name="content" id="apply_content" placeholder="请附言,以增加分享的成功机率。" class="apply_content mt10" style="outline:none;"></textarea>
|
2016-05-06 18:47:38 +08:00
|
|
|
</p>
|
2016-05-12 15:29:20 +08:00
|
|
|
<span class="c_red ml5 f12" style="display: none" id="apply_content_notice">为增加分享的成功机率,请务必填写申请说明。</span>
|
2016-05-06 18:47:38 +08:00
|
|
|
<div class="ni_btn">
|
2016-05-12 15:29:20 +08:00
|
|
|
<a href="javascript:" class="tijiao" onclick="submit_apply_homework();" style="margin-bottom: 20px; margin-left: 60px; color: #fff">
|
2016-05-06 18:47:38 +08:00
|
|
|
确 定
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2016-05-04 16:17:37 +08:00
|
|
|
</div>
|
2016-05-12 15:29:20 +08:00
|
|
|
</div>
|
|
|
|
<script type="application/javascript">
|
|
|
|
var first_click_apply = true;
|
|
|
|
function submit_apply_homework(){
|
|
|
|
if($.trim($("#apply_content").val()) == ""){
|
|
|
|
$("#apply_content_notice").show();
|
|
|
|
} else if(first_click_apply) {
|
|
|
|
first_click_apply = false;
|
|
|
|
$('#apply_for_homework_form').submit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|