[communication] [setup wizard] [minor] [fixes]

This commit is contained in:
Rushabh Mehta
2013-10-09 16:08:54 +05:30
parent 26c5a585c7
commit ddca90ef7b
9 changed files with 156 additions and 54 deletions

View File

@@ -19,7 +19,7 @@ wn.pages['setup-wizard'].onload = function(wrapper) {
if(r.exc) {
var d = msgprint(wn._("There were errors."));
d.custom_onhide = function() {
wn.set_route(me.wiz.page_name, "0");
wn.set_route(erpnext.wiz.page_name, "0");
}
} else {
wiz.show_complete();
@@ -61,8 +61,8 @@ wn.pages['setup-wizard'].onload = function(wrapper) {
fields: [
{"fieldname": "first_name", "label": wn._("First Name"), "fieldtype": "Data", reqd:1},
{"fieldname": "last_name", "label": wn._("Last Name"), "fieldtype": "Data", reqd:1},
{"email_id": "email", "label": wn._("Email Id"), "fieldtype": "Data", reqd:1, "description":"Your Login Id"},
{"password": "password", "label": wn._("Password"), "fieldtype": "Password", reqd:1},
{"fieldname": "email", "label": wn._("Email Id"), "fieldtype": "Data", reqd:1, "description":"Your Login Id"},
{"fieldname": "password", "label": wn._("Password"), "fieldtype": "Password", reqd:1},
{fieldtype:"Attach Image", fieldname:"attach_profile", label:"Attach Your Profile..."},
],
help: wn._('The first user will become the System Manager (you can change that later).'),
@@ -188,21 +188,51 @@ wn.pages['setup-wizard'].onload = function(wrapper) {
{fieldtype:"Column Break"},
{fieldtype:"Attach", fieldname:"item_img_1", label:"Attach Image..."},
{fieldtype:"Section Break"},
{fieldtype:"Column Break"},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_group_1", options:["Products", "Services", "Raw Material", "Sub Assemblies"]},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_uom_1", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
{fieldtype:"Section Break"},
{fieldtype:"Data", fieldname:"item_2", label:"Item 2", placeholder:"A Product or Service"},
{fieldtype:"Column Break"},
{fieldtype:"Attach", fieldname:"item_img_2", label:"Attach Image..."},
{fieldtype:"Section Break"},
{fieldtype:"Column Break"},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_group_2", options:["Products", "Services", "Raw Material", "Sub Assemblies"]},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_uom_2", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
{fieldtype:"Section Break"},
{fieldtype:"Data", fieldname:"item_3", label:"Item 3", placeholder:"A Product or Service"},
{fieldtype:"Column Break"},
{fieldtype:"Attach", fieldname:"item_img_3", label:"Attach Image..."},
{fieldtype:"Section Break"},
{fieldtype:"Column Break"},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_group_3", options:["Products", "Services", "Raw Material", "Sub Assemblies"]},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_uom_3", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
{fieldtype:"Section Break"},
{fieldtype:"Data", fieldname:"item_4", label:"Item 4", placeholder:"A Product or Service"},
{fieldtype:"Column Break"},
{fieldtype:"Attach", fieldname:"item_img_4", label:"Attach Image..."},
{fieldtype:"Section Break"},
{fieldtype:"Column Break"},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_group_4", options:["Products", "Services", "Raw Material", "Sub Assemblies"]},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_uom_4", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
{fieldtype:"Section Break"},
{fieldtype:"Data", fieldname:"item_5", label:"Item 5", placeholder:"A Product or Service"},
{fieldtype:"Column Break"},
{fieldtype:"Attach", fieldname:"item_img_5", label:"Attach Image..."},
{fieldtype:"Section Break"},
{fieldtype:"Column Break"},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_group_5", options:["Products", "Services", "Raw Material", "Sub Assemblies"]},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_uom_5", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
],
},
@@ -213,10 +243,44 @@ wn.pages['setup-wizard'].onload = function(wrapper) {
"help": wn._("List a few products or services you buy from your suppliers or vendors. If these are same as your products, then do not add them."),
"fields": [
{fieldtype:"Data", fieldname:"item_buy_1", label:"Item 1", placeholder:"A Product or Service"},
{fieldtype:"Section Break"},
{fieldtype:"Column Break"},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_buy_group_1", options:["Raw Material", "Consumable", "Sub Assemblies", "Services", "Products"]},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_buy_uom_1", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
{fieldtype:"Section Break"},
{fieldtype:"Data", fieldname:"item_buy_2", label:"Item 2", placeholder:"A Product or Service"},
{fieldtype:"Section Break"},
{fieldtype:"Column Break"},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_buy_group_2", options:["Raw Material", "Consumable", "Sub Assemblies", "Services", "Products"]},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_buy_uom_2", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
{fieldtype:"Section Break"},
{fieldtype:"Data", fieldname:"item_buy_3", label:"Item 3", placeholder:"A Product or Service"},
{fieldtype:"Section Break"},
{fieldtype:"Column Break"},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_buy_group_3", options:["Raw Material", "Consumable", "Sub Assemblies", "Services", "Products"]},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_buy_uom_3", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
{fieldtype:"Section Break"},
{fieldtype:"Data", fieldname:"item_buy_4", label:"Item 4", placeholder:"A Product or Service"},
{fieldtype:"Section Break"},
{fieldtype:"Column Break"},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_buy_group_4", options:["Raw Material", "Consumable", "Sub Assemblies", "Services", "Products"]},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_buy_uom_4", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
{fieldtype:"Section Break"},
{fieldtype:"Data", fieldname:"item_buy_5", label:"Item 5", placeholder:"A Product or Service"},
{fieldtype:"Section Break"},
{fieldtype:"Column Break"},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_buy_group_5", options:["Raw Material", "Consumable", "Sub Assemblies", "Services", "Products"]},
{fieldtype:"Column Break"},
{fieldtype:"Select", fieldname:"item_buy_uom_5", options:["Unit", "Nos", "Box", "Pair", "Kg", "Set", "Hour", "Minute"]},
],
},
@@ -327,7 +391,7 @@ wn.wiz.Wizard = Class.extend({
},
show: function(id) {
if(!this.welcomed) {
wn.set_route(this.wiz.page_name);
wn.set_route(this.page_name);
return;
}
id = cint(id);