--- /dev/null
+/*
+ * Sone - EditProfilePage.java - Copyright © 2010 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.sone.web;
+
+import net.pterodactylus.util.template.Template;
+
+/**
+ * This page lets the user edit her profile.
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public class EditProfilePage extends SoneTemplatePage {
+
+ /**
+ * Creates a new “edit profile” page.
+ *
+ * @param template
+ * The template to render
+ * @param webInterface
+ * The Sone web interface
+ */
+ public EditProfilePage(Template template, WebInterface webInterface) {
+ super("editProfile.html", template, "Page.EditProfile.Title", webInterface);
+ }
+
+ //
+ // TEMPLATEPAGE METHODS
+ //
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void processTemplate(Request request, Template template) throws RedirectException {
+ super.processTemplate(request, template);
+ }
+
+ //
+ // SONETEMPLATEPAGE METHODS
+ //
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean requiresLogin() {
+ return true;
+ }
+
+}
Template createSoneTemplate = templateFactory.createTemplate(createReader("/templates/createSone.html"));
createSoneTemplate.set("formPassword", formPassword);
+ Template editProfileTemplate = templateFactory.createTemplate(createReader("/templates/editProfile.html"));
+ editProfileTemplate.set("formPassword", formPassword);
+
Template deleteSoneTemplate = templateFactory.createTemplate(createReader("/templates/deleteSone.html"));
deleteSoneTemplate.set("formPassword", formPassword);
PageToadletFactory pageToadletFactory = new PageToadletFactory(sonePlugin.pluginRespirator().getHLSimpleClient(), "/Sone/");
pageToadlets.add(pageToadletFactory.createPageToadlet(new IndexPage(indexTemplate, this), "Index"));
pageToadlets.add(pageToadletFactory.createPageToadlet(new CreateSonePage(createSoneTemplate, this), "CreateSone"));
+ pageToadlets.add(pageToadletFactory.createPageToadlet(new EditProfilePage(editProfileTemplate, this), "EditProfile"));
pageToadlets.add(pageToadletFactory.createPageToadlet(new DeleteSonePage(deleteSoneTemplate, this), "DeleteSone"));
pageToadlets.add(pageToadletFactory.createPageToadlet(new LoginPage(loginTemplate, this), "Login"));
pageToadlets.add(pageToadletFactory.createPageToadlet(new LogoutPage(logoutTemplate, this), "Logout"));
Navigation.Menu.Item.Index.Tooltip=Show your Sone
Navigation.Menu.Item.CreateSone.Name=Create Sone
Navigation.Menu.Item.CreateSone.Tooltip=Create a new Sone
+Navigation.Menu.Item.EditProfile.Name=Edit Profile
+Navigation.Menu.Item.EditProfile.Tooltip=Edit the Profile of your Sone
Navigation.Menu.Item.DeleteSone.Name=Delete Sone
Navigation.Menu.Item.DeleteSone.Tooltip=Deletes the current Sone
Navigation.Menu.Item.Logout.Name=Logout
Page.Index.Title=Your Sone - Sone
+Page.EditProfile.Title=Edit Profile - Sone
+Page.EditProfile.Page.Title=Edit Profile
+Page.EditProfile.Page.Description=On this page you can enter your profile data.
+Page.EditProfile.Page.Hint.Optionality=And remember, every single field of this profile is optional! You are not required to enter a single thing here! Also, everything you enter here will probably be stored in Freenet for a very long time!
+
Page.Logout.Title=Logout - Sone
--- /dev/null
+<div id="sone">
+
+ <h1><%= Page.EditProfile.Page.Title|l10n|html></h1>
+
+ <div><%= Page.EditProfile.Page.Description|l10n|html></div>
+ <div><%= Page.EditProfile.Page.Hint.Optionality|l10n|html></div>
+
+</div>