mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-31 14:42:10 +00:00
@@ -36,16 +36,18 @@ define([
|
||||
|
||||
$('[name="email"]', $form).select2($.extend(
|
||||
Common.contactInputOptionsForSelect2(), {
|
||||
width: '280px'
|
||||
width: '275px',
|
||||
containerCss: {'margin-bottom': '5px'},
|
||||
placeholder: gettext("Search users or enter emails and press Enter")
|
||||
}));
|
||||
|
||||
$form.on('submit', function() {
|
||||
var group_id = _this.groupMemberCollection.group_id;
|
||||
var emails = $('[name="email"]', $form).val();
|
||||
var emails = $.trim($('[name="email"]', $form).val());
|
||||
var $error = $('.error', $form);
|
||||
var $submitBtn = $('[type="submit"]', $form);
|
||||
|
||||
if (!emails.length) {
|
||||
if (!emails) {
|
||||
$error.html(gettext("It is required.")).show();
|
||||
return false;
|
||||
}
|
||||
@@ -62,7 +64,7 @@ define([
|
||||
dataType: 'json',
|
||||
beforeSend: Common.prepareCSRFToken,
|
||||
traditional: true,
|
||||
data: {'email': emails},
|
||||
data: {'email': emails.split(',')},
|
||||
success: function(data) {
|
||||
if (data.success.length > 0) {
|
||||
_this.groupMemberCollection.add(data.success, {prepend: true});
|
||||
|
Reference in New Issue
Block a user