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>
<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>
......@@ -68,7 +68,7 @@ to distribute, to make the Contribution available to the public, display and pub
</span>
<span id="license=option-2">
<span id="license-option-2">
<h4>Non-Exclusive License Agreement:</h4>
<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
<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 Number<br />
Date<br />
......@@ -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>
<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-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>
......
......@@ -20,6 +20,7 @@
}
select.cla-alert,
input.cla-alert {
border: 1px solid red;
}
......@@ -66,6 +66,18 @@
</li>
</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">
Project family Name</label>
<input type='text' name='project-family-name'
......@@ -91,17 +103,23 @@
placeholder='The primary email address that your project uses to receive email.'
class="input-block-level">
<label for="contributor-signing-process">
<label for="contributor-process-url">
Contributor Signing Process Website Address</label>
<input type='text'
name='contributor-signing-process'
id='contributor-signing-process'
name='contributor-process-url'
id='contributor-process-url'
placeholder='A website address where instructions exist or people may sign your agreement.'
class="input-block-level">
<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).">
</div>
<div class="tab-pane" id="copyright">
......@@ -118,10 +136,15 @@
</li>
</ul>
<label for="agreement_grant">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>
<option value="nonexclusive">NON Exclusive License</option></select>
<label for="agreement-exclusivity">Which style of contributor agreement would you like?</label>
<select id="agreement-exclusivity" name="agreement-exclusivity" class="input-block-level">
<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>
<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>
......@@ -181,7 +204,90 @@
<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> -->
<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>
</div>
<div class="tab-pane" id="patents">
......@@ -198,10 +304,10 @@
</li>
</ul>
<label for="agreement_media">What type of Patent License do you want in your agreement?</label>
<select id="patenttype" name="patenttype[]" class="input-block-level">
<option value="GFDL-1.1">Traditional Patent License</option>
<option value="GFDL-1.2">Identified Patent Pledge</option>
<label for="patent-type">What type of Patent License do you want in your agreement?</label>
<select id="patent-type" name="patent-type" class="input-block-level">
<option value="traditional">Traditional Patent License</option>
<option value="patent-pledge">Identified Patent Pledge</option>
</select>
......@@ -211,17 +317,13 @@
<div class="thumbnail">
<img data-src="holder.js/300x200" alt="">
<div class="caption">
<h4>Optional Patent Pledge Fields<h4>
<label for="patent-title">Title</label>
<input type="text" class="input-block-level" name="patent-title" id="patent-title">
<label for="patent-title">Application Office</label>
<input type="text" class="input-block-level" name="application-office" id="pplication-office">
<label for="patent-title">Application Number</label>
<input type="text" class="input-block-level" name="application-number" id="application-number">
<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>
<p>Optional Patent Pledge More Information<p>
<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-more-url">Website Address (URL) to more information on your patent(s)</label>
<input type="text" class="input-block-level" name="patent-more-url" id="patent-more-url">
</div>
</div>
</li>
</ul>
......@@ -243,28 +345,83 @@
<tr>
<th>Option</th><th>Choice</th>
</tr>
<tr>
<td>Individual/Entity</td>
<td>Individual</td>
<td>Agreement Type</td>
<td id="review-agreement-type"></td>
</tr>
<tr>
<td>Exclusive/Nonexclusive</td>
<td>Exclusive</td>
<td>Project Family Name</td>
<td id="review-project-family-name"></td>
</tr>
<tr>
<td>patent license/patent pledge agreement</td>
<td>Patent license</td>
<td>Project Name</td>
<td id="review-project-name"></td>
</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>
<td>outbound copyright license</td>
<td>CC</td>
<td>Project Jurisdiction</td>
<td id="review-project-jurisdiction"></td>
</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>
</div>
......@@ -277,7 +434,7 @@
<li class="span12">
<div class="thumbnail">
<img data-src="holder.js/300x200" alt="">
<div class="caption" id="review">
<div class="caption" id="review-text">
</div>
</div>
</li>
......@@ -304,13 +461,13 @@
<tr>
<th>Agreement</th><th>Version</th><th>Format</th>
</tr>
<tr>
<tr id="apply-individual">
<td>Combined Individual Contributor License Agreement</td>
<td>Contributor Agreements 1.1</td>
<td><a href="#myHTML" role="button" class="btn btn-primary" data-toggle="modal">HTML</a></td>
</tr>
<tr>
<tr id="apply-entity">
<td>Combined Entity Contributor License Agreement</td>
<td>Contributor Agreements 1.1</td>
<td><a href="#myHTML" role="button" class="btn btn-primary" data-toggle="modal">HTML</a></td>
......@@ -323,7 +480,7 @@
<div id="myHTML" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<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 class="modal-body">
......@@ -354,7 +511,7 @@
</div>
</div>
<div id="embed-offscreen" style="display: none;"></div>
<script src="//code.jquery.com/jquery-latest.js"></script>
......
var doDebug = true;
var generalPageIndex = 0;
var isGeneralPageOk = false;
......@@ -15,8 +16,25 @@
var applyPageIndex = 4;
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)
{
var re = /\S+@\S+\.\S+/;
......@@ -43,12 +61,13 @@ function oinspect (obj)
function testGeneralPage ()
{
isGeneralPageOk = true;
if ( !$('#project-family-name').val() ) {
$('#project-family-name').addClass("cla-alert");
isGeneralPageOk = false;
} else {
$('#project-family-name').removeClass("cla-alert");
isGeneralPageOk = true;
}
if ( !$('#project-name').val() ) {
......@@ -56,7 +75,6 @@ function testGeneralPage ()
isGeneralPageOk = false;
} else {
$('#project-name').removeClass("cla-alert");
isGeneralPageOk = true;
}
if ( !$('#project-website').val() ||
......@@ -65,7 +83,6 @@ function testGeneralPage ()
isGeneralPageOk = false;
} else {
$('#project-website').removeClass("cla-alert");
isGeneralPageOk = true;
}
if ( !$('#project-email').val() ||
......@@ -75,16 +92,14 @@ function testGeneralPage ()
isGeneralPageOk = false;
} else {
$('#project-email').removeClass("cla-alert");
isGeneralPageOk = true;
}
if ( !$('#contributor-signing-process').val() ||
!validateURL( $('#contributor-signing-process').val() ) ) {
$('#contributor-signing-process').addClass("cla-alert");
if ( !$('#contributor-process-url').val() ||
!validateURL( $('#contributor-process-url').val() ) ) {
$('#contributor-process-url').addClass("cla-alert");
isGeneralPageOk = false;
} else {
$('#contributor-signing-process').removeClass("cla-alert");
isGeneralPageOk = true;
$('#contributor-process-url').removeClass("cla-alert");
}
if ( !$('#project-jurisdiction').val() ) {
......@@ -92,13 +107,260 @@ function testGeneralPage ()
isGeneralPageOk = false;
} else {
$('#project-jurisdiction').removeClass("cla-alert");
isGeneralPageOk = true;
}
testReviewPage();
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: " +
mediaLicenses);
$('#medialist').removeClass("cla-alert");
}
testReviewPage();
return isCopyrightPageOk;
}
function testPatentPage ()
{
isPatentPageOk = true;
testReviewPage();
return isPatentPageOk;
}
function testReviewPage ()
{
isReviewPageOk = true;
console.log("At testReviewPage");
if ( $("#contributor-option-entity").prop("checked") )
{
$("#review-agreement-type").text(
ucFirst( $("#contributor-option-entity").val() ) ) ;
$("#modal-agreement-type").html(
ucFirst( $("#contributor-option-entity").val() ) );
$("#tmp-contributor-type").html(
ucFirst( $("#contributor-option-entity").val() ) );
$("#definition-option-1").show();
$("#definition-option-1").removeClass("nuke");
$("#definition-option-2").hide();
$("#definition-option-2").addClass("nuke");
} else {
$("#review-agreement-type").text(
ucFirst( $("#contributor-option-individual").val())) ;
$("#modal-agreement-type").html(
ucFirst( $("#contributor-option-individual").val() ) );
$("#tmp-contributor-type").html(
ucFirst( $("#contributor-option-individual").val() ) );
$("#definition-option-1").hide();
$("#definition-option-1").addClass("nuke");
$("#definition-option-2").show();
$("#definition-option-1").removeClass("nuke");
}
$("#review-project-family-name").html(
$("#project-family-name").val() );
$("#review-project-name").html(
$("#project-name").val() );
$("#tmp-project-name").html(
$("#project-name").val() );
$("#review-project-website").html(
$("#project-website").val() );
$("#review-project-email").html(
$("#project-email").val() );
$("#review-contributor-process-url").html(
$("#contributor-process-url").val() );
$("#tmp-submission-instructions").html(
$("#contributor-process-url").val() );
$("#review-project-jurisdiction").html(
$("#project-jurisdiction").val() );
$("#review-agreement-exclusivity").html(
ucFirst( $("#agreement-exclusivity").val() ) );
$("#tmp-contributor-exclusivity").html(
ucFirst( $("#agreement-exclusivity").val() ) );
if ( $("#agreement-exclusivity").val() == 'exclusive' )
{
$("#license-option-1").show();
$("#license-option-1").removeClass("nuke");
$("#license-option-2").hide();
$("#license-option-2").addClass("nuke");
} else {
$("#license-option-1").hide();
$("#license-option-1").addClass("nuke");
$("#license-option-2").show();
$("#license-option-2").removeClass("nuke");
}
$("#review-outbound-licenses").html(
outboundCopyrightLicenses );
$("#tmp-licenses").html(
outboundCopyrightLicenses );
if ( $("#outbound-option-same").prop("checked") )
{
$("#review-outbound-license-options").html(
$("#outbound-option-same").val() );
$("#outbound-option-1").show();
$("#outbound-option-1").removeClass("nuke");
$("#outbound-option-2").hide();
$("#outbound-option-2").addClass("nuke");
$("#outbound-option-3").hide();
$("#outbound-option-3").addClass("nuke");
}
if ( $("#outbound-option-same-licenses").prop("checked") )
{
$("#review-outbound-license-options").html(
$("#outbound-option-same-licenses").val() );
$("#outbound-option-1").hide();
$("#outbound-option-1").addClass("nuke");
$("#outbound-option-2").show();
$("#outbound-option-2").removeClass("nuke");
$("#outbound-option-3").hide();
$("#outbound-option-3").addClass("nuke");
}
if ( $("#outbound-option-fsf").prop("checked") )