Skip to content

Commit

Permalink
Clear fields after sending message.
Browse files Browse the repository at this point in the history
Closes #1
  • Loading branch information
bdukes committed Apr 5, 2013
1 parent b640424 commit c14aa30
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
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 c14aa30

Please sign in to comment.