Remove inline javascript from user settings page

This commit is contained in:
Tom Hughes 2017-11-24 16:20:50 +00:00
parent afa5d420d3
commit a3519348c6
2 changed files with 6 additions and 2 deletions

View file

@ -85,6 +85,10 @@ $(document).ready(function () {
$("select#user_auth_provider").on("change", updateAuthUID); $("select#user_auth_provider").on("change", updateAuthUID);
$("input#user_image").on("change", function () {
$("#image_action_new").prop("checked", true);
});
function enableAuth() { function enableAuth() {
$("#auth_prompt").hide(); $("#auth_prompt").hide();
$("#auth_field").show(); $("#auth_field").show();

View file

@ -123,7 +123,7 @@
<%= t 'user.account.replace image' %> <%= t 'user.account.replace image' %>
<span class="form-help deemphasize"><%= t 'user.account.image size hint' %></span> <span class="form-help deemphasize"><%= t 'user.account.image size hint' %></span>
</label> </label>
<%= f.file_field :image, :onchange => "$('#image_action_new').prop('checked', true)" %> <%= f.file_field :image %>
</li> </li>
<% else %> <% else %>
<li> <li>
@ -132,7 +132,7 @@
<%= t 'user.account.new image' %> <%= t 'user.account.new image' %>
<span class="form-help deemphasize"><%= t 'user.account.image size hint' %></span> <span class="form-help deemphasize"><%= t 'user.account.image size hint' %></span>
</label> </label>
<%= f.file_field :image, :onchange => "$('#image_action_new').prop('checked', true)" %> <%= f.file_field :image %>
</li> </li>
<% end %> <% end %>
<li> <li>