Created
August 4, 2015 09:25
-
-
Save adamsilver/dab17b5e59f6ed1f37cb to your computer and use it in GitHub Desktop.
Messages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- _errorMessagePanel.cshtml --> | |
| <!-- | |
| 1. this combining is necessary so that we don't have two messages on screen at once when js kicks in | |
| 2. The error div is always there incase JS needs to utilise it but sometimes adds class of hide when there are no messages to display | |
| --> | |
| <div id="errorMessagePanel" class="if(Model.errorMessage == null) { hide }"> | |
| if(Model.errorMessage.standardError != null) { | |
| <p>@Model.errorMessage.standardError.text</p> | |
| } elseif(Model.errorMessage.formError != null) { | |
| <h2>There are some errors in the form</h2> | |
| <ul> | |
| for(Model.errorMEssage.formError.errors) | |
| <li> | |
| <a href="#@Model.errorMEssage.formError.errors.FieldName"> | |
| @Model.errorMEssage.formError.errors.text | |
| </a> | |
| </li> | |
| } | |
| </ul> | |
| } | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- _successMessagePanel.cshtml --> | |
| if(Model.successMessage != null) { | |
| <div id="successMessagePanel"> | |
| <p>@Model.successMessage.text</p> | |
| </div> | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment