• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Never give up


Commit MetaInfo

Revision744bd53086c951941c450049c0fd40aa7c3b7824 (tree)
Zeit2016-10-04 01:21:00
AutorHMML <hmml3939@gmai...>
CommiterHMML

Log Message

Fix client side validations.

Ändern Zusammenfassung

Diff

--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -15,8 +15,8 @@
1515 //= require turbolinks
1616 //= require bootstrap-sprockets
1717
18-//= rails.validations
19-//= rails.validations.simple_form
18+//= require rails.validations
19+//= require rails.validations.simple_form
2020 //= require dl_log_entries
2121 //= require jquery.raty
2222 //= require navi_voices
--- a/app/views/navi_voices/_form.html.haml
+++ b/app/views/navi_voices/_form.html.haml
@@ -14,11 +14,12 @@
1414 = f.input :raw_delete_key, as: :password
1515 %h2= t '.4_tos_agree'
1616 .checkbox
17- = f.input :tos_agree, as: :boolean
17+ = f.input :tos_agree, as: :boolean, validate: @navi_voice.new_record?
1818 = next_arrow
1919 = f.button :submit, class: 'btn btn-primary btn-lg btn-block', id: 'btn-nv-submit'
2020
2121 :coffee
22- $('#new_navi_voice').on 'submit', ->
22+ window.ClientSideValidations.callbacks.form.pass = (form, event) ->
23+ return true unless form[0].id == 'new_navi_voice'
2324 $('#btn-nv-submit').val('#{t "uploading_wait"}').attr('disabled', 'disabled')
2425 return true