First off, You will need a Transformer with about 24 Volts AC Output.
This Circuit Should also have a Filter Capacitor (About 470uF) between the Out of the 1N4004 and Battery Negative.
When Rectified, and Filtered, it will give you about 33 Volts DC.
A Full Charge on your 24 Volt battery is about 28 Volts.
But Either way, that is NOT a Very Good Design.
Your Charge Current Should NOT Exceed 120 mA.
So R1 could be a 48 Ohm Resistor.
This should give you about 100 mA charge as the battery gets up to full.
R2, Possibly a 150 Ohm Resistor.