Remove inline javascript from user settings page
This commit is contained in:
parent
afa5d420d3
commit
a3519348c6
2 changed files with 6 additions and 2 deletions
|
@ -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();
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue