Commit 0598349b authored by Krish Moodbidri's avatar Krish Moodbidri
Browse files

added button to print error message

parent 7cf10358
Pipeline #4566 failed with stage
...@@ -19,7 +19,12 @@ function request_account() { ...@@ -19,7 +19,12 @@ function request_account() {
function renderDom(title, message, error_msg) { function renderDom(title, message, error_msg) {
document.getElementById("form-wrapper").innerHTML = "<h2>" + title + "<br>"; document.getElementById("form-wrapper").innerHTML = "<h2>" + title + "<br>";
document.getElementById("form-wrapper").innerHTML += "<h3>" + message + "<br>"; document.getElementById("form-wrapper").innerHTML += "<h3>" + message + "<br>";
document.getElementById("form-wrapper").innerHTML += "<p>" + error_msg; if (error_msg !== null ) {
var error_button = document.createElement("BUTTON");
error_button.innerHTML = 'Read Error Message';
document.getElementById("form-wrapper").appendChild(error_button);
error_button.onclick = function(){document.getElementById("form-wrapper").innerHTML += "<br>" +error_msg}
}
} }
function autofill_form(username, fullname, email) { function autofill_form(username, fullname, email) {
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
</div> </div>
<br> <br>
<div class="col-md-7 col-sm-7 my-col"> <div class="col-md-7 col-sm-7 my-col">
<button class="btn btn-danger btn-md" id="cancel" name="cancel" type="button" onClick="renderDom('Account cancel','close browser', '')">Cancel</button> <button class="btn btn-danger btn-md" id="cancel" name="cancel" type="button" onClick="renderDom('Account cancel','close browser', null)">Cancel</button>
<button class="btn btn-primary btn-md" id="submit" name="submit" type="button" value="Submit" onclick="displayloading1();request_account()"> Create Account</button> <button class="btn btn-primary btn-md" id="submit" name="submit" type="button" value="Submit" onclick="displayloading1();request_account()"> Create Account</button>
</div> </div>
</form> </form>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment