Added reason to add items to collections form.

This commit is contained in:
marcins78
2012-12-19 10:46:37 +00:00
parent 763669f943
commit fb349a57e6
2 changed files with 3 additions and 1 deletions

View File

@@ -293,6 +293,7 @@ public class AdminResource extends AbstractResource {
@POST
public String addItemsToCollection(
@FormParam("collectionType") String collectionType,
@FormParam("reason") String reason,
@FormParam("product") String product,
@Context HttpServletRequest request) throws Exception {
validateAdmin(request);
@@ -302,7 +303,7 @@ public class AdminResource extends AbstractResource {
Map<Player,CardCollection> playersCollection = _collectionManager.getPlayersCollection(collectionType);
for (Map.Entry<Player, CardCollection> playerCollection : playersCollection.entrySet())
_collectionManager.addItemsToPlayerCollection(true, "Fixing league collection", playerCollection.getKey(), createCollectionType(collectionType), productItems);
_collectionManager.addItemsToPlayerCollection(true, reason, playerCollection.getKey(), createCollectionType(collectionType), productItems);
return "OK";
}

View File

@@ -25,6 +25,7 @@
<form method="POST" action="/gemp-lotr-server/admin/addItemsToCollection">
Type: <input type="text" name="collectionType"><br/>
Reason: <input type="text" name="reason"><br/>
Product: <textarea rows="5" cols="20" name="product"></textarea><br/>
<input type="submit" value="Add items to collection">
</form>