Registration form fields naming updated
darcs-hash:20070324105551-86b55-51c4f11ff6d916a867969c38090dbaad30e597ff.gz
This commit is contained in:
@@ -765,8 +765,7 @@ class JCLComponent(Component, object):
|
|||||||
# TODO : Add page when empty tuple given
|
# TODO : Add page when empty tuple given
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
lang_label_attr = _account_class.__name__.lower() \
|
lang_label_attr = "field_" + field_name
|
||||||
+ "_" + field_name
|
|
||||||
if hasattr(lang_class, lang_label_attr):
|
if hasattr(lang_class, lang_label_attr):
|
||||||
label = getattr(lang_class, lang_label_attr)
|
label = getattr(lang_class, lang_label_attr)
|
||||||
else:
|
else:
|
||||||
@@ -778,8 +777,7 @@ class JCLComponent(Component, object):
|
|||||||
value = default_func())
|
value = default_func())
|
||||||
if field_options is not None:
|
if field_options is not None:
|
||||||
for option_value in field_options:
|
for option_value in field_options:
|
||||||
lang_label_attr = _account_class.__name__.lower() \
|
lang_label_attr = "field_" + field_name + "_" + option_value
|
||||||
+ "_" + field_name + "_" + option_value
|
|
||||||
if hasattr(lang_class, lang_label_attr):
|
if hasattr(lang_class, lang_label_attr):
|
||||||
label = getattr(lang_class, lang_label_attr)
|
label = getattr(lang_class, lang_label_attr)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class FeederComponent(JCLComponent):
|
|||||||
server, \
|
server, \
|
||||||
port, \
|
port, \
|
||||||
db_connection_str, \
|
db_connection_str, \
|
||||||
lang)
|
lang = lang)
|
||||||
self.name = "Generic Feeder Component"
|
self.name = "Generic Feeder Component"
|
||||||
# Define default feeder and sender, can be override
|
# Define default feeder and sender, can be override
|
||||||
self.feeder = Feeder(self)
|
self.feeder = Feeder(self)
|
||||||
|
|||||||
@@ -80,9 +80,14 @@ class Lang:
|
|||||||
new_account_message_body = u"New account created"
|
new_account_message_body = u"New account created"
|
||||||
mandatory_field = u"%s is required"
|
mandatory_field = u"%s is required"
|
||||||
|
|
||||||
presence_action_0 = u"Do nothing"
|
field_action_0 = u"Do nothing"
|
||||||
presence_chat_action_0 = presence_action_0
|
field_chat_action_0 = field_action_0
|
||||||
|
field_online_action_0 = field_action_0
|
||||||
|
field_away_action_0 = field_action_0
|
||||||
|
field_xa_action_0 = field_action_0
|
||||||
|
field_dnd_action_0 = field_action_0
|
||||||
|
field_offline_action_0 = field_action_0
|
||||||
|
|
||||||
# account_login = u"Login"
|
# account_login = u"Login"
|
||||||
# account_password = u"Password"
|
# account_password = u"Password"
|
||||||
# account_password_store = u"Store password on Jabber server?"
|
# account_password_store = u"Store password on Jabber server?"
|
||||||
|
|||||||
@@ -168,3 +168,4 @@ class PresenceAccount_TestCase(unittest.TestCase):
|
|||||||
self.assertTrue(str(default_func()) in possibles_actions)
|
self.assertTrue(str(default_func()) in possibles_actions)
|
||||||
del account.hub.threadConnection
|
del account.hub.threadConnection
|
||||||
|
|
||||||
|
#TODO: test get_register_field with cls.possible_actions inheritance
|
||||||
|
|||||||
Reference in New Issue
Block a user