modify training

dev_trainings
p31729568 6 years ago
parent c15546369c
commit 48cf73dbbf

@ -112,6 +112,7 @@ class TrainingsController < ApplicationController
@training.openid = session[:wechat_open_id]
@training.save!
flash[:message] = '提交成功'
redirect_to enroll_training_path(id: @tag_id)
# redirect_to pay_training_path(id: @tag_id)
end
@ -130,6 +131,7 @@ class TrainingsController < ApplicationController
end
@training.save!
flash[:message] = '提交成功'
redirect_to enroll_training_path(id: @tag_id)
# redirect_to pay_training_path(id: @tag_id)
end
@ -252,7 +254,7 @@ class TrainingsController < ApplicationController
def authenticate
if Rails.env.development?
# session[:wechat_open_id] = "o5fSc0607iR3rp4-h_VnuBTp8CiM"
session[:wechat_open_id] = "o5fSc0607iR3rp4-h_VnuBTp8CiM"
end
unless session[:wechat_open_id].present?

@ -205,27 +205,27 @@
</li>
<% end %>
<p class="subtitle">通讯地址</p>
<li class="clearfix infoBar">
<!-- <p class="subtitle">通讯地址</p>-->
<!-- <li class="clearfix infoBar">-->
<!-- <div class="clearfix" id="userArea" NavShow>-->
<!-- <span class="left_tag fl">地区</span>-->
<!-- <input type="text" class="right_input" id="usertitle" placeholder="填写区域"/>-->
<!-- <i class="iconfont icon-youjiantou rightArrow"></i>-->
<!-- </div>-->
<textarea class="DetailAddress" placeholder="请输入详细地址" name="address" id="DetailAdd" style="margin-top: 15px;"><%= @training.address %></textarea>
</li>
<!-- <textarea class="DetailAddress" placeholder="请输入详细地址" name="address" id="DetailAdd" style="margin-top: 15px;"><%#= @training.address %></textarea>-->
<!-- </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">
<span class="left_tag fl">Email</span>
<input type="text" class="right_input" placeholder="请输入Email" id="userEmail" name="email" value="<%= @training.email %>"/>
</li>
<!-- <li class="clearfix infoBar">-->
<!-- <span class="left_tag fl">Email</span>-->
<!-- <input type="text" class="right_input" placeholder="请输入Email" id="userEmail" name="email" value="<%#= @training.email %>"/>-->
<!-- </li>-->
<p style="height: 50px;"></p>
<a href="javascript:void(0)" class="EnrollNext" onclick="NextStep();">完成</a>
<a href="javascript:void(0)" class="EnrollNext" onclick="NextStep();">提交</a>
<% end %>
</div>
@ -248,7 +248,12 @@
} else {
$('#sex').val("2");
}
})
});
var message = "<%= flash[:message] %>";
if (message && message.length > 0) {
alert(message);
}
})
//下一步

Loading…
Cancel
Save