ability to set moderation note on users
parent
d60ab3c74c
commit
15cae8d6ea
@ -1,13 +1,26 @@
|
||||
'use strict';
|
||||
|
||||
/* globals define */
|
||||
/* globals define, socket, ajaxify, app */
|
||||
|
||||
define('forum/account/info', ['forum/account/header'], function(header) {
|
||||
var Info = {};
|
||||
|
||||
Info.init = function() {
|
||||
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;
|
||||
});
|
||||
|
Loading…
Reference in New Issue