Added reason to add items to collections form.
This commit is contained in:
@@ -293,6 +293,7 @@ public class AdminResource extends AbstractResource {
|
|||||||
@POST
|
@POST
|
||||||
public String addItemsToCollection(
|
public String addItemsToCollection(
|
||||||
@FormParam("collectionType") String collectionType,
|
@FormParam("collectionType") String collectionType,
|
||||||
|
@FormParam("reason") String reason,
|
||||||
@FormParam("product") String product,
|
@FormParam("product") String product,
|
||||||
@Context HttpServletRequest request) throws Exception {
|
@Context HttpServletRequest request) throws Exception {
|
||||||
validateAdmin(request);
|
validateAdmin(request);
|
||||||
@@ -302,7 +303,7 @@ public class AdminResource extends AbstractResource {
|
|||||||
Map<Player,CardCollection> playersCollection = _collectionManager.getPlayersCollection(collectionType);
|
Map<Player,CardCollection> playersCollection = _collectionManager.getPlayersCollection(collectionType);
|
||||||
|
|
||||||
for (Map.Entry<Player, CardCollection> playerCollection : playersCollection.entrySet())
|
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";
|
return "OK";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
<form method="POST" action="/gemp-lotr-server/admin/addItemsToCollection">
|
<form method="POST" action="/gemp-lotr-server/admin/addItemsToCollection">
|
||||||
Type: <input type="text" name="collectionType"><br/>
|
Type: <input type="text" name="collectionType"><br/>
|
||||||
|
Reason: <input type="text" name="reason"><br/>
|
||||||
Product: <textarea rows="5" cols="20" name="product"></textarea><br/>
|
Product: <textarea rows="5" cols="20" name="product"></textarea><br/>
|
||||||
<input type="submit" value="Add items to collection">
|
<input type="submit" value="Add items to collection">
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user