Conservation laws and symmetry transformations of the electromagnetic field with sources