if (!webInterface.getCore().isLocalSone(album.getSone())) {
throw new RedirectException("noPermission.html");
}
+ String albumImageId = request.getHttpRequest().getPartAsStringFailsafe("album-image", 36);
+ if (webInterface.getCore().getImage(albumImageId, false) == null) {
+ albumImageId = null;
+ }
+ album.setAlbumImage(albumImageId);
String title = request.getHttpRequest().getPartAsStringFailsafe("title", 100).trim();
if (title.length() == 0) {
templateContext.set("titleMissing", true);
Page.ImageBrowser.CreateAlbum.Button.CreateAlbum=Create Album
Page.ImageBrowser.Album.Edit.Title=Edit Album
Page.ImageBrowser.Album.Delete.Title=Delete Album
+Page.ImageBrowser.Album.Label.AlbumImage=Album Image:
Page.ImageBrowser.Album.Label.Title=Title:
Page.ImageBrowser.Album.Label.Description=Description:
+Page.ImageBrowser.Album.AlbumImage.Choose=Choose Album Image…
Page.ImageBrowser.Album.Button.Save=Save Album
Page.ImageBrowser.Album.Button.Delete=Delete Album
Page.ImageBrowser.Image.Edit.Title=Edit Image
<input type="hidden" name="formPassword" value="<%formPassword|html>" />
<input type="hidden" name="album" value="<%album.id|html>" />
+ <%if ! album.images.empty>
+ <div>
+ <label for="album-image"><%= Page.ImageBrowser.Album.Label.AlbumImage|l10n|html></label>
+ <select name="album-image">
+ <option disabled="disabled"><%= Page.ImageBrowser.Album.AlbumImage.Choose|l10n|html></option>
+ <%foreach album.images image>
+ <option value="<% image.id|html>"<%if album.albumImage.id|match key=image.id> selected="selected"<%/if>><% image.title|html></option>
+ <%/foreach>
+ </select>
+ </div>
+ <%/if>
<div>
<label for="title"><%= Page.ImageBrowser.Album.Label.Title|l10n|html></label>
<input type="text" name="title" value="<%album.title|html>" />