package net.pterodactylus.sone.web;
+import net.pterodactylus.sone.data.Profile;
import net.pterodactylus.util.template.Template;
+import freenet.clients.http.ToadletContext;
/**
* This page lets the user edit her profile.
@Override
protected void processTemplate(Request request, Template template) throws RedirectException {
super.processTemplate(request, template);
+ ToadletContext toadletContenxt = request.getToadletContext();
+ Profile profile = getCurrentSone(toadletContenxt).getProfile();
+ String firstName = profile.getFirstName();
+ String middleName = profile.getMiddleName();
+ String lastName = profile.getLastName();
+ template.set("firstName", firstName);
+ template.set("middleName", middleName);
+ template.set("lastName", lastName);
}
//
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.EditProfile.Label.FirstName=First name:
+Page.EditProfile.Label.MiddleName=Middle name(s):
+Page.EditProfile.Label.LastName=Last name:
Page.Logout.Title=Logout - Sone
<div><%= Page.EditProfile.Page.Description|l10n|html></div>
<div><%= Page.EditProfile.Page.Hint.Optionality|l10n|html></div>
+ <form method="post">
+ <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+
+ <div>
+ <label for="first-name"><%= Page.EditProfile.Label.FirstName|l10n|html></label>
+ <input type="text" name="first-name" value="<% firstName|html>" />
+ </div>
+
+ <div>
+ <label for="middle-name"><%= Page.EditProfile.Label.MiddleName|l10n|html></label>
+ <input type="text" name="middle-name" value="<% middleName|html>" />
+ </div>
+
+ <div>
+ <label for="last-name"><%= Page.EditProfile.Label.LastName|l10n|html></label>
+ <input type="text" name="last-name" value="<% lastName|html>" />
+ </div>
+
+ </form>
+
</div>