Commit b1efa5be authored by Jon Phillips's avatar Jon Phillips
Browse files

fully working chooser now!

parent 26ce1fb3
<h2>Combined <span id="tmp-contributor-type">[Individual/Entity]</span> Contributor <span id="tmp-contributor-exclusivity">[Exclusive/NonExclusive]</span> License Agreement</h2> <h2>Combined <span id="tmp-contributor-type">[Individual/Entity]</span> Contributor <span id="tmp-contributor-exclusivity">[Exclusive/NonExclusive]</span> License Agreement</h2>
<p>Thank you for your interest in contributing to <span id="tmp-project-name"[>PROJECT_NAME / Software]</span> ("We" or "Us").<p> <p>Thank you for your interest in contributing to <span id="tmp-project-name">[PROJECT_NAME / Software]</span> ("We" or "Us").</p>
<p>The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us. To make this document effective, please follow the instructions at <span id="tmp-submission-instructions">[SUBMISSION_INSTRUCTIONS]</span>.</p> <p>The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us. To make this document effective, please follow the instructions at <span id="tmp-submission-instructions">[SUBMISSION_INSTRUCTIONS]</span>.</p>
...@@ -68,7 +68,7 @@ to distribute, to make the Contribution available to the public, display and pub ...@@ -68,7 +68,7 @@ to distribute, to make the Contribution available to the public, display and pub
</span> </span>
<span id="license=option-2"> <span id="license-option-2">
<h4>Non-Exclusive License Agreement:</h4> <h4>Non-Exclusive License Agreement:</h4>
<p>2.1 Copyright License to Us</p> <p>2.1 Copyright License to Us</p>
...@@ -110,7 +110,7 @@ to distribute, to make the Contribution available to the public, display and pub ...@@ -110,7 +110,7 @@ to distribute, to make the Contribution available to the public, display and pub
<p>Whereas You are aware of certain of Your own patents, which You desire to identify and disclose as the following patents and patent applications ("Pledged Patents”):</p> <p>Whereas You are aware of certain of Your own patents, which You desire to identify and disclose as the following patents and patent applications ("Pledged Patents”):</p>
<p>Title<br /> <p id="tmp-patent-more-url">Title<br />
Application Office<br /> Application Office<br />
Application Number<br /> Application Number<br />
Date<br /> Date<br />
...@@ -130,12 +130,12 @@ Priority Number</p> ...@@ -130,12 +130,12 @@ Priority Number</p>
We agree to license the Contribution only under the terms of the license or licenses which We are using on the Submission Date for the Material (including any rights to adopt any future version of a license).</p> We agree to license the Contribution only under the terms of the license or licenses which We are using on the Submission Date for the Material (including any rights to adopt any future version of a license).</p>
<p id="outbound-option-2"> <p id="outbound-option-2">
We agree to license the Contribution only under the terms of the license or licenses which We are using on the Submission Date for the Material or the following additional licenses: [LIST_OF_LICENSES] (including any right to adopt any future version of a license if permitted).</p> We agree to license the Contribution only under the terms of the license or licenses which We are using on the Submission Date for the Material or the following additional licenses: <span id="tmp-licenses">[LIST_OF_LICENSES]</span> (including any right to adopt any future version of a license if permitted).</p>
<p id="outbound-option-3">We agree to license the Contribution only under the terms of the license or licenses which We are using on the Submission Date for the Material or any licenses on the Free Software Foundation's list of "Recommended copyleft licenses" or approved by the Open Source Initiative on or after the Submission Date, whether or not such licenses are subsequently disapproved (including any right to adopt any future version of a license).</p> <p id="outbound-option-3">We agree to license the Contribution only under the terms of the license or licenses which We are using on the Submission Date for the Material or any licenses on the Free Software Foundation's list of "Recommended copyleft licenses" or approved by the Open Source Initiative on or after the Submission Date, whether or not such licenses are subsequently disapproved (including any right to adopt any future version of a license).</p>
<p id="outbound-all"> <p id="outbound-all">
In addition, We may use the following licenses for Documentation in the Contribution: [LIST_OF_MEDIA_LICENSES] (including any right to adopt any future version of a license).</p> In addition, We may use the following licenses for Documentation in the Contribution: <span id="tmp-media-licenses">[LIST_OF_MEDIA_LICENSES]</span> (including any right to adopt any future version of a license).</p>
<h3>5. CONSIDERATION</h3> <h3>5. CONSIDERATION</h3>
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
} }
select.cla-alert,
input.cla-alert { input.cla-alert {
border: 1px solid red; border: 1px solid red;
} }
...@@ -66,6 +66,18 @@ ...@@ -66,6 +66,18 @@
</li> </li>
</ul> </ul>
<label class="radio">
<input type="radio" name="contributor-options" id="contributor-option-entity" value="entity" checked>
This is an Entity Contributor Agreement.
</label>
<label class="radio">
<input type="radio" name="contributor-options" id="contributor-option-individual" value="individual">
This is an Individual Contributor Agreement.
</label>
<hr />
<label for="project-family-name"> <label for="project-family-name">
Project family Name</label> Project family Name</label>
<input type='text' name='project-family-name' <input type='text' name='project-family-name'
...@@ -91,17 +103,23 @@ ...@@ -91,17 +103,23 @@
placeholder='The primary email address that your project uses to receive email.' placeholder='The primary email address that your project uses to receive email.'
class="input-block-level"> class="input-block-level">
<label for="contributor-signing-process"> <label for="contributor-process-url">
Contributor Signing Process Website Address</label> Contributor Signing Process Website Address</label>
<input type='text' <input type='text'
name='contributor-signing-process' name='contributor-process-url'
id='contributor-signing-process' id='contributor-process-url'
placeholder='A website address where instructions exist or people may sign your agreement.' placeholder='A website address where instructions exist or people may sign your agreement.'
class="input-block-level"> class="input-block-level">
<label for="project-jurisdiction">In what jurisdiction is this agreement to be valid?</label> <label for="project-jurisdiction">In what jurisdiction is this agreement to be valid?</label>
<input type="text" name="project-jurisdiction" id="project-jurisdiction" class="input-block-level" placeholder="Enter your jurisdiction(s)."> <input type="text" name="project-jurisdiction" id="project-jurisdiction" class="input-block-level" placeholder="Enter your jurisdiction(s).">
</div> </div>
<div class="tab-pane" id="copyright"> <div class="tab-pane" id="copyright">
...@@ -118,10 +136,15 @@ ...@@ -118,10 +136,15 @@
</li> </li>
</ul> </ul>
<label for="agreement_grant">Which style of contributor agreement would you like?</label> <label for="agreement-exclusivity">Which style of contributor agreement would you like?</label>
<select id="agreement_grant" name="agreement[grant]" class="input-block-level"><option value="exclusive">Exclusive License</option> <select id="agreement-exclusivity" name="agreement-exclusivity" class="input-block-level">
<option value="nonexclusive">NON Exclusive License</option></select> <option value="exclusive">Exclusive License</option>
<option value="nonexclusive">NON Exclusive License</option>
</select>
<!--
<label for="agreement_option">Would you like to add an outbound license obligation?</label> <label for="agreement_option">Would you like to add an outbound license obligation?</label>
<select id="agreement_option" name="agreement[option]" class="input-block-level"><option value="1">current license</option> <select id="agreement_option" name="agreement[option]" class="input-block-level"><option value="1">current license</option>
<option value="2">list of licenses (choose below)</option> <option value="2">list of licenses (choose below)</option>
...@@ -181,7 +204,90 @@ ...@@ -181,7 +204,90 @@
<option value="CC-BY-SA-3.0">Creative Commons Attribution Share Alike 3.0</option> <option value="CC-BY-SA-3.0">Creative Commons Attribution Share Alike 3.0</option>
<option value="CC0-1.0">Creative Commons Zero v1.0 Universal</option> <option value="CC0-1.0">Creative Commons Zero v1.0 Universal</option>
</select> -->
<label for="outboundlist">Which licenses is your project using?</label>
<select multiple="multiple" size=3 id="outboundlist" name="outboundlist"
class="input-block-level">
<option value="Apache-2.0">Apache License 2.0</option>
<option value="Artistic-1.0">Artistic License 1.0</option>
<option value="Artistic-2.0">Artistic License 2.0</option>
<option value="BSD-2-Clause">BSD "Simplified" License</option>
<option value="BSD-3-Clause">BSD "Revised" License</option>
<option value="CDDL-1.0">Common Development and Distribution License 1.0</option>
<option value="EPL-1.0">Eclipse Public License 1.0</option>
<option value="GPL-2.0">GNU General Public License v2.0</option>
<option value="GPL-3.0">GNU General Public License v3.0</option>
<option value="LGPL-2.0">GNU Lesser General Public License v2.0</option>
<option value="LGPL-2.1">GNU Lesser General Public License v2.1</option>
<option value="LGPL-3.0">GNU Lesser General Public License v3.0</option>
<option value="AGPL-3.0">GNU Affero General Public License v3.0</option>
<option value="MIT">MIT License</option>
<option value="MPL-1.1">Mozilla Public License 1.1</option>
</select>
<hr />
<label for="outbound-options">Please select an outbound license option path:</label>
<label class="radio">
<input type="radio" name="outbound-options" id="outbound-option-same" value="same" checked>
We agree to license the Contribution only under the terms of the license or licenses which We are using on the Submission Date for the Material (including any rights to adopt any future version of a license).
</label>
<label class="radio">
<input type="radio" name="outbound-options" id="outbound-option-same-licenses" value="same with licenses">
We agree to license the Contribution only under the terms of the license or licenses which We are using on the Submission Date for the Material or the following additional licenses (including any right to adopt any future version of a license if permitted):
</label>
<input type="text" name="outboundlist-custom" id="outboundlist-custom"
class="input-block-level" placeholder="Please list other licenses here.">
<label class="radio">
<input type="radio" name="outbound-options" id="outbound-option-fsf" value="same with fsf">
We agree to license the Contribution only under the terms of the license or licenses which We are using on the Submission Date for the Material or any licenses on the Free Software Foundation's list of "Recommended copyleft licenses" or approved by the Open Source Initiative on or after the Submission Date, whether or not such licenses are subsequently disapproved (including any right to adopt any future version of a license).
</label>
<hr />
<label for="outbound-media-licenses">
<label for="medialist">Would you like to add a documentation license?</label>
<select multiple size=3 id="medialist" name="medialist" class="input-block-level">
<option value="GFDL-1.1">GNU Free Documentation License v1.1</option>
<option value="GFDL-1.2">GNU Free Documentation License v1.2</option>
<option value="GFDL-1.3">GNU Free Documentation License v1.3</option>
<option value="CC-BY-1.0">Creative Commons Attribution 1.0</option>
<option value="CC-BY-2.0">Creative Commons Attribution 2.0</option>
<option value="CC-BY-2.5">Creative Commons Attribution 2.5</option>
<option value="CC-BY-3.0">Creative Commons Attribution 3.0</option>
<option value="CC-BY-ND-1.0">Creative Commons Attribution No Derivatives 1.0</option>
<option value="CC-BY-ND-2.0">Creative Commons Attribution No Derivatives 2.0</option>
<option value="CC-BY-ND-2.5">Creative Commons Attribution No Derivatives 2.5</option>
<option value="CC-BY-ND-3.0">Creative Commons Attribution No Derivatives 3.0</option>
<option value="CC-BY-NC-1.0">Creative Commons Attribution Non Commercial 1.0</option>
<option value="CC-BY-NC-2.0">Creative Commons Attribution Non Commercial 2.0</option>
<option value="CC-BY-NC-2.5">Creative Commons Attribution Non Commercial 2.5</option>
<option value="CC-BY-NC-3.0">Creative Commons Attribution Non Commercial 3.0</option>
<option value="CC-BY-NC-ND-1.0">Creative Commons Attribution Non Commercial No Derivatives 1.0</option>
<option value="CC-BY-NC-ND-2.0">Creative Commons Attribution Non Commercial No Derivatives 2.0</option>
<option value="CC-BY-NC-ND-2.5">Creative Commons Attribution Non Commercial No Derivatives 2.5</option>
<option value="CC-BY-NC-ND-3.0">Creative Commons Attribution Non Commercial No Derivatives 3.0</option>
<option value="CC-BY-NC-SA-1.0">Creative Commons Attribution Non Commercial Share Alike 1.0</option>
<option value="CC-BY-NC-SA-2.0">Creative Commons Attribution Non Commercial Share Alike 2.0</option>
<option value="CC-BY-NC-SA-2.5">Creative Commons Attribution Non Commercial Share Alike 2.5</option>
<option value="CC-BY-NC-SA-3.0">Creative Commons Attribution Non Commercial Share Alike 3.0</option>
<option value="CC-BY-SA-1.0">Creative Commons Attribution Share Alike 1.0</option>
<option value="CC-BY-SA-2.0">Creative Commons Attribution Share Alike 2.0</option>
<option value="CC-BY-SA-2.5">Creative Commons Attribution Share Alike 2.5</option>
<option value="CC-BY-SA-3.0">Creative Commons Attribution Share Alike 3.0</option>
<option value="CC0-1.0">Creative Commons Zero v1.0 Universal</option>
</select> </select>
</div> </div>
<div class="tab-pane" id="patents"> <div class="tab-pane" id="patents">
...@@ -198,10 +304,10 @@ ...@@ -198,10 +304,10 @@
</li> </li>
</ul> </ul>
<label for="agreement_media">What type of Patent License do you want in your agreement?</label> <label for="patent-type">What type of Patent License do you want in your agreement?</label>
<select id="patenttype" name="patenttype[]" class="input-block-level"> <select id="patent-type" name="patent-type" class="input-block-level">
<option value="GFDL-1.1">Traditional Patent License</option> <option value="traditional">Traditional Patent License</option>
<option value="GFDL-1.2">Identified Patent Pledge</option> <option value="patent-pledge">Identified Patent Pledge</option>
</select> </select>
...@@ -211,17 +317,13 @@ ...@@ -211,17 +317,13 @@
<div class="thumbnail"> <div class="thumbnail">
<img data-src="holder.js/300x200" alt=""> <img data-src="holder.js/300x200" alt="">
<div class="caption"> <div class="caption">
<h4>Optional Patent Pledge Fields<h4> <p>Optional Patent Pledge More Information<p>
<label for="patent-title">Title</label>
<input type="text" class="input-block-level" name="patent-title" id="patent-title"> <p><em>NOTE: Title, Application Office, Application Number, Date and Priority Number for patents is important when listing on your external more inoformation source.</em></p>
<label for="patent-title">Application Office</label>
<input type="text" class="input-block-level" name="application-office" id="pplication-office"> <label for="patent-more-url">Website Address (URL) to more information on your patent(s)</label>
<label for="patent-title">Application Number</label> <input type="text" class="input-block-level" name="patent-more-url" id="patent-more-url">
<input type="text" class="input-block-level" name="application-number" id="application-number"> </div>
<label for="patent-title">Date</label>
<input type="text" class="input-block-level" name="patent-date" id="patent-date">
<label for="patent-title">Priority Number</label>
<input type="text" class="input-block-level" name="patent-priority-number" id="patent-priority-number"> </div>
</div> </div>
</li> </li>
</ul> </ul>
...@@ -243,28 +345,83 @@ ...@@ -243,28 +345,83 @@
<tr> <tr>
<th>Option</th><th>Choice</th> <th>Option</th><th>Choice</th>
</tr> </tr>
<tr> <tr>
<td>Individual/Entity</td> <td>Agreement Type</td>
<td>Individual</td> <td id="review-agreement-type"></td>
</tr> </tr>
<tr> <tr>
<td>Exclusive/Nonexclusive</td> <td>Project Family Name</td>
<td>Exclusive</td> <td id="review-project-family-name"></td>
</tr> </tr>
<tr> <tr>
<td>patent license/patent pledge agreement</td> <td>Project Name</td>
<td>Patent license</td> <td id="review-project-name"></td>
</tr> </tr>
<tr>
<td>Project Website</td>
<td id="review-project-website"></td>
</tr>
<tr>
<td>Contributor Signing Process Address</td>
<td id="review-contributor-process-url"></td>
</tr>
<tr> <tr>
<td>outbound copyright license</td> <td>Project Jurisdiction</td>
<td>CC</td> <td id="review-project-jurisdiction"></td>
</tr> </tr>
<tr>
<td>Agreement Exclusivity</td>
<td id="review-agreement-exclusivity"></td>
</tr>
<tr>
<td>Outbound License(s)</td>
<td id="review-outbound-licenses"></td>
</tr>
<tr>
<td>Outbound License Options</td>
<td id="review-outbound-license-options"></td>
</tr>
<tr>
<td>Other Agreements?</td>
<td id="review-outbound-license-other"></td>
</tr>
<tr>
<td>Media License(s)</td>
<td id="review-media-licenses"></td>
</tr>
<tr>
<td>Patent Type</td>
<td id="review-patent-type"></td>
</tr>
<tr>
<td>Patent Optional Information Address</td>
<td id="review-patent-more-url"></td>
</tr>
</table> </table>
</div> </div>
...@@ -277,7 +434,7 @@ ...@@ -277,7 +434,7 @@
<li class="span12"> <li class="span12">
<div class="thumbnail"> <div class="thumbnail">
<img data-src="holder.js/300x200" alt=""> <img data-src="holder.js/300x200" alt="">
<div class="caption" id="review"> <div class="caption" id="review-text">
</div> </div>
</div> </div>
</li> </li>
...@@ -304,13 +461,13 @@ ...@@ -304,13 +461,13 @@
<tr> <tr>
<th>Agreement</th><th>Version</th><th>Format</th> <th>Agreement</th><th>Version</th><th>Format</th>
</tr> </tr>
<tr> <tr id="apply-individual">
<td>Combined Individual Contributor License Agreement</td> <td>Combined Individual Contributor License Agreement</td>
<td>Contributor Agreements 1.1</td> <td>Contributor Agreements 1.1</td>
<td><a href="#myHTML" role="button" class="btn btn-primary" data-toggle="modal">HTML</a></td> <td><a href="#myHTML" role="button" class="btn btn-primary" data-toggle="modal">HTML</a></td>
</tr> </tr>
<tr> <tr id="apply-entity">
<td>Combined Entity Contributor License Agreement</td> <td>Combined Entity Contributor License Agreement</td>
<td>Contributor Agreements 1.1</td> <td>Contributor Agreements 1.1</td>
<td><a href="#myHTML" role="button" class="btn btn-primary" data-toggle="modal">HTML</a></td> <td><a href="#myHTML" role="button" class="btn btn-primary" data-toggle="modal">HTML</a></td>
...@@ -323,7 +480,7 @@ ...@@ -323,7 +480,7 @@
<div id="myHTML" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div id="myHTML" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Combined Individual Contributor License Agreement</h3> <h3 id="myModalLabel">Combined <span id="modal-agreement-type"></span> Contributor License Agreement</h3>
</div> </div>
<div class="modal-body"> <div class="modal-body">
...@@ -354,7 +511,7 @@ ...@@ -354,7 +511,7 @@
</div> </div>
</div> </div>
<div id="embed-offscreen" style="display: none;"></div>
<script src="//code.jquery.com/jquery-latest.js"></script> <script src="//code.jquery.com/jquery-latest.js"></script>
......
var doDebug = true;
var generalPageIndex = 0; var generalPageIndex = 0;
var isGeneralPageOk = false; var isGeneralPageOk = false;
...@@ -15,8 +16,25 @@ ...@@ -15,8 +16,25 @@
var applyPageIndex = 4; var applyPageIndex = 4;
var isApplyPageOk = false; var isApplyPageOk = false;
var outboundCopyrightLicenses = '';
var mediaLicenses = '';
function setFakeData ()
{
$('#project-family-name').val('Fabricatorz');
$('#project-name').val('Archive Software');
$('#project-website').val('http://archive.fabricatorz.com');
$('#project-email').val('jon@fabricatorz.com');
$('#contributor-process-url').val('http://archive.fabricatorz.com/signing');
$('#project-jurisdiction').val('United States, Hong Kong, and China Mainland.');
}
function ucFirst(string)
{
return string.charAt(0).toUpperCase() + string.slice(1);
}
function validateEmail(email) function validateEmail(email)
{ {
var re = /\S+@\S+\.\S+/; var re = /\S+@\S+\.\S+/;
...@@ -43,12 +61,13 @@ function oinspect (obj) ...@@ -43,12 +61,13 @@ function oinspect (obj)
function testGeneralPage () function testGeneralPage ()
{ {
isGeneralPageOk = true;
if ( !$('#project-family-name').val() ) { if ( !$('#project-family-name').val() ) {
$('#project-family-name').addClass("cla-alert"); $('#project-family-name').addClass("cla-alert");
isGeneralPageOk = false; isGeneralPageOk = false;
} else { } else {
$('#project-family-name').removeClass("cla-alert"); $('#project-family-name').removeClass("cla-alert");
isGeneralPageOk = true;
} }
if ( !$('#project-name').val() ) { if ( !$('#project-name').val() ) {
...@@ -56,7 +75,6 @@ function testGeneralPage () ...@@ -56,7 +75,6 @@ function testGeneralPage ()
isGeneralPageOk = false; isGeneralPageOk = false;
} else { } else {
$('#project-name').removeClass("cla-alert"); $('#project-name').removeClass("cla-alert");
isGeneralPageOk = true;
} }
if ( !$('#project-website').val() || if ( !$('#project-website').val() ||
...@@ -65,7 +83,6 @@ function testGeneralPage () ...@@ -65,7 +83,6 @@ function testGeneralPage ()
isGeneralPageOk = false; isGeneralPageOk = false;
} else { } else {
$('#project-website').removeClass("cla-alert"); $('#project-website').removeClass("cla-alert");
isGeneralPageOk = true;
} }
if ( !$('#project-email').val() || if ( !$('#project-email').val() ||
...@@ -75,16 +92,14 @@ function testGeneralPage () ...@@ -75,16 +92,14 @@ function testGeneralPage ()
isGeneralPageOk = false; isGeneralPageOk = false;
} else { } else {
$('#project-email').removeClass("cla-alert"); $('#project-email').removeClass("cla-alert");
isGeneralPageOk = true;
} }
if ( !$('#contributor-signing-process').val() || if ( !$('#contributor-process-url').val() ||
!validateURL( $('#contributor-signing-process').val() ) ) { !validateURL( $('#contributor-process-url').val() ) ) {
$('#contributor-signing-process').addClass("cla-alert"); $('#contributor-process-url').addClass("cla-alert");
isGeneralPageOk = false; isGeneralPageOk = false;
} else { } else {
$('#contributor-signing-process').removeClass("cla-alert"); $('#contributor-process-url').removeClass("cla-alert");
isGeneralPageOk = true;
} }
if ( !$('#project-jurisdiction').val() ) { if ( !$('#project-jurisdiction').val() ) {
...@@ -92,13 +107,260 @@ function testGeneralPage () ...@@ -92,13 +107,260 @@ function testGeneralPage ()
isGeneralPageOk = false; isGeneralPageOk = false;
} else { } else {
$('#project-jurisdiction').removeClass("cla-alert"); $('#project-jurisdiction').removeClass("cla-alert");
isGeneralPageOk = true;
} }
testReviewPage();
return isGeneralPageOk; return isGeneralPageOk;
} }
function testCopyrightPage ()
{
isCopyrightPageOk = true;
var outboundChoices = $( "#outboundlist" ).val() || [];
var mediaChoices = $( "#medialist" ).val() || [];
if ( !$('#outboundlist').val() ) {
$('#outboundlist').addClass("cla-alert");
isCopyrightPageOk = false;
} else {
outboundCopyrightLicenses = outboundChoices.join(", ");
console.log("outboundCopyrightLicenses: " +
outboundCopyrightLicenses);
$('#outboundlist').removeClass("cla-alert");
}
if ( !$('#medialist').val() ) {
$('#medialist').addClass("cla-alert");
isCopyrightPageOk = false;
} else {
mediaLicenses = mediaChoices.join(", ");
console.log("mediaLicenses: " +