blob: 02fc11b01cdcfb7c4f07c9e726a5a7dc5958e000 [file] [log] [blame]
<?php
#*****************************************************************************
#
# en_cq_part2.inc
#
# Author: Denis Roy & others
# Date: 2006-08-24
#
# Description: UI for contribution questionnaire third party package info
#
# HISTORY:
#
#****************************************************************************
include("../html/header.php");
$Menu = new Menu("en");
include("../modules/menu.php");
$pkgCount = 0;
$strRequired = "<font class=\"red\">*</font>";
?>
<br />
<td width="100%" valign="top" class="normal">
<font class="large_title">Contribution Questionnaire - Third-party Packages</font><br /><br />
<table border=0 cellspacing=5 cellpadding=2 width="100%" >
<tr><td>
<form name="form1" method="post" action="cq_post.php">
<table width="100%" border="0">
<tr>
<td colspan="2"><p><strong>3rd Party Package Information</strong></p><br /></td>
</tr>
<?php
for($i = 0; $i < count($pkgList); $i++) {
if($pkgList[$i] != "") {
$pkgCount++;
if($i > 0) {
echo "<tr><td>&#160;</td></tr>";
echo "<tr><td colspan=2><hr /></td></tr>";
echo "<tr><td>&#160;</td></tr>";
}
?>
<tr>
<td width="22%">Package Name: <?= $strRequired ?> </td>
<td width="78%"><input type="text" size="60" name="pkgName<?= $i ?>" value="<?= $pkgList[$i] ?>" />
</td>
</tr>
<tr>
<td>Package Version: <?= $strRequired ?> </td>
<td><input type="text" size="60" name="pkgVersion<?= $i ?>" />
</td>
</tr>
<tr>
<td>Link to Package Source: <?= $strRequired ?> </td>
<td><input type="text" size="60" name="pkgSource<?= $i ?>" />
</td>
</tr>
<tr>
<td>&#160;</td>
<td>
<font class="small"><b>Note: </b>Please provide a link to source related to either the source you intend to distribute
or the source related to the binary you intend to distribute.</font>
</td>
</tr>
<tr><td>&#160;</td></tr>
<tr>
<td>License Name: <?= $strRequired ?> </td>
<td><input type="text" size="60" name="pkgLicense<?= $i ?>" />
</td>
<tr>
<td>Link to Package License: <?= $strRequired ?> </td>
<td><input type="text" size="60" name="pkgLicenseType<?= $i ?>" /></td>
</tr>
<tr>
<td valign="top"><p>Supporting Information: </p>
<p>Please provide details about the content, authors, and the licenses and/or agreements that permit the content to be contributed to Eclipse Foundation:</p></td>
<td><textarea cols="60" rows="10" name="otherAuthors<?= $i ?>"></textarea></td>
</tr>
<tr>
<td>Committer</td>
<td>
<select name="committer_id<?= $i ?>">
<option value="" />
<?php
mysql_data_seek($rs_profiles, 0);
while($myrow = mysql_fetch_assoc($rs_profiles)) {
$strSelected = "";
if($LDAPPerson->getUid() == $myrow['extern_id']) {
$strSelected = "selected=\"selected\"";
}
?>
<option value="<?= $myrow['extern_id'] . "|" . $myrow['realname'] ?>" <?= $strSelected ?>><?= $myrow['realname'] ?></option>
<?php
}
?>
</select>
</td>
</tr>
<?php
}
}
?>
<tr><td colspan="2">&nbsp;</td></tr>
<br />
</table>
<input type="hidden" name="c" value="<?= $_ContributionID ?>" />
<input type="hidden" name="cqtype" value="nonepl" />
<input type="hidden" name="projectlead_id" value="<?= $projectlead_id ?>" />
<input type="button" name="Submit" value="Submit your questionnaire" onclick="fnValidForm();" />
</form>
</td>
<script language="javascript">
function fnValidForm() {
for(i = 0; i < <?= $pkgCount ?>; i++) {
document.form1.elements['pkgName' + i].className = "";
document.form1.elements['pkgVersion' + i].className = "";
document.form1.elements['pkgSource' + i].className = "";
document.form1.elements['pkgLicense' + i].className = "";
document.form1.elements['pkgLicenseType' + i].className = "";
if(document.form1.elements['pkgName' + i].value == "") {
document.form1.elements['pkgName' + i].className = "inputInvalid";
document.form1.elements['pkgName' + i].focus();
alert("Please type a name for this package.");
return false;
}
if(document.form1.elements['pkgVersion' + i].value == "") {
document.form1.elements['pkgVersion' + i].className = "inputInvalid";
document.form1.elements['pkgVersion' + i].focus();
alert("Please type a version for this package.");
return false;
}
if(document.form1.elements['pkgSource' + i].value == "") {
document.form1.elements['pkgSource' + i].className = "inputInvalid";
document.form1.elements['pkgSource' + i].focus();
alert("Please enter the source URL for this package.");
return false;
}
if(document.form1.elements['pkgLicense' + i].value == "") {
document.form1.elements['pkgLicense' + i].className = "inputInvalid";
document.form1.elements['pkgLicense' + i].focus();
alert("Please enter the license name for this package.");
return false;
}
if(document.form1.elements['pkgLicenseType' + i].value == "") {
document.form1.elements['pkgLicenseType' + i].className = "inputInvalid";
document.form1.elements['pkgLicenseType' + i].focus();
alert("Please enter the link for the license for this package.");
return false;
}
}
document.form1.submit();
}
</script>
<?php
include("../html/footer.php");
?>