Merge lp:~joey/linaro-wordpress-registration-form/lce12updatesv2 into lp:linaro-wordpress-registration-form

Proposed by Joey Stanford
Status: Merged
Approved by: James Tunnicliffe
Approved revision: 64
Merged at revision: 63
Proposed branch: lp:~joey/linaro-wordpress-registration-form/lce12updatesv2
Merge into: lp:linaro-wordpress-registration-form
Diff against target: 192 lines (+32/-69)
1 file modified
linaro_connect.php (+32/-69)
To merge this branch: bzr merge lp:~joey/linaro-wordpress-registration-form/lce12updatesv2
Reviewer Review Type Date Requested Status
James Tunnicliffe (community) Approve
Данило Шеган Pending
Review via email: mp+118600@code.launchpad.net

Description of the change

Several changes requested by Arwen to customize the form. Mostly textual changes but there are some form changes around travel details.

To post a comment you must log in.
Revision history for this message
James Tunnicliffe (dooferlad) wrote :

Looks fine to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'linaro_connect.php'
--- linaro_connect.php 2012-08-02 15:44:09 +0000
+++ linaro_connect.php 2012-08-07 17:08:23 +0000
@@ -17,7 +17,7 @@
1717
18Greetings from Linaro Connect!18Greetings from Linaro Connect!
1919
20Congratulations on registering LCE12 at the Bella Center, Copenhagen, 20Congratulations on registering for LCE12 at the Bella Center, Copenhagen,
21- where you can expect another great week of planning,21- where you can expect another great week of planning,
22discussing and hacking the future of Linux on ARM.22discussing and hacking the future of Linux on ARM.
2323
@@ -208,7 +208,7 @@
208 " JOIN wp_em_locations ".208 " JOIN wp_em_locations ".
209 " ON wp_em_events.location_id = wp_em_locations.location_id ".209 " ON wp_em_events.location_id = wp_em_locations.location_id ".
210 " WHERE event_end_date >= CURRENT_DATE AND ".210 " WHERE event_end_date >= CURRENT_DATE AND ".
211 " event_name LIKE \"%Linaro Connect%\" ".211 " event_name LIKE \"%lce12%\" ".
212 " ORDER BY event_end_date LIMIT 1");212 " ORDER BY event_end_date LIMIT 1");
213 }213 }
214214
@@ -223,7 +223,7 @@
223 " ON wp_em_events.location_id = wp_em_locations.location_id ".223 " ON wp_em_events.location_id = wp_em_locations.location_id ".
224 " JOIN wp_connect_attendees ".224 " JOIN wp_connect_attendees ".
225 " ON wp_em_events.event_id = wp_connect_attendees.event_id ".225 " ON wp_em_events.event_id = wp_connect_attendees.event_id ".
226 " WHERE event_name LIKE \"%Linaro Connect%\" AND ".226 " WHERE event_name LIKE \"%lce12%\" AND ".
227 " wp_em_events.event_id != $current_id ".227 " wp_em_events.event_id != $current_id ".
228 " HAVING COUNT(wp_connect_attendees.user_id) > 0 ".228 " HAVING COUNT(wp_connect_attendees.user_id) > 0 ".
229 " ORDER BY event_end_date DESC");229 " ORDER BY event_end_date DESC");
@@ -346,9 +346,11 @@
346 $destination_country = $countries[$event->location_country];346 $destination_country = $countries[$event->location_country];
347347
348 return <<<EOT348 return <<<EOT
349 <div><label for="visa_status">Do you need a new visa to enter $destination_country?*</label></div>349 <div><label for="visa_status">Visa: Business invitation letter *</label></div>
350 <div>{$visa}</div>350 <div>{$visa}</div>
351351 <div>
352 <p>(Do you require an invitation letter to apply for a travel visa?).</p>
353 </div>
352 <div id="visa_details" class="section {$css_class}">354 <div id="visa_details" class="section {$css_class}">
353 <div>355 <div>
354 It is essential you make sure the following information is precise and356 It is essential you make sure the following information is precise and
@@ -401,58 +403,20 @@
401 static function getTravelFields($data) {403 static function getTravelFields($data) {
402 return <<<EOT404 return <<<EOT
403 <div id="travel_details">405 <div id="travel_details">
404 <div><label>Arrival &amp; Departure Details:*</label></div>406 <div><label>Conference attendance arrival date *</label></div>
405 <table>407 <div><p>Mon 29 Oct - Fri 2 Nov</p></div>
406 <thead><tr>408 <div>
407 <th><label for="flight_arrival">Arrival flight number</label></th>409 <input name="attendance_from_date" type="text"
408 <th><label for="check_in">Date</label></th>410 id="attendance_from_date"
409 <th><label for="check_in_time">Approx time (HH:MM)</label></th>411 value="{$data[attendance_from_date]}" class="date"/>
410 </thead></tr>412 </div>
411 <tr>413 <div><label for="visa_passport_expiry">Conference attendance departure date *</label></div>
412 <td><input name="flight_arrival" type="text" id="flight_arrival"414 <div><p>Mon 29 Oct - Fri 2 Nov</p></div>
413 value="{$data[flight_arrival]}" /></td>415 <div>
414 <td><input name="check_in" type="text" id="check_in"416 <input name="attendance_to_date" type="text"
415 value="{$data[check_in]}" class="date"/></td>417 id="attendance_to_date"
416 <td><input name="check_in_time" type="text" id="check_in_time"418 value="{$data[attendance_to_date]}" class="date"/>
417 value="{$data[check_in_time]}" class="time"/></td>419 </div>
418 </tr>
419 <thead><tr>
420 <th><label for="flight_departure">Departure flight number</label></th>
421 <th><label for="check_out">Date</label></th>
422 <th><label for="check_out_time">Approx time (HH:MM)</label></th>
423 </thead></tr>
424 <tr>
425 <td><input name="flight_departure" type="text" id="flight_departure"
426 value="{$data[flight_departure]}" /></td>
427 <td><input name="check_out" type="text" id="check_out"
428 value="{$data[check_out]}" class="date"/></td>
429 <td><input name="check_out_time" type="text" id="check_out_time"
430 value="{$data[check_out_time]}" class="time"/></td>
431 </tr>
432 </table>
433 <div><label>Conference Attendance Details:*</label></div>
434 <table>
435 <thead><tr>
436 <th><label for="attendance_from_date">Start Date</label></th>
437 <th><label for="attendance_from_time">Time</label></th>
438 <th><label for="attendance_to_date">End Date</label></th>
439 <th><label for="attendance_to_time">Time</label></th>
440 </thead></tr>
441 <tr>
442 <td><input name="attendance_from_date" type="text"
443 id="attendance_from_date"
444 value="{$data[attendance_from_date]}" class="date"/></td>
445 <td><input name="attendance_from_time" type="text"
446 id="attendance_from_time"
447 value="{$data[attendance_from_time]}" class="time"/></td>
448 <td><input name="attendance_to_date" type="text"
449 id="attendance_to_date"
450 value="{$data[attendance_to_date]}" class="date"/></td>
451 <td><input name="attendance_to_time" type="text"
452 id="attendance_to_time"
453 value="{$data[attendance_to_time]}" class="time"/></td>
454 </tr>
455 </table>
456 </div>420 </div>
457EOT;421EOT;
458 }422 }
@@ -577,8 +541,8 @@
577 important you complete registration as soon as possible as these details541 important you complete registration as soon as possible as these details
578 help Linaro organise a successful event.</p>542 help Linaro organise a successful event.</p>
579543
580 <p>When you are ready to complete your registration, click the Register 544 <p>When you are ready to complete your registration, click the Register Now
581 Now button on the <a href=\"http://connect.linaro.org/\">LCE12545 button on the <a href=\"http://connect.linaro.org/\">LCE12
582 website</a>.</p>";546 website</a>.</p>";
583 self::emailSaved($registration, $user, $event);547 self::emailSaved($registration, $user, $event);
584 return str_replace(self::form_tag, $warn, $text);548 return str_replace(self::form_tag, $warn, $text);
@@ -628,7 +592,7 @@
628 <div><label for="first_name">First name:*</label></div>592 <div><label for="first_name">First name:*</label></div>
629 <div><input name="first_name" type="text" id="first_name"593 <div><input name="first_name" type="text" id="first_name"
630 value="{$data[first_name]}" /></div>594 value="{$data[first_name]}" /></div>
631 <div><label for="last_name">Last name:*</label></div>595 <div><label for="last_name">Family name:*</label></div>
632 <div><input name="last_name" type="text" id="last_name"596 <div><input name="last_name" type="text" id="last_name"
633 value="{$data[last_name]}" /></div>597 value="{$data[last_name]}" /></div>
634 <div><label for="email">Email:*</label></div>598 <div><label for="email">Email:*</label></div>
@@ -638,13 +602,13 @@
638 <p>This email will be used to provide event details.602 <p>This email will be used to provide event details.
639 We will not pass your email on to any third parties.</p>603 We will not pass your email on to any third parties.</p>
640 </div>604 </div>
641 <div><label for="lp_name">Launchpad user name:*</label></div>605 <div><label for="lp_name">Launchpad ID:*</label></div>
642 <div><input name="lp_name" type="text" id="lp_name" readonly="readonly"606 <div><input name="lp_name" type="text" id="lp_name" readonly="readonly"
643 value="{$data[lp_name]}" disabled="disabled"/></div>607 value="{$data[lp_name]}" disabled="disabled"/></div>
644 <div><label for="irc_name">IRC Nickname:*</label></div>608 <div><label for="irc_name">IRC Nickname:*</label></div>
645 <div><input name="irc_name" type="text" id="irc_nickname"609 <div><input name="irc_name" type="text" id="irc_nickname"
646 value="{$data[irc_name]}"/></div>610 value="{$data[irc_name]}"/></div>
647 <div><label for="phone">Phone:</label></div>611 <div><label for="phone">MObile Phone Number:</label></div>
648 <div><input name="phone" type="text" id="phone"612 <div><input name="phone" type="text" id="phone"
649 value="{$data[phone]}" /></div>613 value="{$data[phone]}" /></div>
650 <div><label for="company_select">Company:*</label></div>614 <div><label for="company_select">Company:*</label></div>
@@ -655,18 +619,18 @@
655 <div><label for="job_title">Job Title:*</label></div>619 <div><label for="job_title">Job Title:*</label></div>
656 <div><input name="job_title" type="text" id="job_title"620 <div><input name="job_title" type="text" id="job_title"
657 value="{$data[job_title]}" /></div>621 value="{$data[job_title]}" /></div>
658 <div><label for="linaro_team">Linaro Engineering team:*</label></div>622 <div><label for="linaro_team">Linaro team:*</label></div>
659 <div>{$team}</div>623 <div>{$team}</div>
660 <div><label for="attendance_type">Attending:*</label></div>624 <div><label for="attendance_type">Attendance type:*</label></div>
661 <div>{$attendance}</div>625 <div>{$attendance}</div>
662 <div id="attendance_details" class="{$attendance_css_class}">626 <div id="attendance_details" class="{$attendance_css_class}">
663 <div><label for="dietary">Dietary requirements:</label></div>627 <div><label for="dietary">Special dietary requirements:</label></div>
664 <div><input name="dietary" type="text" id="dietary"628 <div><input name="dietary" type="text" id="dietary"
665 value="{$data[dietary]}" /></div>629 value="{$data[dietary]}" /></div>
666 {$visa}630 {$visa}
667 {$travel}631 {$travel}
668 </div>632 </div>
669 <div><label for="comments">Comments:</label></div>633 <div><label for="comments">Additional comments:</label></div>
670 <div>634 <div>
671 <textarea name="comments" id="comments">{$data[comments]}</textarea>635 <textarea name="comments" id="comments">{$data[comments]}</textarea>
672 </div>636 </div>
@@ -774,13 +738,12 @@
774738
775 /* Ensures required fields are present. */739 /* Ensures required fields are present. */
776 static function validateRequiredData($values) {740 static function validateRequiredData($values) {
777 $required = array('first_name', 'last_name', 'irc_name', 'email', 'company',741 $required = array('first_name', 'last_name', 'irc_name', 'email', 'phone', 'company',
778 'linaro_team', 'attendance_type', 'visa_status', 'job_title');742 'linaro_team', 'attendance_type', 'visa_status', 'job_title');
779 $visa_required = array('visa_country', 'visa_address', 'visa_embassy_address',743 $visa_required = array('visa_country', 'visa_address', 'visa_embassy_address',
780 'visa_travel_start', 'visa_travel_end',744 'visa_travel_start', 'visa_travel_end',
781 'visa_passport_number', 'visa_passport_expiry');745 'visa_passport_number', 'visa_passport_expiry');
782 $attending_required = array('check_in', 'check_in_time',746 $attending_required = array();
783 'check_out', 'check_out_time');
784 $missing = array();747 $missing = array();
785 foreach ($required as $key) {748 foreach ($required as $key) {
786 if (!isset($values[$key]) or trim($values[$key])==='' or $values[$key]===NULL) {749 if (!isset($values[$key]) or trim($values[$key])==='' or $values[$key]===NULL) {

Subscribers

People subscribed via source and target branches