Simplified javascript in users/edit_embed_base.pug
There is no need to use JQuery, a unique ID for the a-element, and an invalid href value, just to bind on-click functionality to a link.
This commit is contained in:
parent
517b283893
commit
c8221ea0e4
@ -72,7 +72,7 @@
|
|||||||
| none
|
| none
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
a#button-cancel.btn.btn-default(href="#", data-user-id='{{user.user_id}}') Cancel
|
a.btn.btn-default(href="javascript:$('#user-edit-container').html('')") Cancel
|
||||||
|
|
||||||
input#submit_edit_user.btn.btn-default(
|
input#submit_edit_user.btn.btn-default(
|
||||||
data-user-id="{{user.user_id}}",
|
data-user-id="{{user.user_id}}",
|
||||||
@ -101,10 +101,6 @@ script(type="text/javascript").
|
|||||||
//- $("#user-edit-form").submit();
|
//- $("#user-edit-form").submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#button-cancel').click(function(e){
|
|
||||||
$('#user-container').html('')
|
|
||||||
});
|
|
||||||
|
|
||||||
new Clipboard('.copy-to-clipboard');
|
new Clipboard('.copy-to-clipboard');
|
||||||
|
|
||||||
| {% endblock %}
|
| {% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user