[fix] buttons for rfq and material request

This commit is contained in:
Rushabh Mehta
2016-06-30 17:02:37 +05:30
parent dc8067eb33
commit 5f5f0bec2c
3 changed files with 49 additions and 4 deletions

View File

@@ -1,7 +1,34 @@
{% extends "templates/web.html" %}
{% block script %}
<script>{% include "templates/includes/start.js" %}</script>
<script>
$(document).ready(function() {
$("#login_btn").click(function() {
var me = this;
$(this).html("Logging In...").prop("disabled", true);
frappe.call({
"method": "login",
args: {
usr: "demo@erpnext.com",
pwd: "demo",
lead_email: $("#lead-email").val(),
},
callback: function(r) {
$(me).prop("disabled", false);
if(r.exc) {
alert("Error, please contact support@erpnext.com");
} else {
console.log("Logged In");
window.location.href = "desk";
}
}
})
return false;
})
.prop("disabled", false);
})
</script>
{% endblock %}
{% block style %}