You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2015/10/07 23:06:17 UTC
airavata-php-gateway git commit: Adding metadata to FILE input
Repository: airavata-php-gateway
Updated Branches:
refs/heads/master a1e038072 -> 8e1021450
Adding metadata to FILE input
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/8e102145
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/8e102145
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/8e102145
Branch: refs/heads/master
Commit: 8e1021450467e008ec88ab5e36665e41904fe733
Parents: a1e0380
Author: scnakandala <su...@gmail.com>
Authored: Wed Oct 7 17:03:16 2015 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Wed Oct 7 17:03:16 2015 -0400
----------------------------------------------------------------------
app/libraries/ExperimentUtilities.php | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/8e102145/app/libraries/ExperimentUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index 3055d57..a1fa60c 100644
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -535,13 +535,24 @@ class ExperimentUtilities
</div>';
break;
case DataType::URI:
- echo '<div class="form-group">
- <label for="experiment-input">' . $input->name . '</label>
- <input class="file-input" type="file" name="' . $input->name .
- '" id="' . $input->name . '" ' . $required . '>
- <p class="help-block">' . $input->userFriendlyDescription . '</p>
- </div>';
- break;
+ if(!empty($input->metadata)){
+ echo '<div class="form-group">
+ <label for="experiment-input">' . $input->name . '</label>
+ <input class="file-input" type="text" name="' . $input->name .
+ '" id="' . $input->name . '" ' . $required . '>
+ <p class="help-block">' . $input->userFriendlyDescription . '</p>
+ </div>';
+ break;
+ }else{
+ echo '<div class="form-group">
+ <label for="experiment-input">' . $input->name . '</label>
+ <input class="file-input" type="file" name="' . $input->name .
+ '" id="' . $input->name . '" ' . $required . '>
+ <p class="help-block">' . $input->userFriendlyDescription . '</p>
+ </div>';
+ break;
+ }
+
default:
CommonUtilities::print_error_message('Input data type not supported!
Please file a bug report using the link in the Help menu.');