Skip to content

Commit

Permalink
CLDR-17612 cla: update text, record version (#4233)
Browse files Browse the repository at this point in the history
  • Loading branch information
srl295 authored Dec 13, 2024
1 parent 57e30ca commit 178ef98
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 63 deletions.
12 changes: 9 additions & 3 deletions tools/cldr-apps/js/src/md/cla.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# CLA not needed
# Contributor License Agreement (CLA)

The SurveyTool is not currently requiring a CLA.
For more details about the CLA, see [policy](https://www.unicode.org/policies/licensing_policy.html)
Hello. We need your permission to use the data and information that you submit to the Unicode CLDR Survey Tool. To do this, we need a contributor license agreement (CLA) on file for you or your employer so that Unicode has the required permissions to use your contributions in our products and services. If you are seeing this message, it means we do not have such a CLA on file. If you believe you are already under a Unicode CLA (either your own or your employer’s) and are seeing this message in error, or if you have further questions, please contact [`[email protected]`](mailto:[email protected]).

If you would like to sign Unicode’s standard CLA so that you may contribute to other Unicode projects as well as Survey Tool, please refer to our [IP Policies](https://www.unicode.org/policies/licensing_policy.html) to find out how to get a standard CLA in place.

*Alternatively*, if you do not wish to sign Unicode’s standard CLA and you wish to contribute only to the CLDR Survey Tool, you may agree to the following terms for your Survey Tool contributions:

1. You represent and agree that the contributed matter is not proprietary or confidential to you or your employer or any third party; and/or
2. You grant to Unicode and to recipients of products distributed by Unicode a perpetual, irrevocable, unrestricted, worldwide, nonexclusive, no-charge, royalty-free license, without obligation for accounting, to reproduce, prepare derivative works of, publicly display, publicly perform, distribute, make, use, sell, offer to sell, or import that matter for any purpose, with the unrestricted right to sublicense those rights.
167 changes: 109 additions & 58 deletions tools/cldr-apps/js/src/views/SignCla.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div>
<div class="clapage">
<a-alert
v-if="needCla"
type="warning"
Expand All @@ -22,65 +22,100 @@
<!-- CLA text -->
<a-spin v-if="loading" />
<div class="cla" v-html="claHtml" />
<hr />
<div>
Your Name:
<a-input :disabled="!needCla" v-model:value="userName">
<template #prefix>
<i class="glyphicon glyphicon-user" />
</template>
</a-input>
Your Email:
<a-input :disabled="!needCla" v-model:value="userEmail">
<template #prefix>
<i class="glyphicon glyphicon-envelope" />
</template>
</a-input>
Your Employer (or 'none'):<a-input
:disabled="!needCla"
v-model:value="userEmployer"
>
<template #prefix>
<i class="glyphicon glyphicon-briefcase" />
</template>
</a-input>

<a-form
name="claform"
:label-col="{ span: 6 }"
:wrapper-col="{ span: 19 }"
autocomplete="off"
>
<a-form-item label="Your Name">
<a-input :disabled="!needCla" v-model:value="userName">
<template #prefix>
<i class="glyphicon glyphicon-user" />
</template>
</a-input>
</a-form-item>
<a-form-item label="Your Email">
<a-input :disabled="!needCla" v-model:value="userEmail">
<template #prefix>
<i class="glyphicon glyphicon-envelope" />
</template>
</a-input>
</a-form-item>
<a-form-item label="Your Employer (or 'none')">
<a-input :disabled="!needCla" v-model:value="userEmployer">
<template #prefix>
<i class="glyphicon glyphicon-briefcase" />
</template>
</a-input>
</a-form-item>

<!-- non form item -->
<i class="pleaseChoose" v-if="needCla && userSign == 0"
>Please choose one:</i
><br />
<a-radio-group :disabled="!needCla" v-model:value="userSign">
<a-radio :style="radioStyle" :value="1">
My employer has already signed the CLA and is listed on Unicode’s
<a href="https://www.unicode.org/policies/corporate-cla-list/"
>List of Corporate CLAs</a
>.
</a-radio>
<a-radio :style="radioStyle" :value="2">
I am a self-employed or unemployed individual and I have read and
agree to the CLA.
</a-radio>
</a-radio-group>
<br />
<button
@click="sign"
v-if="
needCla &&
userSign != 0 &&
userName &&
userEmail &&
userEmployer &&
!readonlyCla
"
>Please check the applicable box below (only one) to indicate your
agreement.</i
>
Sign
</button>
<a-alert
type="info"
v-else-if="needCla"
message="Please fill in the above fields."
/>
<hr />
</div>
<div v-if="!needCla">

<a-form-item>
<a-radio-group :disabled="!needCla" v-model:value="userSign">
<a-radio :style="radioStyle" :value="2">
I am contributing as an individual because I am self-employed or
unemployed. I have read and agree to the foregoing terms.
</a-radio>
<a-radio :style="radioStyle" :value="3">
I am contributing as an individual because, even though I am
employed, my employer has no rights and claims no rights to my
contributions. I have read and agree to the foregoing terms.
</a-radio>
<a-radio :style="radioStyle" :value="4">
I am employed and my employer has or may have rights in my
contributions under my employment agreement and/or the work for hire
doctrine or similar legal principles.
</a-radio>
<a-radio v-if="false" :style="radioStyle" :value="1">
My employer has already signed the CLA and is listed on Unicode’s
<a href="https://www.unicode.org/policies/corporate-cla-list/"
>List of Corporate CLAs</a
>.
</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item>
<button
@click="sign"
v-if="
needCla &&
userSign != 0 &&
userSign != 4 &&
userName &&
userEmail &&
userEmployer &&
!readonlyCla
"
>
Sign
</button>
<div v-else-if="userSign == 4">
<a-alert
type="error"
message="Please request that your employer sign the Unicode Corporate CLA."
/>
&nbsp;<a
href="https://www.unicode.org/policies/licensing_policy.html#signing"
>How to sign the Corporate CLA…</a
>
</div>
<a-alert
type="info"
v-else-if="needCla"
message="Please fill in the above fields."
/>
</a-form-item>
</a-form>
<hr />
<div v-if="false && !needCla">
<!-- revocation is not allowed at present -->
<a-alert
v-if="!readonlyCla"
type="warning"
Expand All @@ -89,6 +124,16 @@
<button v-if="!readonlyCla" @click="revoke">Revoke</button>
</div>
<a-spin v-if="loading" />

<p>
If you would like further information regarding contributing to Unicode,
please see our
<a
target="_blank"
href="https://www.unicode.org/policies/licensing_policy.html"
>IP Policies</a
>.
</p>
</div>
</template>

Expand Down Expand Up @@ -116,6 +161,7 @@ let userEmployer = ref(user?.org);
let userSign = ref(0);
const radioStyle = {
display: "flex",
"padding-bottom": "1em",
};
async function loadData() {
Expand Down Expand Up @@ -211,4 +257,9 @@ async function revoke() {
background-color: bisque;
font-size: small;
}
.clapage {
padding-left: 2em;
padding-right: 2em;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public final class ClaSignature {
public String employer; // May be different than org!
public boolean corporate; // signed as corporate

@Schema(required = false, description = "Version of CLDR signed in, or * for n/a")
public String version; // which CLDR version was it signed in?

@Schema(required = false)
public Date signed;

Expand Down Expand Up @@ -59,6 +62,7 @@ public ClaSignature(Organization o) {
this.corporate = true;
this.signed = new Date(0);
this.readonly = true;
this.version = "*";
}

public ClaSignature(String string) {
Expand All @@ -68,5 +72,6 @@ public ClaSignature(String string) {
this.corporate = true;
this.signed = new Date(0);
this.readonly = true;
this.version = "*";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.*;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
import org.apache.commons.codec.digest.DigestUtils;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.json.JSONException;
Expand Down Expand Up @@ -568,6 +576,7 @@ public void signCla(ClaSignature cla) {
}
if (!cla.valid()) throw new IllegalArgumentException("Invalid CLA");
cla.signed = new Date();
cla.version = SurveyMain.getNewVersion();
settings().setJson(ClaSignature.CLA_KEY, cla);
claSigned = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package org.unicode.cldr.web;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

public abstract class UserSettings implements Comparable<UserSettings> {
/**
Expand Down Expand Up @@ -92,7 +93,7 @@ public boolean persistent() {
}

public void setJson(String name, Object o) {
final Gson gson = new Gson();
final Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create();
set(name, gson.toJson(o));
}

Expand Down

0 comments on commit 178ef98

Please sign in to comment.