Move onclick handling of tou checkbox to ujs
This commit is contained in:
parent
077834704e
commit
d3d03a3177
2 changed files with 6 additions and 1 deletions
|
@ -124,4 +124,9 @@ $(document).ready(function () {
|
||||||
$("#contributorTerms").html("<img src='" + OSM.SEARCHING + "' />");
|
$("#contributorTerms").html("<img src='" + OSM.SEARCHING + "' />");
|
||||||
$("#contributorTerms").load(url);
|
$("#contributorTerms").load(url);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#read_tou").on("click", function () {
|
||||||
|
var agreebtn = document.getElementById('agree');
|
||||||
|
agreebtn.disabled=!this.checked;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
<p class="deemphasize"><%= t '.tou_explain' %></p>
|
<p class="deemphasize"><%= t '.tou_explain' %></p>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="read_tou">
|
<label for="read_tou">
|
||||||
<%= check_box_tag 'read_tou',1,false,:onclick=>"agreebtn = document.getElementById('agree');agreebtn.disabled=!this.checked;"%>
|
<%= check_box_tag 'read_tou',1,false %>
|
||||||
<%= t '.read_tou_html', :tou_link => link_to(t('layouts.tou'), "https://wiki.osmfoundation.org/wiki/Terms_of_Use", :target => :new) %>
|
<%= t '.read_tou_html', :tou_link => link_to(t('layouts.tou'), "https://wiki.osmfoundation.org/wiki/Terms_of_Use", :target => :new) %>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue