Merge branch 'fix-upload-group-avatar' into 'master'
Button by itself will submit forms. Button type button willn't Closes #26999 See merge request !8694
This commit is contained in:
commit
0363734ce4
2 changed files with 3 additions and 3 deletions
|
@ -2,12 +2,12 @@
|
|||
(function() {
|
||||
this.GroupAvatar = (function() {
|
||||
function GroupAvatar() {
|
||||
$('.js-choose-group-avatar-button').bind("click", function() {
|
||||
$('.js-choose-group-avatar-button').on("click", function() {
|
||||
var form;
|
||||
form = $(this).closest("form");
|
||||
return form.find(".js-group-avatar-input").click();
|
||||
});
|
||||
$('.js-group-avatar-input').bind("change", function() {
|
||||
$('.js-group-avatar-input').on("change", function() {
|
||||
var filename, form;
|
||||
form = $(this).closest("form");
|
||||
filename = $(this).val().replace(/^.*[\\\/]/, '');
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
%button.choose-btn.btn.btn-sm.js-choose-group-avatar-button
|
||||
%button.choose-btn.btn.btn-sm.js-choose-group-avatar-button{ type: 'button' }
|
||||
%i.fa.fa-paperclip
|
||||
%span Choose File ...
|
||||
|
||||
|
|
Loading…
Reference in a new issue