svn: /pear/pearweb/trunk/public_html/ account-request-existingpackage.php account-request-newpackage.php account-request-vote.php

From: Date: Wed, 13 Apr 2011 03:15:38 +0000
Subject: svn: /pear/pearweb/trunk/public_html/ account-request-existingpackage.php account-request-newpackage.php account-request-vote.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-9887@lists.php.net to get a copy of this message
clockwerx Wed, 13 Apr 2011 03:15:38 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=310189 Log: Checkbox behaviour Changed paths: U pear/pearweb/trunk/public_html/account-request-existingpackage.php U pear/pearweb/trunk/public_html/account-request-newpackage.php U pear/pearweb/trunk/public_html/account-request-vote.php Modified: pear/pearweb/trunk/public_html/account-request-existingpackage.php =================================================================== --- pear/pearweb/trunk/public_html/account-request-existingpackage.php 2011-04-13 03:05:05 UTC (rev 310188) +++ pear/pearweb/trunk/public_html/account-request-existingpackage.php 2011-04-13 03:15:38 UTC (rev 310189) @@ -52,14 +52,14 @@ $display_form = true; } - if (empty($stripped['comments_read'])) { + if (empty($stripped['read_everything']['comments_read'])) { $errors[] = 'Obviously you did not read all the comments' . ' concerning the need for an account. Please read ' . 'them again.'; $display_form = true; } - if (isset($_POST['purpose']) && count($_POST['purpose'])) { + if (isset($_POST['purposecheck']) && count($_POST['purposecheck'])) { $errors[] = 'The purpose(s) you selected do not require a PEAR account.'; $display_form = true; } @@ -93,10 +93,6 @@ break; } - if (!empty($stripped['jumpto'])) { - $jumpto = $stripped['jumpto']; - } - if (isset($stripped['display_form'])) { $display_form = $stripped['display_form']; } @@ -216,7 +212,7 @@ $hsc = array_map('htmlspecialchars', $stripped); // Set defaults for the form elements - $form->setDefaults(array( + $form->addDataSource(new HTML_QuickForm2_DataSource_Array(array( 'handle' => @$hsc['handle'], 'firstname' => @$hsc['firstname'], 'lastname' => @$hsc['lastname'], @@ -226,8 +222,8 @@ 'purpose' => @$hsc['purpose'], 'homepage' => @$hsc['homepage'], 'moreinfo' => @$hsc['moreinfo'], - 'comments_read' => @$hsc['comments_read'], - )); + 'read_everything' => @$hsc['read_everything'], + ))_; $form->addElement('text', 'handle', array('placeholder' => 'psmith', 'maxlength' => "20", 'accesskey' => "r", 'required' => 'required'))->setLabel('Use<span class="accesskey">r</span>name:'); $form->addElement('text', 'firstname', array('placeholder' => 'Peter', 'required' => 'required'))->setLabel('First Name:'); @@ -247,11 +243,11 @@ 'Download PEAR Packages.', ); - $purpose = $form->addGroup('purpose')->setLabel('Purpose of your PEAR account:'); + $purpose = $form->addGroup('purposecheck')->setLabel('Purpose of your PEAR account:'); $checkbox = array(); foreach ($invalid_purposes as $i => $purposeKey) { - $purpose->addElement('checkbox', $i, array('checked' => !empty($_POST['purpose'][$i])? 'checked' : '')) + $purpose->addElement('checkbox', $i, array('checked' => !empty($_POST['purposecheck'][$i])? 'checked' : '')) ->setLabel($purposeKey); } Modified: pear/pearweb/trunk/public_html/account-request-newpackage.php =================================================================== --- pear/pearweb/trunk/public_html/account-request-newpackage.php 2011-04-13 03:05:05 UTC (rev 310188) +++ pear/pearweb/trunk/public_html/account-request-newpackage.php 2011-04-13 03:15:38 UTC (rev 310189) @@ -62,7 +62,7 @@ $display_form = true; } - if (isset($_POST['purpose']) && count($_POST['purpose'])) { + if (isset($_POST['purposecheck']) && count($_POST['purposecheck'])) { $errors[] = 'The purpose(s) you selected do not require a PEAR account.'; $display_form = true; } @@ -217,7 +217,7 @@ 'sourcecode' => @$hsc['sourcecode'], 'homepage' => @$hsc['homepage'], 'moreinfo' => @$hsc['moreinfo'], - 'comments_read' => @$hsc['comments_read'], + 'read_everything' => @$hsc['read_everything'], ))); $form->addElement('text', 'handle', array('placeholder' => 'psmith', 'maxlength' => "20", 'accesskey' => "r", 'required' => 'required'))->setLabel('Use<span class="accesskey">r</span>name:'); @@ -239,12 +239,12 @@ 'Browse ' . PEAR_CHANNELNAME . '.' ); - $purpose = $form->addGroup('purpose')->setLabel('Purpose of your PEAR account:'); + $purpose = $form->addGroup('purposecheck')->setLabel('Purpose of your PEAR account:'); $checkbox = array(); foreach ($invalid_purposes as $i => $purposeKey) { - $purpose->addElement('checkbox', $i, array('checked' => !empty($_POST['purpose'][$i])? 'checked' : '')) - ->setLabel($purposeKey); + $purpose->addElement('checkbox', $i, array('checked' => !empty($_POST['purposecheck'][$i])? 'checked' : '')) + ->setLabel($purposeKey)->setValue(1); } $form->addElement('textarea', 'purpose', Modified: pear/pearweb/trunk/public_html/account-request-vote.php =================================================================== --- pear/pearweb/trunk/public_html/account-request-vote.php 2011-04-13 03:05:05 UTC (rev 310188) +++ pear/pearweb/trunk/public_html/account-request-vote.php 2011-04-13 03:15:38 UTC (rev 310189) @@ -53,7 +53,7 @@ $display_form = true; } - if (empty($stripped['comments_read'])) { + if (empty($stripped['read_everything']['comments_read'])) { $errors[] = 'Obviously you did not read all the comments' . ' concerning the need for an account. Please read ' . 'them again.'; @@ -82,10 +82,6 @@ break; } - if (!empty($stripped['jumpto'])) { - $jumpto = $stripped['jumpto']; - } - if (isset($stripped['display_form'])) { $display_form = $stripped['display_form']; } @@ -199,7 +195,7 @@ 'lastname' => @$hsc['lastname'], 'email' => @$hsc['email'], 'showemail' => @$hsc['showemail'], - 'comments_read' => @$hsc['comments_read'], + 'read_everything' => @$hsc['read_everything'], ));

« previous php.pear.core (#9887) next »