[gnome-web-www/wptest] show thank you message after sending the apply form



commit e7c729512ed2c005265a81eb4f301e9b716f8d88
Author: Vinicius Depizzol <vdepizzol gmail com>
Date:   Tue Feb 14 19:25:01 2012 -0200

    show thank you message after sending the apply form

 theme/page-apply.php |  253 ++++++++++++++++++++++++++-----------------------
 1 files changed, 134 insertions(+), 119 deletions(-)
---
diff --git a/theme/page-apply.php b/theme/page-apply.php
index 9991bee..c03bb8e 100644
--- a/theme/page-apply.php
+++ b/theme/page-apply.php
@@ -3,7 +3,9 @@
 
 if (array_key_exists('submit', $_POST)) {
 
+    $application_submitted = true;
     $errors = false;
+    $application_sent = false;
     
     $full_name = trim(stripslashes($_POST['full_name']));
     $email = trim(stripslashes($_POST['email']));
@@ -32,10 +34,10 @@ if (array_key_exists('submit', $_POST)) {
                     "Contribuitions Summary:\n" .
                     $summary . "\n\n" .
                     
-                    "Foundation Previous Participation\n" .
+                    "Foundation Previous Participation:\n" .
                     $previous_participation . "\n\n" .
                     
-                    "[Application received at " . date("D M j G:i:s Y") . " (Eastern time)]" .
+                    "[Application received at " . date("D M j G:i:s Y") . " (Eastern time)]" . "\n\n".
                     
                     "If you have any questions, you can contact the Membership Committee by\n" .
                     "replying to this mail. Please note that it usually takes up to a week for an application to be fully processed.";
@@ -45,9 +47,13 @@ if (array_key_exists('submit', $_POST)) {
        
         $subject = "Application received from " . $full_name . " (" . $obfuscated_email . ")";
         
-        mail("membership-applications gnome org", $subject, $formmail, $headers);
+        $application_sent = mail("membership-applications gnome org", $subject, $formmail, $headers);
 
     }
+} else {
+
+    $application_submitted = false;
+
 }
 
 
@@ -60,129 +66,138 @@ if (array_key_exists('submit', $_POST)) {
             <?php require_once('inc/page-title.php'); ?>
             
             <div class="content without_sidebar">
+            
+                <?php if ($application_submitted == true && $application_sent == true): ?>
+                    
+                    <h1 style="text-align: center">Thank you.</h1>
+                    <p class="main_feature" style="text-align: center;">Your application has been submitted and it'll be reviewed by the GNOME Foundation Membership Committee within two weeks.</p>
                 
-                <?php while ( have_posts() ) : the_post(); ?>
-                    <?php the_content(); ?>
-                <?php endwhile; // End the loop. Whew. ?>
+                <?php else: ?>
                 
-                <hr class="top_shadow" />
+                    <?php while ( have_posts() ) : the_post(); ?>
+                        <?php the_content(); ?>
+                    <?php endwhile; // End the loop. Whew. ?>
+                    
+                    <hr class="top_shadow" />
 
-                <h2 style="text-align: center;">Application Form</h2>
+                    <h2 style="text-align: center;">Application Form</h2>
 
 
-                <form action="" method="post" id="application_form">
+                    <form action="" method="post" id="application_form">
 
-                    <style type="text/css">
-                    
-                        #application_form {
-                            margin-top: 30px;
-                            padding: 30px;
-                            border: 1px solid #ccc;
-                            background: #eeeeec;
-                            -moz-border-radius: 5px;
-                            -webkit-border-radius: 5px;
-                            border-radius: 5px;
-                        }
-                        #application_form h3:first-of-type {
-                            margin-top: 0;
-                        }
-                        #application_form h3 {
-                            border-bottom: 1px solid #ccc;
-                        }
-                        #application_form .item {
-                            margin: 20px 0;
-                            overflow: hidden;
-                            font-size: 15px;
-                        }
-                        #application_form .item label {
-                            display: block;
-                            float: left;
-                            width: 140px;
-                            text-align: right;
-                            margin-right: 10px;
-                            padding: 5px;
-                            font-weight: bold;
-                        }
-                        #application_form .item input[type="text"],
-                        #application_form .item .field {
-                            font: inherit;
-                            padding: 5px;
-                            width: 265px;
-                        }
-                        #application_form .item input[name="not_spam"] {
-                            width: 100px;
-                        }
-                        #application_form .item textarea {
-                            width: 100%;
-                            min-height: 130px;
-                            font: inherit;
-                            padding: 10px;
-                            -moz-box-sizing: border-box;
-                            -webkit-box-sizing: border-box;
-                            box-sizing: border-box;
-                            resize: vertical;
-                        }
-                        #application_form .submit_area {
-                            text-align: center;
-                        }
-                        #application_form .submit_area button {
-                            font-size: 18px;
-                            outline: 0;
-                        }
-                        #application_form .submit_area button:hover {
-                            cursor: pointer;
-                        }
-                    
-                    </style>
-                    
-                    <h3>Personal Information</h3>
+                        <style type="text/css">
+                        
+                            #application_form {
+                                margin-top: 30px;
+                                padding: 30px;
+                                border: 1px solid #ccc;
+                                background: #eeeeec;
+                                -moz-border-radius: 5px;
+                                -webkit-border-radius: 5px;
+                                border-radius: 5px;
+                            }
+                            #application_form h3:first-of-type {
+                                margin-top: 0;
+                            }
+                            #application_form h3 {
+                                border-bottom: 1px solid #ccc;
+                            }
+                            #application_form .item {
+                                margin: 20px 0;
+                                overflow: hidden;
+                                font-size: 15px;
+                            }
+                            #application_form .item label {
+                                display: block;
+                                float: left;
+                                width: 140px;
+                                text-align: right;
+                                margin-right: 10px;
+                                padding: 5px;
+                                font-weight: bold;
+                            }
+                            #application_form .item input[type="text"],
+                            #application_form .item .field {
+                                font: inherit;
+                                padding: 5px;
+                                width: 265px;
+                            }
+                            #application_form .item input[name="not_spam"] {
+                                width: 100px;
+                            }
+                            #application_form .item textarea {
+                                width: 100%;
+                                min-height: 130px;
+                                font: inherit;
+                                padding: 10px;
+                                -moz-box-sizing: border-box;
+                                -webkit-box-sizing: border-box;
+                                box-sizing: border-box;
+                                resize: vertical;
+                            }
+                            #application_form .submit_area {
+                                text-align: center;
+                            }
+                            #application_form .submit_area button {
+                                font-size: 18px;
+                                outline: 0;
+                            }
+                            #application_form .submit_area button:hover {
+                                cursor: pointer;
+                            }
+                        
+                        </style>
+                        
+                        <h3>Personal Information</h3>
 
-                    <div class="item">
-                        <label for="full_name">Full Name</label>
-                        <input name="full_name" id="full_name" type="text">
-                    </div>
-                    
-                    <div class="item">
-                        <label for="email">E-mail Address</label>
-                        <input name="email" id="email" type="text">
-                    </div>
-                    
-                    <h3>Contributions</h3>
-                    
-                    <div class="item">
-                        <p>
-                            Please list references to your contributions,
-                            i.e. BugZilla, Mailing Lists, commits or people to vouch for you. If
-                            you are a new applicant, it's definitely a great plus putting
-                            the name of a few contacts within the community that could vouch for
-                            you and your work for the GNOME Foundation (existing Foundation
-                            members preferred).
-                        </p>
-                        <textarea name="summary"></textarea>
-                    </div>
-                    
-                    <h3>Previous Foundation participation</h3>
-                    
-                    <div class="item">
-                        <p>
-                            Please tell us whether you were an existing 
-                            Foundation member or have done someting relevant for the GNOME 
-                            Foundation in the past (i.e Board Member etc.)
-                        </p>
-                        <textarea name="previous_participation"></textarea>
-                    </div>
-                    
-                    <hr />
-                    
-                    <div class="item" style="text-align: center;">
-                        <span>Please type ânot spamâ here:</span> <input type="text" name="not_spam">
-                    </div>
-                    
-                    <div class="submit_area">
-                        <button name="submit" type="submit" class="action_button">Submit Application</button>
-                    </div>
-                    
-                </form>
+                        <div class="item">
+                            <label for="full_name">Full Name</label>
+                            <input name="full_name" id="full_name" type="text">
+                        </div>
+                        
+                        <div class="item">
+                            <label for="email">E-mail Address</label>
+                            <input name="email" id="email" type="text">
+                        </div>
+                        
+                        <h3>Contributions</h3>
+                        
+                        <div class="item">
+                            <p>
+                                Please list references to your contributions,
+                                i.e. BugZilla, Mailing Lists, commits or people to vouch for you. If
+                                you are a new applicant, it's definitely a great plus putting
+                                the name of a few contacts within the community that could vouch for
+                                you and your work for the GNOME Foundation (existing Foundation
+                                members preferred).
+                            </p>
+                            <textarea name="summary"></textarea>
+                        </div>
+                        
+                        <h3>Previous Foundation participation</h3>
+                        
+                        <div class="item">
+                            <p>
+                                Please tell us whether you were an existing 
+                                Foundation member or have done someting relevant for the GNOME 
+                                Foundation in the past (i.e Board Member etc.)
+                            </p>
+                            <textarea name="previous_participation"></textarea>
+                        </div>
+                        
+                        <hr />
+                        
+                        <div class="item" style="text-align: center;">
+                            <span>Please type ânot spamâ here:</span> <input type="text" name="not_spam">
+                        </div>
+                        
+                        <div class="submit_area">
+                            <button name="submit" type="submit" class="action_button">Submit Application</button>
+                        </div>
+                        
+                    </form>
+                    
+                <?php endif; ?>
                 
                 <br />
                 <div class="clear"></div>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]