aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-01-05 17:39:15 +0100
committerKim Alvefur <zash@zash.se>2017-01-05 17:39:15 +0100
commitb95406c413b9f91fd8bdf2b386c8e9edf525dedb (patch)
tree64378eb81724a2a0f66680000f07da6c423cb1a1
parenta6e9f2a8cdef8f284b76f409aca0c96b5dc85c57 (diff)
downloadprosody-b95406c413b9f91fd8bdf2b386c8e9edf525dedb.tar.gz
prosody-b95406c413b9f91fd8bdf2b386c8e9edf525dedb.zip
mod_register: Allow 'title' and 'instructions' fields to be customized
-rw-r--r--plugins/mod_register.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/mod_register.lua b/plugins/mod_register.lua
index c376117f..f89efe20 100644
--- a/plugins/mod_register.lua
+++ b/plugins/mod_register.lua
@@ -41,16 +41,21 @@ local field_map = {
date = { name = "date", type = "text-single", label = "Birth date" };
};
+local title = module:get_option_string("registration_title",
+ "Creating a new account");
+local instructions = module:get_option_string("registration_instructions",
+ "Choose a username and password for use with this service.");
+
local registration_form = dataform_new{
- title = "Creating a new account";
- instructions = "Choose a username and password for use with this service.";
+ title = title;
+ instructions = instructions;
field_map.username;
field_map.password;
};
local registration_query = st.stanza("query", {xmlns = "jabber:iq:register"})
- :tag("instructions"):text("Choose a username and password for use with this service."):up()
+ :tag("instructions"):text(instructions):up()
:tag("username"):up()
:tag("password"):up();