Saving provisioning template ruins the template when preview mode is selected
Steps to reproduce:
1. edit any existing provisioning template
2. do some changes in Template editor
3. hit "Preview" to see your changes
4. hit "Save" to save your template
Actual results: template gets ruined. Diff (the preview) is saved as template new version of template instead of template body itself.
Expected results: when you hit "Save" template gets saved no matter if you are looking at "Code" or "Preview"