Pavan Koli has proposed merging lp:~pskoli93/postorius/Helptext-Fixes into
lp:postorius.
Requested reviews:
Mailman Coders (mailman-coders)
For more details, see:
https://code.launchpad.net/~pskoli93/postorius/Helptext-Fixes/+merge/257460
If we go to a list settings page and click on the question mark to open the
more info tab, a new tab opens with an error that ListSettings is not defined
globally.
Initially a ListSettings form was there but now different forms have been
created for different list tasks like ListIdentityForm,
ListAutomaticResponseForm etc. In all these forms if a user clicks on more info
tab the 'formid' is equal to 'list_settings' and every form has the same
'formid', so there is no clear way to identify for which forms' option the more
info is sought.
The solution to this is that a separate list(Python list) has been created for
the separate forms with the 'helpid' stored in these lists(Python list). Now if
a user clicks on more info tab we check which list(Python list) it corresponds
to, by comparing the 'helpid', and then loading the appropriate help text from
the appropriate form.
--
Your team Mailman Coders is requested to review the proposed merge of
lp:~pskoli93/postorius/Helptext-Fixes into lp:postorius.
=== modified file 'src/postorius/views/user.py'
--- src/postorius/views/user.py 2015-04-15 22:53:02 +0000
+++ src/postorius/views/user.py 2015-04-25 13:26:21 +0000
@@ -331,11 +331,42 @@
template='postorius/more_info_display.html'):
"""Displays more_info in new tab.
"""
+ list_identity_helpid=['advertised','display_name','mail_host','description',
+ 'subject_prefix']
+ list_automatic_responses_helpid=['autorespond_owner','autoresponse_owner_text',
+ 'autorespond_postings','autoresponse_postings_text','autorespond_requests',
+ 'autoresponse_request_text','autoresponse_grace_period','send_welcome_message',
+ 'welcome_message_uri','admin_immed_notify','admin_notify_mchanges']
+ alter_messages_helpid=['filter_content','collapse_alternatives',
+ 'convert_html_to_plaintext','anonymous_list','include_rfc2369_headers',
+ 'allow_list_posts','reply_to_address','first_strip_reply_to','reply_goes_to_list',
+ 'posting_pipeline']
+ digest_settings_helpid=['digest_size_threshold']
+ message_acceptance_helpid=['acceptable_aliases','administrivia',
+ 'default_member_action','default_nonmember_action']
+ archive_policy_settings_helpid=['archive_policy']
+ list_subscription_policy_helpid=['subscription_policy']
- if(formid == 'list_settings'):
- form = ListSettings(
- visible_section='List Identity',
- visible_option='None',
+ if(helpid in list_identity_helpid):
+ form = ListIdentityForm(
+ data=request.POST)
+ elif(helpid in list_automatic_responses_helpid):
+ form = ListAutomaticResponsesForm(
+ data=request.POST)
+ elif(helpid in alter_messages_helpid):
+ form = AlterMessagesForm(
+ data=request.POST)
+ elif(helpid in digest_settings_helpid):
+ form = DigestSettingsForm(
+ data=request.POST)
+ elif(helpid in message_acceptance_helpid):
+ form = MessageAcceptanceForm(
+ data=request.POST)
+ elif(helpid in archive_policy_settings_helpid):
+ form = ArchivePolicySettingsForm(
+ data=request.POST)
+ elif(helpid in list_subscription_policy_helpid):
+ form = ListSubscriptionPolicyForm(
data=request.POST)
for field in form:
_______________________________________________
Mailman-coders mailing list
[email protected]
https://mail.python.org/mailman/listinfo/mailman-coders