Skip to content

Commit

Permalink
Merge pull request #8 from bdukes/clear-fields-gh-1
Browse files Browse the repository at this point in the history
Clear fields after sending message

Closes #1
  • Loading branch information
bdukes committed Apr 5, 2013
2 parents cdb1d17 + c14aa30 commit ffadf2c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion JavaScript/taf.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion JavaScript/taf.debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
});
});
};
} (jQuery));
} (jQuery));
1 change: 1 addition & 0 deletions ReleaseNotes_1.3.0.htm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<h2>Change Log</h2>
<ul>
<li>Added <abbr title="Completely Automated Public Turing test to tell Computers and Humans Apart">CAPTCHA</abbr> protection. By default, there are two invisible protections, while the standard CAPTCHA can be turned on via the settings.</li>
<li>Clear friend's info and message after send an email, to prep for the next.</li>
</ul>
<h2>Known Issues</h2>
<ul>
Expand Down
9 changes: 9 additions & 0 deletions ViewTellAFriend.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,15 @@ private void SubmitButton_Click(object sender, EventArgs e)
var successfullySent = string.IsNullOrEmpty(response);
this.SuccessPanel.Visible = successfullySent;
this.ErrorPanel.Visible = !successfullySent;

if (!successfullySent)
{
return;
}

this.FriendNameTextBox.Text = string.Empty;
this.FriendsEmailTextBox.Text = string.Empty;
this.MessageTextBox.Text = string.Empty;
}
catch (Exception exc)
{
Expand Down

0 comments on commit ffadf2c

Please sign in to comment.