ability to set moderation note on users
parent
d60ab3c74c
commit
15cae8d6ea
@ -1,13 +1,26 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/* globals define */
|
/* globals define, socket, ajaxify, app */
|
||||||
|
|
||||||
define('forum/account/info', ['forum/account/header'], function(header) {
|
define('forum/account/info', ['forum/account/header'], function(header) {
|
||||||
var Info = {};
|
var Info = {};
|
||||||
|
|
||||||
Info.init = function() {
|
Info.init = function() {
|
||||||
header.init();
|
header.init();
|
||||||
|
handleModerationNote();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function handleModerationNote() {
|
||||||
|
$('[component="account/save-moderation-note"]').on('click', function() {
|
||||||
|
var note = $('[component="account/moderation-note"]').val();
|
||||||
|
socket.emit('user.setModerationNote', {uid: ajaxify.data.uid, note: note}, function(err) {
|
||||||
|
if (err) {
|
||||||
|
return app.alertError(err.message);
|
||||||
|
}
|
||||||
|
app.alertSuccess('[[user:info.moderation-note.success]]');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return Info;
|
return Info;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue