diff --git a/www/assets/js/linkaccount.js b/www/assets/js/linkaccount.js
new file mode 100644
index 0000000..515c27b
--- /dev/null
+++ b/www/assets/js/linkaccount.js
@@ -0,0 +1,74 @@
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+
+function setupNewAccount(name) {
+ app.dialog.preloader("Finishing up...");
+
+ apirequest(
+ SETTINGS.apis.registernew,
+ {
+ name: name
+ },
+ function (resp) {
+ app.dialog.close();
+ if (resp.status == "ERROR") {
+ app.dialog.alert(resp.msg, "Error");
+ return;
+ }
+ setStorage("client_uuid", resp.client_uuid);
+ setStorage("device_uuid", resp.device_uuid);
+ restartApplication();
+ },
+ function (xhr) {
+ app.dialog.close();
+ try {
+ var error = $.parseJSON(xhr.responseText);
+ if (error && typeof error.msg != 'undefined') {
+ app.dialog.alert(error.msg + " (NEWAC_XHR)", "Error");
+ } else {
+ app.dialog.alert("A server or network error occurred. Try again later. (NEWAC_XHRNOMSG)", "Error");
+ }
+ } catch (ex) {
+ app.dialog.alert("A server error occurred. Try again later. (NEWAC_XHRBADJSON)", "Error");
+ }
+ }, "POST");
+}
+
+function setupExistingAccount(email, phone, invoiceid) {
+ app.dialog.preloader("Finding your account...");
+
+ apirequest(
+ SETTINGS.apis.registerexisting,
+ {
+ email: email,
+ phone: phone,
+ invoiceid: invoiceid
+ },
+ function (resp) {
+ app.dialog.close();
+ if (resp.status == "ERROR") {
+ app.dialog.alert(resp.msg, "Error");
+ return;
+ }
+ setStorage("client_uuid", resp.client_uuid);
+ setStorage("device_uuid", resp.device_uuid);
+ restartApplication();
+ },
+ function (xhr) {
+ app.dialog.close();
+ try {
+ var error = $.parseJSON(xhr.responseText);
+ if (error && typeof error.msg != 'undefined') {
+ app.dialog.alert(error.msg + " (LINKAC_XHR)", "Error");
+ } else {
+ app.dialog.alert("A server or network error occurred. Try again later. (LINKAC_XHRNOMSG)", "Error");
+ }
+ } catch (ex) {
+ app.dialog.alert("A server error occurred. Try again later. (LINKAC_XHRBADJSON)", "Error");
+ }
+ }, "POST");
+}
\ No newline at end of file
diff --git a/www/index.html b/www/index.html
index f931442..39f4709 100644
--- a/www/index.html
+++ b/www/index.html
@@ -44,6 +44,7 @@
+
diff --git a/www/pages/linkaccount.html b/www/pages/linkaccount.html
new file mode 100644
index 0000000..71bc5e8
--- /dev/null
+++ b/www/pages/linkaccount.html
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
Before we get started, tell us a little bit about yourself.
+ TapClick the option that best describes you.
+
+
+
+
+
+
+
+
+
+
I haven't done business with Netsyms before.
+
+
+
+
+
+
+
+
+
+
+
+
I've received at least one invoice from Netsyms in the past.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/www/pages/linkaccount_existing.html b/www/pages/linkaccount_existing.html
new file mode 100644
index 0000000..90f08ab
--- /dev/null
+++ b/www/pages/linkaccount_existing.html
@@ -0,0 +1,72 @@
+
+
+
\ No newline at end of file
diff --git a/www/pages/linkaccount_new.html b/www/pages/linkaccount_new.html
new file mode 100644
index 0000000..f620055
--- /dev/null
+++ b/www/pages/linkaccount_new.html
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
Welcome and thanks for choosing Netsyms Technologies!
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/www/routes.js b/www/routes.js
index eacca25..b4f2f8f 100644
--- a/www/routes.js
+++ b/www/routes.js
@@ -54,6 +54,29 @@ var routes = [
url: './pages/track.html',
name: 'track'
},
+ {
+ path: '/linkaccount',
+ url: './pages/linkaccount.html',
+ name: 'linkaccount',
+ routes: [
+ {
+ path: "/new",
+ url: "./pages/linkaccount_new.html",
+ name: "linkaccount_new",
+ options: {
+ transition: 'f7-parallax'
+ }
+ },
+ {
+ path: "/existing",
+ url: "./pages/linkaccount_existing.html",
+ name: "linkaccount_existing",
+ options: {
+ transition: 'f7-parallax'
+ }
+ }
+ ]
+ },
{
path: '/offers',
name: 'offers',
diff --git a/www/settings.js b/www/settings.js
index 82f16ea..2e199ae 100644
--- a/www/settings.js
+++ b/www/settings.js
@@ -7,7 +7,9 @@
var SETTINGS = {
apis: {
track: "https://track.netsyms.com/public/api.php",
- offers: "https://apis.netsyms.net/repairapp/offers.php"
+ offers: "https://apis.netsyms.net/repairapp/offers.php",
+ registernew: "https://apis.netsyms.net/repairapp/registernew.php",
+ registerexisting: "https://apis.netsyms.net/repairapp/registerexisting.php"
},
branding: {
apptitle: "Netsyms PC Repair",