[webshop] Place Order - submits Quotation, creates Customer if required, creates and submits Sales Order

This commit is contained in:
Anand Doshi
2013-07-10 20:49:44 +05:30
parent afad0efca3
commit 2ac0a83bd8
19 changed files with 382 additions and 173 deletions

View File

@@ -12,24 +12,28 @@
<h2><i class="icon-user"></i> My Profile</h2>
<hr>
<div class="alert" id="message" style="display: none;"></div>
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="fullname">Full Name</label>
<div class="controls">
<input type="text" id="fullname" placeholder="Your Name">
</div>
</div>
<div class="control-group">
<label class="control-label" for="password">Password</label>
<div class="controls">
<input type="password" id="password" placeholder="Password">
</div>
</div>
<div class="control-group">
<div class="controls">
<button id="update_profile" type="submit" class="btn btn-default">Update</button>
</div>
</div>
<form>
<fieldset>
<label>Full Name</label>
<input type="text" id="fullname" placeholder="Your Name">
</fieldset>
<fieldset>
<label>Password</label>
<input type="password" id="password" placeholder="Password">
</fieldset>
<fieldset>
<label>Company Name</label>
<input type="text" id="company_name" placeholder="Company Name" value="{{ company_name }}">
</fieldset>
<fieldset>
<label>Mobile No</label>
<input type="text" id="mobile_no" placeholder="Mobile No" value="{{ mobile_no }}">
</fieldset>
<fieldset>
<label>Phone</label>
<input type="text" id="phone" placeholder="Phone" value="{{ phone }}">
</fieldset>
<button id="update_profile" type="submit" class="btn btn-default">Update</button>
</form>
</div>
<script>
@@ -37,11 +41,14 @@ $(document).ready(function() {
$("#fullname").val(getCookie("full_name") || "");
$("#update_profile").click(function() {
wn.call({
method: "core.doctype.profile.profile.update_profile",
method: "startup.webutils.update_profile",
type: "POST",
args: {
fullname: $("#fullname").val(),
password: $("#password").val()
password: $("#password").val(),
company_name: $("#company_name").val(),
mobile_no: $("#mobile_no").val(),
phone: $("#phone").val()
},
btn: this,
msg: $("#message"),
@@ -53,4 +60,4 @@ $(document).ready(function() {
})
})
</script>
{% endblock %}
{% endblock %}