Use description when creating a new album.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 22 Mar 2011 19:44:59 +0000 (20:44 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 22 Mar 2011 19:44:59 +0000 (20:44 +0100)
src/main/java/net/pterodactylus/sone/web/CreateAlbumPage.java
src/main/resources/i18n/sone.en.properties
src/main/resources/templates/include/createAlbum.html

index 7b51fb5..378f815 100644 (file)
@@ -58,11 +58,12 @@ public class CreateAlbumPage extends SoneTemplatePage {
                                templateContext.set("nameMissing", true);
                                return;
                        }
+                       String description = request.getHttpRequest().getPartAsStringFailsafe("description", 256).trim();
                        Sone currentSone = getCurrentSone(request.getToadletContext());
                        String parentId = request.getHttpRequest().getPartAsStringFailsafe("parent", 36);
                        Album parent = webInterface.getCore().getAlbum(parentId, false);
                        Album album = webInterface.getCore().createAlbum(currentSone, parent);
-                       album.setName(name);
+                       album.setName(name).setDescription(description);
                        throw new RedirectException("imageBrowser.html?album=" + album.getId());
                }
        }
index 3f64f51..f8e775b 100644 (file)
@@ -234,6 +234,7 @@ View.Trust.Tooltip.Untrust=Remove your trust assignment for this person
 
 View.CreateAlbum.Title=Create Album
 View.CreateAlbum.Label.Name=Name:
+View.CreateAlbum.Label.Description=Description:
 
 WebInterface.DefaultText.StatusUpdate=What’s on your mind?
 WebInterface.DefaultText.Message=Write a Message…
index 6e3623f..4887199 100644 (file)
@@ -5,5 +5,7 @@
        <input type="hidden" name="parent" value="<%ifnull ! album><% album.id|html><%/if>" />
        <label for="album"><%= View.CreateAlbum.Label.Name|l10n|html></label>
        <input type="text" name="name" value="" />
+       <label for="description"><%= View.CreateAlbum.Label.Description|l10n|html></label>
+       <input type="text" name="description" value="" />
        <button type="submit" name="uploadImage" value="1"><%= Page.ImageBrowser.CreateAlbum.Button.CreateAlbum|l10n|html></button>
 </form>