Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 76bb9dae7 -> 82fffb201


fixing AIRAVATA-2038 : Email address entered for job notifications are not 
displayed in Experiment Summary or in Edit Experiment


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/82fffb20
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/82fffb20
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/82fffb20

Branch: refs/heads/develop
Commit: 82fffb201b8054935515fcdc0ea115de6e5dff3a
Parents: 76bb9da
Author: scnakandala <[email protected]>
Authored: Wed Nov 23 11:36:33 2016 -0500
Committer: scnakandala <[email protected]>
Committed: Wed Nov 23 11:36:33 2016 -0500

----------------------------------------------------------------------
 app/views/partials/experiment-inputs.blade.php | 24 +++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/82fffb20/app/views/partials/experiment-inputs.blade.php
----------------------------------------------------------------------
diff --git a/app/views/partials/experiment-inputs.blade.php 
b/app/views/partials/experiment-inputs.blade.php
index b9ac2cf..e2007fa 100644
--- a/app/views/partials/experiment-inputs.blade.php
+++ b/app/views/partials/experiment-inputs.blade.php
@@ -109,15 +109,31 @@
 
     <div class="form-group well">
         <label for=""></label>
-        <input type="checkbox" id="enableEmail" name="enableEmailNotification" 
value="1"> Do you want to receive email
+        <?php
+            $emails = $expInputs['experiment']->emailAddresses;
+            $hasEmails = false;
+            if(!empty($emails) and count($emails) > 0){
+                $hasEmails=true;
+            }
+        ?>
+        <input type="checkbox" id="enableEmail" name="enableEmailNotification" 
value="1" <?php if($hasEmails) echo 'checked' ?>> Do you want to receive email
         notifications for status changes in the experiment?<br/>
 
-        <div class="emailSection hide">
+        <div class="emailSection <?php if(!$hasEmails) echo "hide"?>">
             <h4>Enter Email Address here.</h4>
 
             <div class="emailAddresses">
-                <input type="email" id="emailAddresses" class="form-control" 
name="emailAddresses[]"
-                       placeholder="Email"/>
+                <?php
+                    if($hasEmails){
+                        foreach($emails as $email){
+                            echo '<input type="email" id="emailAddresses" 
class="form-control" name="emailAddresses[]"
+                       placeholder="Email" value="'.$email.'"/>';
+                        }
+                    }else{
+                        echo '<input type="email" id="emailAddresses" 
class="form-control" name="emailAddresses[]"
+                       placeholder="Email"/>';
+                    }
+                ?>
             </div>
             <button type="button" class="addEmail btn btn-default">Add another 
Email</button>
         </div>

Reply via email to