moved the check if the transaction form is active from rails to javascript