Skip to content

Commit d5edf48

Browse files
author
Rob Myers
committed
Fix #118 - Flag text + "Triggering Publication Date".
1 parent 4165cb8 commit d5edf48

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

wordpress-plugin/js/rules.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -154,16 +154,17 @@ Rules.section203Analysis = function () {
154154
if (typeof Values.grant_pub_year !== 'undefined') {
155155
Rules.addFlag('F.iv');
156156
}
157-
var year_to_use = Values.grant_pub_year || Values.pub_year;
157+
Values.triggering_pub_year = Values.grant_pub_year || Values.pub_year;
158158
if (Values.k_year > 1977) {
159159
Rules.addFlag('F.iii');
160160
if (Values.pub_right == 'yes' ) {
161-
if (year_to_use != undefined) {
162-
Values.term_begin = Math.min(year_to_use + 35 , Values.k_year + 40);
161+
if (Values.triggering_pub_year != undefined) {
162+
Values.term_begin = Math.min(Values.triggering_pub_year + 35 ,
163+
Values.k_year + 40);
163164
} else {
164-
Values.term_begin = Values.k_year + 40;
165+
Values.term_begin = Values.k_year + 40;
165166
}
166-
} else if ((year_to_use != Values.k_year)
167+
} else if ((Values.triggering_pub_year != Values.k_year)
167168
|| (Values.pub_right == 'no')) {
168169
Values.term_begin = Values.k_year + 35;
169170
}
@@ -179,8 +180,8 @@ Rules.section203Analysis = function () {
179180
}
180181
if (Values.pub_right == 'maybe') {
181182
Values.p_term_begin = Values.k_year + 40;
182-
if (year_to_use != undefined) {
183-
Values.p_term_begin = Math.min(year_to_use + 35,
183+
if (Values.triggering_pub_year != undefined) {
184+
Values.p_term_begin = Math.min(Values.triggering_pub_year + 35,
184185
Values.p_term_begin);
185186
}
186187
Values.p_term_end = Values.p_term_begin + 5;

wordpress-plugin/js/values.js

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ var varsToTitles = {
4040
work_title: 'Title of Work',
4141
creation_year: 'Creation Year',
4242
pub_year: 'Publication Year',
43+
grant_pub_year: 'Publication Year Under Grant',
44+
triggering_pub_year: 'Triggering Publication Date',
4345
k_year: 'Effective Grant Year',
4446
user_inputted_k_year: 'User Entered Grant Year',
4547
reg_year: 'Copyright Registration Year',

0 commit comments

Comments
 (0)