forked from spen/seminar
Merge branch 'master' into 'master'
Fix bug. See merge request spen/seminar!33
This commit is contained in:
commit
df01e1294b
|
@ -109,7 +109,7 @@
|
|||
$("form.form-horizontal").submit(function(){
|
||||
var flag = true;
|
||||
$("div[required=\"required\"]").each(function(i,v){
|
||||
if($(v).find("input:checked").length == 0){
|
||||
if($(v).find("input").length != 0 && $(v).find("input:checked").length == 0){
|
||||
$(v).find("input").attr("required","required");
|
||||
flag = false;
|
||||
}else{
|
||||
|
@ -121,11 +121,11 @@
|
|||
$("form.form-horizontal [type=\"submit\"]").click(function(){
|
||||
var flag = true;
|
||||
$("div[required=\"required\"]").each(function(i,v){
|
||||
if($(v).find("input:checked").length == 0){
|
||||
if($(v).find("input").length != 0 && $(v).find("input:checked").length == 0){
|
||||
$(v).find("input").attr("required","required");
|
||||
flag = false;
|
||||
}else{
|
||||
$(v).find("input").removeAttr("required")
|
||||
$(v).find("input").removeAttr("required");
|
||||
}
|
||||
})
|
||||
return flag;
|
||||
|
|
|
@ -28,6 +28,12 @@
|
|||
window.alert("<%=notice%>");
|
||||
</script>
|
||||
<% end %>
|
||||
<style type="text/css">
|
||||
.checkbox input[type=checkbox], .checkbox-inline input[type=checkbox], .radio input[type=radio], .radio-inline input[type=radio] {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
<%= form_for @seminar_signup, url: seminars_path, html: {class: "content form-horizontal" , :id=>"new-seminar-signup"} do |f| %>
|
||||
<fieldset>
|
||||
|
||||
|
|
Loading…
Reference in New Issue