Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mrDoctorWho/vk4xmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Smith <mrdoctorwho@helldev.net>2021-03-11 05:43:34 +0300
committerJohn Smith <mrdoctorwho@helldev.net>2021-03-11 05:43:34 +0300
commit450fda661f420f48b61c055448d012d5194a5d67 (patch)
treec1da7f8bf4ec22a2da003c69fdb5debd6e0ff39f
parent53eb48f6dc8c367edb3622adf8f3e9416f6bfc17 (diff)
Add FORM_TYPE to registration form (fixes #236)
-rw-r--r--library/forms.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/forms.py b/library/forms.py
index 2791969..c248414 100644
--- a/library/forms.py
+++ b/library/forms.py
@@ -1,6 +1,7 @@
# coding: utf-8
from __main__ import URL_ACCEPT_APP, VK_ACCESS, _
+import xmpp
URL_ACCEPT_APP = URL_ACCEPT_APP % VK_ACCESS
@@ -14,6 +15,7 @@ class Forms:
form.append({"var": "password", "type": "text-private",
"label": _("Access-token"),
"desc": _("Enter the access token")})
+ form.append({"var": "FORM_TYPE", "type": "hidden", "value": xmpp.NS_REGISTER})
return form
@classmethod
@@ -26,9 +28,7 @@ class Forms:
form.insert(1, {"var": "phone", "type": "text-single",
"label": _("Phone number"), "value": "+",
"desc": _("Enter phone number in format +71234567890")})
- form.insert(2, {"var": "use_password", "type": "boolean",
- "label": _("Get access-token automatically"),
+ form.insert(2, {"var": "use_password", "type": "boolean",
+ "label": _("Get access-token automatically"),
"desc": _("Tries to get access-token automatically. (It's recommended to use a token)")})
return form
-
-