misterbisson/bsocial-comments — pull request #78 by Camwyn (2014-09-09 16:09:10+00:00)
Title: Disable flag button when reason is not selected or textarea is empty

Addresses https://github.com/GigaOM/gigaom/issues/5232

**Button starts disabled,**
![screen shot 2014-09-09 at 12 04 36 pm](https://cloud.githubusercontent.com/assets/929375/4204880/271e9aa8-383b-11e4-9202-48bc2490aa9b.png)

**is enabled when a radio button is selected:**
![screen shot 2014-09-09 at 12 04 43 pm](https://cloud.githubusercontent.com/assets/929375/4204891/34200106-383b-11e4-842d-ff15fe658418.png)

**unless "Other" is selected, then it checks the textarea first. If no text, button stays disabled:**
![screen shot 2014-09-09 at 12 04 51 pm](https://cloud.githubusercontent.com/assets/929375/4204899/40fb8eb8-383b-11e4-8066-fd7dcadd3354.png)

**`onkeyup` event for the textarea enables the button if there is text:**
![screen shot 2014-09-09 at 12 04 59 pm](https://cloud.githubusercontent.com/assets/929375/4204900/44315ef0-383b-11e4-9520-39ae14d7abef.png)

**disabled it if there isn't (like you delete it all):**
![screen shot 2014-09-09 at 12 05 06 pm](https://cloud.githubusercontent.com/assets/929375/4204911/5b89a058-383b-11e4-91b1-85fb7bbdf53f.png)

**Just to go full circle, select another radio button after deleting:**
![screen shot 2014-09-09 at 12 05 16 pm](https://cloud.githubusercontent.com/assets/929375/4204919/6f716434-383b-11e4-886f-30529e836489.png)