The 2 machined areas of the motor shaft, either side of the splines, could be used to locate a coupling. This way avoids using the splines by themselves to properly align and support the shafts. The splines are a poor choice to do this in this application.I think this is what you are looking for. The first is when I was looking at the minimum distance possible between my motor and transmission. The other is with the Geo tracker clutch disk sitting on the shaft.
I assembled my motor with insert coupler. One side has smooth shaft other has splines. http://www.diyelectriccar.com/forums/showpost.php?p=1001458&postcount=2047
Main thing is i found bare lovejoy coupler pair with insert for some 60€. Then i cut out clutch hub with splines and made a seat in coupler. That way splines actually transfer torque without being welded. I wanted to avoid that so as not to weaken splines.
One could do the same for Leaf motor and transmission on the other side. This kind of joint can eat some missalignment and still be hardy enough.