fixes #2788 - adding / removing puppet classes updates the change even if the form is not submitted

(cherry picked from commit 0ba99bba2c7496fd44822dd5f2e6b4ccda19177b)