Initialize loginUser and loginPass with an empty string #1175
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this PR:
Initialize loginUser and loginPass with an empty string
If you login without entering any information then jQuery would succeed the failed AJAX request and tries to add the notification with "Login succes" but generates the following javascript error:
Strangely I noticed that the second post without entering information wouldn't trigger an error, I found out that was because during the post the observable where reset to an empty string. (so if we initialize with an empty string it wouldn't trigger the success function the first too)
Clear loginUser and loginPass after a successful login
A small usability thing, but very useful, I find it very annoying if I mistyped something to redo all the inputs, let the user control this. If this is to much for the maintenance branch then I can cherry pick this out ofcourse.