私はいくつかのレールアプリを持っていますが、私のsubmit
ボタンは何もトリガーしません。(私はTwitterのブートストラップを使用しています)。これがtag
<input class="btn btn-info" type="submit" value="Sign up" name="commit">
クリックしても何も起こりません。おそらく「デフォルトを防ぐ」方法がいくつかありますbootstrap
が、これをデバッグするにはどうすればよいですか?
<form accept-charset="UTF-8" action="/users" class="panel-body" data-validate="true" id="new_user" method="post" novalidate="novalidate"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"><input name="authenticity_token" type="hidden" value="TOWfy1DjcfzzIoCe/BYdEfsKf5gyW902uiyAZxq2GVw="></div>
<div class="block">
<label class="control-label" for="user_user_name">User name</label>
<input class="form-control" id="user_user_name" name="user[user_name]" placeholder="username" type="text" data-validate="true">
</div>
</a> <input class="btn btn-info" type="submit" value="Sign up" name="commit">
<div class="line line-dashed"></div>
<div class="row">
<div class="col-sm-6 text-center">
<a href="#" class="btn btn-facebook btn-circle btn-sm"><i class="icon-facebook"></i>Sign up with Facebook</a>
</div>
<div class="col-sm-6 text-center">
<a class="btn btn-twitter btn-circle btn-sm" href="/users/auth/twitter">
<i class="icon-twitter"></i>Sign up with Twitter
</a> </div>
</div>
<div class="line line-dashed"></div>
</form>
私のレールコード(上記のコードは本質的に以下の製品であり、不要なものを削除しましたinputs
):
<%= form_for(resource, :as => resource_name, :validate => true, :html => {:class => "panel-body"}, :url => registration_path(resource_name)) do |f| %>
<%= devise_error_messages! %>
<div class="block">
<%= f.label :user_name, :class=>"control-label"%>
<%= f.text_field :user_name, :autofocus => true, :placeholder=>"username", :class=>"form-control" %>
</div>
<div class="block">
<%= f.label :email, :class=>"control-label"%>
<%= f.email_field :email, :autofocus => true, :placeholder=>"email", :class=>"form-control" %>
</div>
<div class="block">
<%= f.label :password, :class=>"control-label"%>
<%= f.password_field :password, :autofocus => true, :placeholder=>"password", :id=>"inputPassword", :class=>"form-control" %>
</div>
<div class="block">
<%= f.label :password_confirmation, :class=>"control-label"%>
<%= f.password_field :password_confirmation, :autofocus => true, :placeholder=>"confirm password", :id=>"inputPassword", :class=>"form-control" %>
</div>
<div class="checkbox">
<label>
<%= f.check_box :terms_of_service, {}, true, false %> Agree the <%= link_to "terms and policy" %>
</label>
</div>
<%= link_to dees_path, :class=>"pull-right m-t-mini" do%>
Forgot password? <%= content_tag(:small, "", :class => "") %>
<% end %>
<%= f.submit "Sign up", class:"btn btn-info" %>
<div class="line line-dashed"></div>
<div class="row">
<div class="col-sm-6 text-center">
<a href="#" class="btn btn-facebook btn-circle btn-sm"><i class="icon-facebook"></i>Sign up with Facebook</a>
</div>
<%= render "devise/shared/connect_social_links" %>
</div>
<div class="line line-dashed"></div>
<% end %>