gitlabhq/gitlabhq — pull request #5733 by bke-drewb (2013-11-29 22:11:15+00:00)
Title: Issue 5716 - Allow removal of avatar

This PR fixes #5716. It adds a remove checkbox to the profile form if an avatar has been uploaded. It also changes the text to indicate that you can remove the avatar to revert to using gravatar. CarrierWaveUploader has support for removing the avatar as long as we expose remove_avatar on the model. See https://github.com/carrierwaveuploader/carrierwave#removing-uploaded-files for more information.

I looked at the existing tests to make sure this wouldn't break anything. I also considered adding a test but I'm not sure if this really adds enough functionality to require a test. We're mostly relying on CarrierWaveUploader features here. I'm open to suggestions, though.

When no avatar is present (same UI as before this PR):
![gravatar](https://f.cloud.github.com/assets/2394772/1647467/89de790c-5942-11e3-9ed0-ad9f3d849173.png)

When an avatar has been uploaded:
![avatar](https://f.cloud.github.com/assets/2394772/1647466/8717d2f4-5942-11e3-946a-63fd0f40eedf.png)