Charge at 24v and discharge at 12v for battery system
It will work fine as long as gray and brown wires are not present at the same time. 

The diodes are redundant, they don't fix anything - they will prevent a short-circuit present when both green and brown wires are attached, but the output won't be 12V.

I don't see why you simply won't keep the 12V parallel connection of batteries and charge them from a 12V charger?

Let's not forget that the ideal charging situation is when each battery cell is handled by an individual charger. In a 12V lead-acid battery there are 6 cells, each with 2.0V nominal voltage. Ideally, the cell-to-cell links would be exposed, and one would use a 7-wire connection to the battery for both charging and discharging (with a charge/discharge controller). This is the ideal scenario and maximizes battery life. This is how electric cars and professionally designed battery packs are made (in contrast to cheap junk).

So, even the situation with a 12V battery used as a unit is less than ideal since there's 6 cells in series, without individual cell management. By connecting two of the batteries in series, you're making things even worse.