Can you tell an area where the fluid may have come from? One possibility is the dipstick tube seal. This would leak after sitting a while and the torque convertor drains back into the pan, but not leak after just sitting a short period of time.
You can post a picture in your response, that will be helpful.
With the transmission setting the code it is entering a failsafe mode causing harsh shifts. Here is a diagram of the wiring for the solenoid.