Adding currently active sealed leagues/tournaments to the deck target format dropdown so that validation can be used.

This commit is contained in:
Christian 'ketura' McCarty
2024-09-23 19:54:27 -05:00
parent 1d39bf2811
commit 429b4d092a
2 changed files with 3 additions and 0 deletions

View File

@@ -254,6 +254,7 @@ public class CollectionRequestHandler extends LotroServerRequestHandler implemen
Element collectionElem = doc.createElement("collection");
collectionElem.setAttribute("type", collectionType.getCode());
collectionElem.setAttribute("name", collectionType.getFullName());
collectionElem.setAttribute("format", serie.getFormat().getCode());
collectionsElem.appendChild(collectionElem);
}
}
@@ -266,6 +267,7 @@ public class CollectionRequestHandler extends LotroServerRequestHandler implemen
Element collectionElem = doc.createElement("collection");
collectionElem.setAttribute("type", collectionType.getCode());
collectionElem.setAttribute("name", collectionType.getFullName());
collectionElem.setAttribute("format", tourney.getFormatCode());
collectionsElem.appendChild(collectionElem);
}

View File

@@ -393,6 +393,7 @@ var GempLotrDeckBuildingUI = Class.extend({
for (var i = 0; i < collections.length; i++) {
var collection = collections[i];
$("#collectionSelect").append("<option value='" + collection.getAttribute("type") + "'>" + collection.getAttribute("name") + "</option>");
$("#formatSelect").append("<option value='" + collection.getAttribute("format") + "'>" + collection.getAttribute("name") + "</option>");
}
}
});