mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: if no group label is selected, select no group title option
dont save groupTitle: "['null']" if nothing is selected
This commit is contained in:
@@ -25,6 +25,10 @@ define('forum/account/edit', [
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (ajaxify.data.groupTitleArray.length === 1 && ajaxify.data.groupTitleArray[0] === '') {
|
||||||
|
$('#groupTitle option[value=""]').attr('selected', true);
|
||||||
|
}
|
||||||
|
|
||||||
handleImageChange();
|
handleImageChange();
|
||||||
handleAccountDelete();
|
handleAccountDelete();
|
||||||
handleEmailConfirm();
|
handleEmailConfirm();
|
||||||
@@ -36,6 +40,7 @@ define('forum/account/edit', [
|
|||||||
function updateProfile() {
|
function updateProfile() {
|
||||||
const userData = $('form[component="profile/edit/form"]').serializeObject();
|
const userData = $('form[component="profile/edit/form"]').serializeObject();
|
||||||
userData.uid = ajaxify.data.uid;
|
userData.uid = ajaxify.data.uid;
|
||||||
|
userData.groupTitle = userData.groupTitle || '';
|
||||||
userData.groupTitle = JSON.stringify(
|
userData.groupTitle = JSON.stringify(
|
||||||
Array.isArray(userData.groupTitle) ? userData.groupTitle : [userData.groupTitle]
|
Array.isArray(userData.groupTitle) ? userData.groupTitle : [userData.groupTitle]
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user