antoinevg / afrimesh

Automatically exported from code.google.com/p/afrimesh
Other
1 stars 0 forks source link

When adding new customer, type is always "flatrate" instead of selected type #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. On the dashboard's customers->manage tab, click "new"
2. Select any customer type and enter any customer name

Regardless of the customer type that was selected, the type of the newly
created customer is always "flatrate".

The problem appears to be with the selector on the interface, because the
actual parameter passed to the mysql/memcachedb helper functions is always
"flatrate".

Original issue reported on code.google.com by edwecow...@gmail.com on 14 Jul 2009 at 11:43

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The cause of this bug has been found - "flatrate" is hard coded as the type for 
all
newly created users in /afrimesh/dashboard/www/modules/customers.manage.js 
function
on_customer_save() LINE 82

  function on_customer_save() {
    var username = $("#widget-customers-manage input#username").val();
    var ret = afrimesh.customers.generate(username, "flatrate", 0);
    console.debug ("THE TYPE SELECTED IS ");
    console.debug("Inserted: " + ret);
    $("ul#menu ul#customers li#manage").click();
  };

Original comment by edwecow...@gmail.com on 15 Jul 2009 at 9:50

GoogleCodeExporter commented 9 years ago

Original comment by edwecow...@gmail.com on 15 Jul 2009 at 10:17