Congruences and Legendre

I am trying to solve a Legendre symbol problem and have got it down to the following:

When $p \equiv 1\mod4$ and a prime such that $p \neq 2,7$, $\left(\frac{7}{p}\right) = \left(\frac{p}{7}\right) \iff p \equiv 1,2,4\mod7 \iff p \equiv 1,9,25\mod28$.

Why does this last 'if and only if' hold?

It is not helpfully phrased. If $p=1\bmod4$, then $p=1\bmod7$ iff $p=1\bmod28$. Similarly, if $p=1\bmod4$, then $p=2\bmod7$ iff $p=9\bmod28$. Finally, if $p=1\bmod4$, then $p=4\bmod7$ iff $p=25\bmod28$.
You can easily check these. $p=1\bmod4$ implies $p=1,5,9,13,17,21$ or 25 mod 28. But the only one of these which is 1 mod 7 is 1. Similarly for the other cases.