reinstate profile.hamlet

This commit is contained in:
Gregor Kleen 2019-04-11 12:52:27 +02:00
parent ed9c1ce461
commit 3b14a4f03d
2 changed files with 5 additions and 31 deletions

View File

@ -116,10 +116,11 @@ postProfileR = do
siteLayout [whamlet|_{MsgProfileFor} ^{nameWidget userDisplayName userSurname}|] $ do
setTitle . toHtml $ "Profil " <> userIdent
wrapForm formWidget def
{ formAction = Just $ SomeRoute ProfileR
, formEncoding = formEnctype
}
let settingsForm = wrapForm formWidget def
{ formAction = Just $ SomeRoute ProfileR
, formEncoding = formEnctype
}
$(widgetFile "profile")
getProfileDataR :: Handler Html

View File

@ -44,30 +44,3 @@ if (I18n) {
document.addEventListener('DOMContentLoaded', function() {
setupDatepicker(document.body);
});
/**
* The following code should be moved to profile.julius as soon as the widget file is actually used.
*/
(function() {
'use strict';
var DEFAULT_THEME = 'theme--default';
document.addEventListener('DOMContentLoaded', function() {
var themeSwitcher = document.querySelector('#theme-select');
var currentTheme = DEFAULT_THEME;
if (themeSwitcher) {
currentTheme = 'theme--' + themeSwitcher.value;
themeSwitcher.addEventListener('input', function() {
var desiredTheme = 'theme--' + themeSwitcher.value;
document.body.classList.remove(currentTheme);
document.body.classList.add(desiredTheme);
currentTheme = desiredTheme;
});
}
});
})();