| <?php |
| #***************************************************************************** |
| # |
| # en_cq_epl.inc |
| # |
| # Author: Denis Roy & others |
| # Date: 2006-08-24 |
| # |
| # Description: UI for contribution questionnaire |
| # |
| # HISTORY: |
| # |
| #**************************************************************************** |
| |
| include("inc/en_cq_common.php"); |
| |
| ?> |
| <tr><td colspan="2"><p><strong>Contributor</strong></p> |
| |
| |
| <p>Note: All of the contributors should ensure that they possess the necessary rights to make the contribution under the terms and conditions set out in the <strong>Licensing</strong> section of the <a href="/legal/termsofuse.php">Terms Of Use</a>.<br> |
| <br> |
| </p> |
| </td></tr> |
| <tr><td></td><td><input type="radio" name="allMyCode" value="yes" /> I wrote 100% of the code in this contribution<?= $strRequired ?></td></tr> |
| <tr><td></td><td><input type="radio" name="allMyCode" value="no" /> I did not write 100% of the code in this contribution</td></tr> |
| |
| <tr><td> </td></tr> |
| <tr><td colspan="2">If you did not write 100% of the code in this contribution, please provide contact details for the contributor or the primary contributor if there is more than one.</td></tr> |
| <tr><td>Name </td><td><input type="text" size="60" name="contributorName"></td></tr> |
| <tr><td>Organisation </td><td><input type="text" size="60" name="contributorOrganization"></td></tr> |
| <tr><td>Phone Number </td><td><input type="text" size="40" name="contributorPhone"></td></tr> |
| <tr><td>E-mail </td><td><input type="text" size="40" name="contributorEmail"></td></tr> |
| <tr><td>% of content authored in the contribution </td><td><input type="text" size="10" name="contributorPercentage" value="50"></td></tr> |
| <tr><td colspan="2">If there are other contributors, please provide names, organizations, e-mail, and percentage of content authored in the contribution (one per line).</td></tr> |
| <tr><td></td><td><textarea cols="60" rows="10" name="otherContributors"></textarea></td></tr> |
| |
| <tr><td> </td></tr> |
| <tr> |
| <td colspan="2"><b>Note: </b> In the event your Contribution Questionnaire requires any packages maintained |
| by a third party, please submit an additional questionnaire for the non-EPL code. |
| </td> |
| </tr> |
| <tr><td> </td></tr> |
| <tr> |
| <td> </td> |
| <td><input type="button" name="Submit" value="Submit your questionnaire" onclick="fnValidForm();" /></td> |
| </tr> |
| </table> |
| <p> |
| |
| </p> |
| <input type="hidden" name="cqtype" value="epl" /> |
| </form> |
| </td> |
| |
| <script language="javascript"> |
| function fnValidForm() { |
| |
| document.form1.contributionName.className = ""; |
| document.form1.contributionVersion.className = ""; |
| document.form1.contributionSize.className = ""; |
| document.form1.contributionDescription.className = ""; |
| document.form1.contributorName.className = ""; |
| document.form1.contributorOrganization.className = ""; |
| document.form1.contributorPhone.className = ""; |
| document.form1.contributorEmail.className = ""; |
| document.form1.contributorPercentage.className = ""; |
| document.form1.cryptography.className = ""; |
| document.form1.cryptographyAlgorithm.className = ""; |
| document.form1.otherContributors.className = ""; |
| |
| if(document.form1.committer_id.value == "") { |
| document.form1.committer_id.focus(); |
| alert("Please select a committer."); |
| return false; |
| } |
| if(document.form1.projectlead_id.value == "") { |
| document.form1.projectlead_id.focus(); |
| alert("This contribution must be approved by the PMC. Please select the individual who approved the contribution."); |
| return false; |
| } |
| if(document.form1.component_id.value == "") { |
| document.form1.component_id.focus(); |
| alert("Please choose a project."); |
| return false; |
| } |
| if(document.form1.contributionName.value == "") { |
| document.form1.contributionName.className = "inputInvalid"; |
| document.form1.contributionName.focus(); |
| alert("Please enter a name for this contribution."); |
| return false; |
| } |
| if(document.form1.contributionVersion.value == "") { |
| document.form1.contributionVersion.className = "inputInvalid"; |
| document.form1.contributionVersion.focus(); |
| alert("Please enter a version for this contribution."); |
| return false; |
| } |
| if(document.form1.contributionSize.value == "") { |
| document.form1.contributionSize.className = "inputInvalid"; |
| document.form1.contributionSize.focus(); |
| alert("Please enter a size for this contribution."); |
| return false; |
| } |
| if(document.form1.contributionDescription.value == "") { |
| document.form1.contributionDescription.className = "inputInvalid"; |
| document.form1.contributionDescription.focus(); |
| alert("Please enter a description for this contribution."); |
| return false; |
| } |
| if(!document.form1.allMyCode[0].checked && !document.form1.allMyCode[1].checked) { |
| alert("Did you write 100% of the code in this contribution? Please choose an option."); |
| document.form1.allMyCode.focus(); |
| return false; |
| } |
| if(document.form1.allMyCode[1].checked && ( |
| document.form1.contributorName.value == "" |
| || document.form1.contributorOrganization.value == "" |
| || document.form1.contributorPhone.value == "" |
| || document.form1.contributorEmail.value == "" |
| ||document.form1.contributorPercentage.value == "" |
| ) |
| ) { |
| document.form1.contributorName.className = "inputInvalid"; |
| document.form1.contributorOrganization.className = "inputInvalid"; |
| document.form1.contributorPhone.className = "inputInvalid"; |
| document.form1.contributorEmail.className = "inputInvalid"; |
| document.form1.contributorPercentage.className = "inputInvalid"; |
| |
| document.form1.contributorName.focus(); |
| alert("Please enter the primary contributor information, or SAME if the primary contributor is yourself."); |
| return false; |
| } |
| |
| if(document.form1.allMyCode[1].checked && document.form1.contributorPercentage.value > 100) { |
| document.form1.contributorPercentage.className = "inputInvalid"; |
| document.form1.contributorPercentage.focus(); |
| alert("This value must be 100% or less."); |
| return false; |
| } |
| |
| if(document.form1.allMyCode[1].checked && document.form1.contributorPercentage.value < 100 && document.form1.otherContributors.value == "") { |
| document.form1.otherContributors.className = "inputInvalid"; |
| document.form1.otherContributors.focus(); |
| alert("Please type the information required for the other contributors."); |
| return false; |
| } |
| if(!document.form1.crypto[0].checked && !document.form1.crypto[1].checked) { |
| alert("Does this contribution involve cryptography? Please choose yes/no."); |
| return false; |
| } |
| if(document.form1.crypto[0].checked && (document.form1.cryptography.value == "" || document.form1.cryptographyAlgorithm.value == "")) { |
| document.form1.cryptography.className = "inputInvalid"; |
| document.form1.cryptographyAlgorithm.className = "inputInvalid"; |
| |
| document.form1.cryptography.focus(); |
| alert("Please enter the cryptography information requested."); |
| return false; |
| } |
| |
| |
| document.form1.submit(); |
| } |
| |
| </script> |
| <?php |
| include("../html/footer.php"); |
| ?> |