Skip to content

Commit 178ef98

Browse files
authored
CLDR-17612 cla: update text, record version (#4233)
1 parent 57e30ca commit 178ef98

File tree

5 files changed

+135
-63
lines changed

5 files changed

+135
-63
lines changed

tools/cldr-apps/js/src/md/cla.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
# CLA not needed
1+
# Contributor License Agreement (CLA)
22

3-
The SurveyTool is not currently requiring a CLA.
4-
For more details about the CLA, see [policy](https://www.unicode.org/policies/licensing_policy.html)
3+
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]).
4+
5+
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.
6+
7+
*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:
8+
9+
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
10+
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.

tools/cldr-apps/js/src/views/SignCla.vue

Lines changed: 109 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div>
2+
<div class="clapage">
33
<a-alert
44
v-if="needCla"
55
type="warning"
@@ -22,65 +22,100 @@
2222
<!-- CLA text -->
2323
<a-spin v-if="loading" />
2424
<div class="cla" v-html="claHtml" />
25-
<hr />
26-
<div>
27-
Your Name:
28-
<a-input :disabled="!needCla" v-model:value="userName">
29-
<template #prefix>
30-
<i class="glyphicon glyphicon-user" />
31-
</template>
32-
</a-input>
33-
Your Email:
34-
<a-input :disabled="!needCla" v-model:value="userEmail">
35-
<template #prefix>
36-
<i class="glyphicon glyphicon-envelope" />
37-
</template>
38-
</a-input>
39-
Your Employer (or 'none'):<a-input
40-
:disabled="!needCla"
41-
v-model:value="userEmployer"
42-
>
43-
<template #prefix>
44-
<i class="glyphicon glyphicon-briefcase" />
45-
</template>
46-
</a-input>
25+
26+
<a-form
27+
name="claform"
28+
:label-col="{ span: 6 }"
29+
:wrapper-col="{ span: 19 }"
30+
autocomplete="off"
31+
>
32+
<a-form-item label="Your Name">
33+
<a-input :disabled="!needCla" v-model:value="userName">
34+
<template #prefix>
35+
<i class="glyphicon glyphicon-user" />
36+
</template>
37+
</a-input>
38+
</a-form-item>
39+
<a-form-item label="Your Email">
40+
<a-input :disabled="!needCla" v-model:value="userEmail">
41+
<template #prefix>
42+
<i class="glyphicon glyphicon-envelope" />
43+
</template>
44+
</a-input>
45+
</a-form-item>
46+
<a-form-item label="Your Employer (or 'none')">
47+
<a-input :disabled="!needCla" v-model:value="userEmployer">
48+
<template #prefix>
49+
<i class="glyphicon glyphicon-briefcase" />
50+
</template>
51+
</a-input>
52+
</a-form-item>
53+
54+
<!-- non form item -->
4755
<i class="pleaseChoose" v-if="needCla && userSign == 0"
48-
>Please choose one:</i
49-
><br />
50-
<a-radio-group :disabled="!needCla" v-model:value="userSign">
51-
<a-radio :style="radioStyle" :value="1">
52-
My employer has already signed the CLA and is listed on Unicode’s
53-
<a href="https://www.unicode.org/policies/corporate-cla-list/"
54-
>List of Corporate CLAs</a
55-
>.
56-
</a-radio>
57-
<a-radio :style="radioStyle" :value="2">
58-
I am a self-employed or unemployed individual and I have read and
59-
agree to the CLA.
60-
</a-radio>
61-
</a-radio-group>
62-
<br />
63-
<button
64-
@click="sign"
65-
v-if="
66-
needCla &&
67-
userSign != 0 &&
68-
userName &&
69-
userEmail &&
70-
userEmployer &&
71-
!readonlyCla
72-
"
56+
>Please check the applicable box below (only one) to indicate your
57+
agreement.</i
7358
>
74-
Sign
75-
</button>
76-
<a-alert
77-
type="info"
78-
v-else-if="needCla"
79-
message="Please fill in the above fields."
80-
/>
81-
<hr />
82-
</div>
83-
<div v-if="!needCla">
59+
60+
<a-form-item>
61+
<a-radio-group :disabled="!needCla" v-model:value="userSign">
62+
<a-radio :style="radioStyle" :value="2">
63+
I am contributing as an individual because I am self-employed or
64+
unemployed. I have read and agree to the foregoing terms.
65+
</a-radio>
66+
<a-radio :style="radioStyle" :value="3">
67+
I am contributing as an individual because, even though I am
68+
employed, my employer has no rights and claims no rights to my
69+
contributions. I have read and agree to the foregoing terms.
70+
</a-radio>
71+
<a-radio :style="radioStyle" :value="4">
72+
I am employed and my employer has or may have rights in my
73+
contributions under my employment agreement and/or the work for hire
74+
doctrine or similar legal principles.
75+
</a-radio>
76+
<a-radio v-if="false" :style="radioStyle" :value="1">
77+
My employer has already signed the CLA and is listed on Unicode’s
78+
<a href="https://www.unicode.org/policies/corporate-cla-list/"
79+
>List of Corporate CLAs</a
80+
>.
81+
</a-radio>
82+
</a-radio-group>
83+
</a-form-item>
84+
<a-form-item>
85+
<button
86+
@click="sign"
87+
v-if="
88+
needCla &&
89+
userSign != 0 &&
90+
userSign != 4 &&
91+
userName &&
92+
userEmail &&
93+
userEmployer &&
94+
!readonlyCla
95+
"
96+
>
97+
Sign
98+
</button>
99+
<div v-else-if="userSign == 4">
100+
<a-alert
101+
type="error"
102+
message="Please request that your employer sign the Unicode Corporate CLA."
103+
/>
104+
&nbsp;<a
105+
href="https://www.unicode.org/policies/licensing_policy.html#signing"
106+
>How to sign the Corporate CLA…</a
107+
>
108+
</div>
109+
<a-alert
110+
type="info"
111+
v-else-if="needCla"
112+
message="Please fill in the above fields."
113+
/>
114+
</a-form-item>
115+
</a-form>
116+
<hr />
117+
<div v-if="false && !needCla">
118+
<!-- revocation is not allowed at present -->
84119
<a-alert
85120
v-if="!readonlyCla"
86121
type="warning"
@@ -89,6 +124,16 @@
89124
<button v-if="!readonlyCla" @click="revoke">Revoke</button>
90125
</div>
91126
<a-spin v-if="loading" />
127+
128+
<p>
129+
If you would like further information regarding contributing to Unicode,
130+
please see our
131+
<a
132+
target="_blank"
133+
href="https://www.unicode.org/policies/licensing_policy.html"
134+
>IP Policies</a
135+
>.
136+
</p>
92137
</div>
93138
</template>
94139

@@ -116,6 +161,7 @@ let userEmployer = ref(user?.org);
116161
let userSign = ref(0);
117162
const radioStyle = {
118163
display: "flex",
164+
"padding-bottom": "1em",
119165
};
120166
121167
async function loadData() {
@@ -211,4 +257,9 @@ async function revoke() {
211257
background-color: bisque;
212258
font-size: small;
213259
}
260+
261+
.clapage {
262+
padding-left: 2em;
263+
padding-right: 2em;
264+
}
214265
</style>

tools/cldr-apps/src/main/java/org/unicode/cldr/web/ClaSignature.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ public final class ClaSignature {
1818
public String employer; // May be different than org!
1919
public boolean corporate; // signed as corporate
2020

21+
@Schema(required = false, description = "Version of CLDR signed in, or * for n/a")
22+
public String version; // which CLDR version was it signed in?
23+
2124
@Schema(required = false)
2225
public Date signed;
2326

@@ -59,6 +62,7 @@ public ClaSignature(Organization o) {
5962
this.corporate = true;
6063
this.signed = new Date(0);
6164
this.readonly = true;
65+
this.version = "*";
6266
}
6367

6468
public ClaSignature(String string) {
@@ -68,5 +72,6 @@ public ClaSignature(String string) {
6872
this.corporate = true;
6973
this.signed = new Date(0);
7074
this.readonly = true;
75+
this.version = "*";
7176
}
7277
}

tools/cldr-apps/src/main/java/org/unicode/cldr/web/UserRegistry.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@
1212
import java.sql.ResultSet;
1313
import java.sql.SQLException;
1414
import java.sql.Statement;
15-
import java.util.*;
15+
import java.util.Date;
16+
import java.util.HashMap;
17+
import java.util.HashSet;
18+
import java.util.LinkedList;
19+
import java.util.List;
20+
import java.util.Map;
21+
import java.util.Set;
22+
import java.util.TreeMap;
23+
import java.util.TreeSet;
1624
import org.apache.commons.codec.digest.DigestUtils;
1725
import org.eclipse.microprofile.openapi.annotations.media.Schema;
1826
import org.json.JSONException;
@@ -568,6 +576,7 @@ public void signCla(ClaSignature cla) {
568576
}
569577
if (!cla.valid()) throw new IllegalArgumentException("Invalid CLA");
570578
cla.signed = new Date();
579+
cla.version = SurveyMain.getNewVersion();
571580
settings().setJson(ClaSignature.CLA_KEY, cla);
572581
claSigned = true;
573582
}

tools/cldr-apps/src/main/java/org/unicode/cldr/web/UserSettings.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package org.unicode.cldr.web;
44

55
import com.google.gson.Gson;
6+
import com.google.gson.GsonBuilder;
67

78
public abstract class UserSettings implements Comparable<UserSettings> {
89
/**
@@ -92,7 +93,7 @@ public boolean persistent() {
9293
}
9394

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

0 commit comments

Comments
 (0)