I would first take a bucket of soapy water and wash and rinse the caliper off. Then after it dries, you may be able to tell where the leak is occurring. You can also dust a little flour on the banjo bolt and the bleeder screw and that may help identify if the leak is at either of those spots.
If the banjo bolt is leaking, you may need to replace or anneal the crush washers on either side of the fitting. Best to replace them, they should be a auto parts store item. To anneal, just heat them up to glowing and then let air cool. Don't water douse them, just leave them lay till cooled. This will restore the malleability of the washer and allow it to soften and seal properly.
If it is not either of these spots, you will need to remove the caliper and push the piston out before you disconnect the lines. Just remove it from the forks and start pumping with the lever. Have a pan underneath to catch the fluid when the piston finally comes out. Reach into the bore and extract the square O ring from the groove. Be a little careful, you don't want to gouge the bore with a sharp pick. With the O ring out, examine it, and using your finger nail scratch off any deposits from the ring. If it is chewed up, or brittle you will have to replace it, but generally it can be reused.
Now take a curved dental pick or equivalent and get all the gunk out of the groove. That means all parts, including the front surface that is hard to get to and see. The condition of the O ring and groove is one component of allowing the pads to retract from the rotor. Don't scar or round out the groove, but get it clean.
Clean up the piston if necessary with 0000 steel wool and polish it if you want to. Any surface pitting that is at or below the O ring seal on the piston must be removed or a new piston ordered. Pitting to the outside of the O ring really doesn't hurt anything.
Coat the O ring with brake fluid and fit it back into the groove. You will think at first that it is too large, but once you get it positioned, it will be fine. Then lube the piston with brake fluid and carefully align it in the cylinder. Open side out! You should be able to now squeeze the piston back into the cylinder completely. It may take some twisting and realigning, but thumb pressure is all that is needed when everything is lined up.
Lube the mounting pins and bolts and reassemble to the forks. Then bleed the system and check for leaks. Total job should be 2-3 hours at most.