/*** @jsx React.DOM */ var card_management = createReactClass({ getInitialState: function(props) { return { cards: window.cards, newCard: '', }; }, componentDidMount: function() { this.refreshCardList(); }, addNewCard: function(event) { AJAX.post( Link.get('addcard'), {card: this.state.newCard}, function(response) { this.setState({ cards: response.cards, newCard: '', }); }.bind(this) ); event.preventDefault(); }, deleteExistingCard: function(card) { $.confirm({ escapeKey: 'Cancel', animation: 'none', closeAnimation: 'none', title: 'Delete Card', content: 'Are you sure you want to delete this card from your account?', buttons: { Delete: { btnClass: 'delete', action: function() { AJAX.post( Link.get('removecard'), {card: card}, function(response) { this.setState({ cards: response.cards, newCard: '', }); }.bind(this) ); }.bind(this), }, Cancel: function() { }, } }); }, refreshCardList: function() { AJAX.get( Link.get('listcards'), function(response) { this.setState({ cards: response.cards, }); setTimeout(this.refreshCardList, 2500); }.bind(this) ); }, render: function() { return (
Enter the 16 digit code found on the back of an e-AMUSEMENT card or displayed
in-game when you scan an Amusement IC card. For convenience, you can also enter
the raw 16 digit card ID usually starting with E004.
Enter the 16 digit code found on the back of an e-AMUSEMENT card or displayed in-game when you scan an Amusement IC card.
}