0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 01:10:28 +01:00

Add email_messages_level and email_digests as updatable user fields

Dieser Commit ist enthalten in:
Richard 2020-07-02 09:33:58 +00:00
Ursprung 1f7f17ee30
Commit 224903b025
2 geänderte Dateien mit 18 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -47,7 +47,9 @@ const userProperties = [
'website',
'bio_raw',
'trust_level',
'email_level'
'email_level',
'email_messages_level',
'email_digests'
];
const notificationLevels = [
@ -117,4 +119,4 @@ export {
listProperties,
notificationLevels,
wizardFieldList
};
};

Datei anzeigen

@ -1,7 +1,19 @@
class CustomWizard::Mapper
attr_accessor :inputs, :data, :user
USER_FIELDS = ['name', 'username', 'email', 'date_of_birth', 'title', 'locale', 'trust_level', 'email_level']
USER_FIELDS = [
'name',
'username',
'email',
'date_of_birth',
'title',
'locale',
'trust_level',
'email_level',
'email_messages_level',
'email_digests'
]
PROFILE_FIELDS = ['location', 'website', 'bio_raw']
def self.user_fields
@ -237,4 +249,4 @@ class CustomWizard::Mapper
result = data[k]
keys.empty? ? result : self.recurse(result, keys)
end
end
end