[vhffs-dev] [1925] fixed newsletter registration

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1925
Author:   gradator
Date:     2012-01-22 23:57:56 +0100 (Sun, 22 Jan 2012)
Log Message:
-----------
fixed newsletter registration

Modified Paths:
--------------
    trunk/TODO
    trunk/vhffs-api/src/Vhffs/Panel/Subscribe.pm
    trunk/vhffs-panel/templates/user/prefs.tt

Modified: trunk/TODO
===================================================================
--- trunk/TODO	2012-01-22 21:54:23 UTC (rev 1924)
+++ trunk/TODO	2012-01-22 22:57:56 UTC (rev 1925)
@@ -2,14 +2,6 @@
 
 ECML : https://developer.mozilla.org/en/How_to_Turn_Off_Form_Autocompletion
 
-tester user mail
-
-tester user newsletter
-
-tester group mail
-
-yop (Sylvain Rochet)\xC2 -\xC2 Waiting for creation  // utf8 issue
-
 tester les tags
 
 clean description new object (\r)

Modified: trunk/vhffs-api/src/Vhffs/Panel/Subscribe.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Subscribe.pm	2012-01-22 21:54:23 UTC (rev 1924)
+++ trunk/vhffs-api/src/Vhffs/Panel/Subscribe.pm	2012-01-22 22:57:56 UTC (rev 1925)
@@ -162,7 +162,7 @@
 	
 		if( $vhffs->get_config->get_service_availability('newsletter') ) {
 			my $conf = $vhffs->get_config->get_service('newsletter');
-			$vars->{newsletter} = { prompt => ($conf->{'collectmode'} eq 'active_optout' ? gettext('Don\'t subscribe to the newsletter') : gettext('Subscribe to the newsletter') ) };
+			$vars->{newsletter} = { prompt => ($conf->{'collectmode'} eq 'active_optout' ? gettext('Don\'t subscribe to the newsletter') : gettext('Subscribe to the newsletter') ) } if $conf->{'collectmode'} ne 'passive_optout' and $conf->{'collectmode'} ne 'permanent';
 			$vars->{newsletter_checked} = 1 if $conf->{'collectmode'} eq 'passive_optin' and not defined $submitted;
 		}
 	

Modified: trunk/vhffs-panel/templates/user/prefs.tt
===================================================================
--- trunk/vhffs-panel/templates/user/prefs.tt	2012-01-22 21:54:23 UTC (rev 1924)
+++ trunk/vhffs-panel/templates/user/prefs.tt	2012-01-22 22:57:56 UTC (rev 1925)
@@ -78,7 +78,7 @@
 [% IF newsletter.active %]
 				<p>
 					<label for="newsletter">[% 'Subscribe to newsletter' | i18n | html %]</label>
-					<input type="checkbox" name="newsletter" id="newsletter"[% ' selected="selected"' IF newsletter.subscribed %]/>
+					<input type="checkbox" name="newsletter" id="newsletter"[% ' checked="checked"' IF newsletter.subscribed %]/>
 				</p>
 [% END %]
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/