We study a natural family of elliptic boundary problems on a compact surface Σ parametrized by a non-compact moduli space of flat G-connections with framings along ∂Σ. We prove that the family has a well-defined equivariant analytic index and derive various cohomological formulas (non-abelian, delocalized, abelian). When Σ has a single boundary component and one takes the invariant part of the index, our abelian localization formula reproduces the Teleman-Woodward formula for the index of the Atiyah-Bott classes on the moduli stack of G C bundles. We carry out the analysis more generally for suitable Fredholm families over Hamiltonian loop group spaces.