-
Notifications
You must be signed in to change notification settings - Fork 16
/
application_forms.py
3313 lines (3027 loc) · 123 KB
/
application_forms.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"""
~~ApplicationForm:Feature~~
"""
from copy import deepcopy
from wtforms import StringField, TextAreaField, IntegerField, BooleanField, SelectMultipleField, \
SelectField, \
FormField, FieldList, HiddenField
from wtforms import widgets, validators
from wtforms.widgets.core import html_params, HTMLString
from portality import constants
from portality import regex
from portality.core import app
from portality.crosswalks.application_form import ApplicationFormXWalk
from portality.crosswalks.journal_form import JournalFormXWalk
from portality.datasets import language_options, country_options, currency_options
from portality.forms import application_processors
from portality.forms.fields import TagListField, NestedFormField, UnconstrainedRadioField
from portality.forms.validate import (
HTTPURL,
OptionalIf,
MaxLen,
RegexpOnTagList,
StopWords,
ISSNInPublicDOAJ,
JournalURLInPublicDOAJ,
DifferentTo,
RequiredIfOtherValue,
OnlyIf,
NotIf,
GroupMember,
RequiredValue,
BigEndDate,
ReservedUsernames,
CustomRequired,
OwnerExists,
NoScriptTag,
Year,
CurrentISOCurrency,
CurrentISOLanguage
)
from portality.lib import dates
from portality.lib.formulaic import Formulaic, WTFormsBuilder, FormulaicContext, FormulaicField
from portality.models import EditorGroup
from portality.regex import ISSN, ISSN_COMPILED
from portality.ui.messages import Messages
# Stop words used in the keywords field
STOP_WORDS = [
"open access",
"high quality",
"peer-reviewed",
"peer-review",
"peer review",
"peer reviewed",
"quality",
"medical journal",
"multidisciplinary",
"multi-disciplinary",
"multi-disciplinary journal",
"interdisciplinary",
"inter disciplinary",
"inter disciplinary research",
"international journal",
"journal",
"scholarly journal",
"open science",
"impact factor",
"scholarly",
"research",
"research journal"
]
########################################################
# Define all our individual fields
########################################################
class FieldDefinitions:
# ~~->$ BOAI:FormField~~
BOAI = {
"name": "boai",
"label": "Does the journal adhere to DOAJ’s definition of open access?",
"input": "radio",
"options": [
{"display": "Yes", "value": "y"},
{"display": "No", "value": "n"}
],
"help": {
"long_help": ["See <a href='https://blog.doaj.org/2020/11/17/"
"what-does-doaj-define-as-open-access/' "
"target='_blank' rel='noopener'>"
"DOAJ’s definition of open access explained "
"in full</a>."],
"doaj_criteria": "You must answer 'Yes'"
},
"validate": [
{"required": {"message": "You must answer <strong>Yes</strong> to continue"}},
{"required_value" : {"value" : "y"}}
],
"contexts": {
"admin" : {
"validate" : []
},
"editor": {
"validate" : [],
"disabled": True
},
"associate_editor": {
"validate" : [],
"disabled": True
}
}
}
# ~~->$ OAStatementURL:FormField~~
OA_STATEMENT_URL = {
"name": "oa_statement_url",
"label": "The journal website must display its open access statement. Where can we find this information?",
"input": "text",
"help": {
"long_help": ["Here is an example of a suitable Open Access "
"statement that meets our criteria: <blockquote>This"
" is an open access journal which means that all "
"content is freely available without charge to the "
"user or his/her institution. Users are allowed to "
"read, download, copy, distribute, print, search, or"
" link to the full texts of the articles, or use "
"them for any other lawful purpose, without asking "
"prior permission from the publisher or the author. "
"This is in accordance with the BOAI definition of "
"open access.</blockquote>"],
"short_help": "Link to the journal’s open access statement",
"placeholder": "https://www.my-journal.com/open-access"
},
"validate": [
{"required": {"message": "Enter the URL for the journal’s Open Access statement page"}},
"is_url" # ~~^->IsURL:FormValidator~~
],
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"clickable_url" # ~~^-> ClickableURL:FormWidget~~
],
"attr": {
"type": "url"
}
}
#~~->$ Title:FormField~~
TITLE = {
"name": "title",
"label": "Journal title",
"input": "text",
"help": {
"long_help": ["The journal title must match what is displayed on the website and what is registered at the "
"<a href='https://portal.issn.org/' target='_blank' rel='noopener'> ISSN Portal</a>.",
"For translated titles, you may add the "
"translation as an alternative title."],
"placeholder": "Journal title",
"doaj_criteria": "Title in application form, title at ISSN and website must all match"
},
"validate": [
{"required": {"message": "Enter the journal’s name"}},
"no_script_tag" # ~~^-> NoScriptTag:FormValidator
],
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"full_contents" # ~~^->FullContents:FormWidget~~
],
"contexts": {
"admin": {
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"click_to_copy", # ~~^-> ClickToCopy:FormWidget~~
]
},
"editor": {
"disabled": True,
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"click_to_copy", # ~~^-> ClickToCopy:FormWidget~~
]
},
"associate_editor": {
"disabled": True,
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"click_to_copy", # ~~^-> ClickToCopy:FormWidget~~
]
},
"update_request": {
"disabled": True
}
}
}
# ~~->$ AlternativeTitle:FormField~~
ALTERNATIVE_TITLE = {
"name": "alternative_title",
"label": "Alternative title (including translation of the title)",
"input": "text",
"optional": True,
"help": {
"placeholder": "Ma revue"
},
"validate": [
"no_script_tag" # ~~^-> NoScriptTag:FormValidator
],
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
{"full_contents" : {"empty_disabled" : "[The journal has no alternative title]"}} # ~~^->FullContents:FormWidget~~
],
"contexts": {
"update_request": {
"disabled": True
},
"admin": {
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"click_to_copy", # ~~^-> ClickToCopy:FormWidget~~
]
},
"associate_editor": {
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"click_to_copy", # ~~^-> ClickToCopy:FormWidget~~
]
},
"editor": {
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"click_to_copy", # ~~^-> ClickToCopy:FormWidget~~
]
}
}
}
# ~~->$ JournalURL:FormField~~
JOURNAL_URL = {
"name": "journal_url",
"label": "Link to the journal’s homepage",
"input": "text",
"validate": [
"required",
"is_url" # ~~^->IsURL:FormValidator~~
],
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"clickable_url" # ~~^-> ClickableURL:FormWidget~~
],
"help": {
"placeholder": "https://www.my-journal.com"
},
"contexts": {
"public" : {
"validate": [
{"required": {"message": "Enter the URL for the journal’s <strong>homepage</strong>"}},
"is_url", # ~~^->IsURL:FormValidator~~
"journal_url_in_public_doaj" # ~~^-> JournalURLInPublicDOAJ:FormValidator~~
],
}
}
}
#~~->$ PISSN:FormField~~
PISSN = {
"name": "pissn",
"label": "ISSN (print)",
"input": "text",
"help": {
"long_help": ["Must be a valid ISSN, fully registered and confirmed at the "
"<a href='https://portal.issn.org/' target='_blank' rel='noopener'> ISSN Portal.</a>",
"Use the link under the ISSN you provided to check it.",
"The ISSN must match what is given on the journal website."],
"short_help": "For example, 2049-3630",
"doaj_criteria": "ISSN must be provided"
},
"validate": [
{"optional_if": {"field": "eissn", # ~~^-> OptionalIf:FormValidator~~
"message": "You must provide <strong>one or both</strong> of an online ISSN or a print ISSN"}},
{"is_issn": {"message": "This is not a valid ISSN"}}, # ~~^-> IsISSN:FormValidator~~
{"different_to": {"field": "eissn", "message": "This field must contain a different value to 'ISSN ("
"online)'"}} # ~~^-> DifferetTo:FormValidator~~
],
"widgets" : [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"full_contents", # ~~^->FullContents:FormWidget~~
"issn_link" # ~~^->IssnLink:FormWidget~~
],
"contexts": {
"public" : {
"validate": [
{"optional_if": {"field": "eissn", # ~~^-> OptionalIf:FormValidator~~
"message": "You must provide <strong>one or both</strong> of an online ISSN or a print ISSN"}},
{"is_issn": {"message": "This is not a valid ISSN"}}, # ~~^-> IsISSN:FormValidator~~
{"different_to": {"field": "eissn",
"message": "This field must contain a different value to 'ISSN ("
"online)'"}}, # ~~^-> DifferetTo:FormValidator~~
"issn_in_public_doaj"
],
},
"admin" : {
"help": {
"long_help": ["Must be a valid ISSN, fully registered and confirmed at the "
"<a href='https://portal.issn.org/' target='_blank' rel='noopener'> ISSN Portal</a>",
"The ISSN must match what is given on the journal website."],
"placeholder": "",
"doaj_criteria": "ISSN must be provided"
},
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"autocheck", # ~~^-> Autocheck:FormWidget~~
"issn_link" # ~~^->IssnLink:FormWidget~~
]
},
"editor": {
"disabled": True,
"help": {
"long_help": ["Must be a valid ISSN, fully registered and confirmed at the "
"<a href='https://portal.issn.org/' target='_blank' rel='noopener'> ISSN Portal.</a>",
"The ISSN must match what is given on the journal website."],
"placeholder": "",
"doaj_criteria": "ISSN must be provided"
},
},
"associate_editor": {
"disabled": True,
"help": {
"long_help": ["Must be a valid ISSN, fully registered and confirmed at the "
"<a href='https://portal.issn.org/' target='_blank' rel='noopener'> ISSN Portal.</a>",
"The ISSN must match what is given on the journal website."],
"placeholder": "",
"doaj_criteria": "ISSN must be provided"
}
},
"update_request": {
"disabled": True
}
}
}
#~~->$ EISSN:FormField~~
EISSN = {
"name": "eissn",
"label": "ISSN (online)",
"input": "text",
"help": {
"long_help": ["Must be a valid ISSN, fully registered and confirmed at the "
"<a href='https://portal.issn.org/' target='_blank' rel='noopener'> ISSN Portal</a>",
"Use the link under the ISSN your provided to check it.",
"The ISSN must match what is given on the journal website."],
"short_help": "For example, 0378-5955",
"doaj_criteria": "ISSN must be provided"
},
"validate": [
{"optional_if": {"field": "pissn", # ~~^-> OptionalIf:FormValidator~~
"message": "You must provide <strong>one or both</strong> of an online ISSN or a print ISSN"}},
{"is_issn": {"message": "This is not a valid ISSN"}}, # ~~^-> IsISSN:FormValidator~~
{"different_to": {"field": "pissn", "message" : "This field must contain a different value to 'ISSN (print)'"}} # ~~^-> DifferetTo:FormValidator~~
],
"widgets" : [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"issn_link" # ~~^->IssnLink:FormWidget~~
],
"contexts": {
"public" : {
"validate" : [
{"optional_if": {"field": "pissn", # ~~^-> OptionalIf:FormValidator~~
"message": "You must provide <strong>one or both</strong> of an online ISSN or a print ISSN"}},
{"is_issn": {"message": "This is not a valid ISSN"}}, # ~~^-> IsISSN:FormValidator~~
{"different_to": {"field": "pissn",
"message": "This field must contain a different value to 'ISSN (print)'"}}, # ~~^-> DifferetTo:FormValidator~~
"issn_in_public_doaj"
]
},
"admin" : {
"help": {
"long_help": ["Must be a valid ISSN, fully registered and confirmed at the "
"<a href='https://portal.issn.org/' target='_blank' rel='noopener'> ISSN Portal</a>",
"The ISSN must match what is given on the journal website."],
"placeholder": "",
"doaj_criteria": "ISSN must be provided"
},
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"autocheck", # ~~^-> Autocheck:FormWidget~~
"issn_link" # ~~^->IssnLink:FormWidget~~
]
},
"editor": {
"disabled": True,
"help": {
"long_help": ["Must be a valid ISSN, fully registered and confirmed at the "
"<a href='https://portal.issn.org/' target='_blank' rel='noopener'> ISSN Portal.</a>",
"The ISSN must match what is given on the journal website."],
"placeholder": "",
"doaj_criteria": "ISSN must be provided"
},
},
"associate_editor": {
"disabled": True,
"help": {
"long_help": ["Must be a valid ISSN, fully registered and confirmed at the "
"<a href='https://portal.issn.org/' target='_blank' rel='noopener'> ISSN Portal.</a>",
"The ISSN must match what is given on the journal website."],
"placeholder": "",
"doaj_criteria": "ISSN must be provided"
}
},
"update_request": {
"disabled": True,
"validate" : [
{"optional_if": {"field": "pissn", # ~~^-> OptionalIf:FormValidator~~
"message": "You must provide <strong>one or both</strong> of an online ISSN or a print ISSN"}},
{"is_issn": {"message": "This is not a valid ISSN"}}, # ~~^-> IsISSN:FormValidator~~
{"different_to": {"field": "pissn", # ~~^-> DifferetTo:FormValidator~~
"message": "This field must contain a different value to 'ISSN (print)'"}}
]
}
}
}
# ~~->$ Keywords:FormField~~
KEYWORDS = {
"name": "keywords",
"label": "Up to 6 subject keywords in English",
"input": "taglist",
"help": {
"long_help": ["Choose up to 6 keywords that describe the journal's subject matter. "
"Keywords must be in English.", "Use single words or short phrases (2 to 3 words) "
"that describe the journal's main topic.", "Do not add acronyms, abbreviations or descriptive sentences.",
"Note that the keywords may be edited by DOAJ editorial staff." ],
},
"validate": [
{"required": {"message": "Enter at least <strong>one subject keyword</strong> in English"}},
{"stop_words": {"disallowed": STOP_WORDS}}, # ~~^->StopWords:FormValidator~~
{"max_tags": {"max": 6}}
],
"widgets": [
{
"taglist": {
"maximumSelectionSize": 6,
"stopWords": STOP_WORDS,
"field": "bibjson.keywords"
}
}
],
"attr": {
"class": "input-xlarge"
}
}
# ~~->$ Language:FormField~~
LANGUAGE = {
"name": "language",
"label": "Languages in which the journal accepts manuscripts",
"input": "select",
"default" : "",
"options_fn": "iso_language_list",
"repeatable": {
"minimum" : 1,
"initial": 5
},
"validate": [
{"required": {"message": "Enter <strong>at least one</strong> language"}},
"current_iso_language"
],
"widgets": [
{"select": {}},
"multiple_field"
],
"help": {
"placeholder": "Type or select the language"
},
"attr": {
"class": "input-xlarge unstyled-list"
}
}
# ~~->$ PublisherName:FormField~~
PUBLISHER_NAME = {
"name": "publisher_name",
"label": "Publisher's name",
"input": "text",
"validate": [
{"required": {"message": "Enter the name of the journal's publisher"}},
],
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
{"autocomplete": {"type" : "journal", "field": "bibjson.publisher.name.exact"}}, # ~~^-> Autocomplete:FormWidget~~
"full_contents" # ~~^->FullContents:FormWidget~~
],
"help": {
"placeholder": "Type or select the publisher's name"
},
"contexts" : {
"bulk_edit" : {
"validate" : []
},
"admin": {
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
{"autocomplete": {"type": "journal", "field": "bibjson.publisher.name.exact"}}, # ~~^-> Autocomplete:FormWidget~~
"click_to_copy", # ~~^-> ClickToCopy:FormWidget~~
]
},
"associate_editor": {
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
{"autocomplete": {"type": "journal", "field": "bibjson.publisher.name.exact"}}, # ~~^-> Autocomplete:FormWidget~~
"click_to_copy", # ~~^-> ClickToCopy:FormWidget~~
]
},
"editor": {
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
{"autocomplete": {"type": "journal", "field": "bibjson.publisher.name.exact"}}, # ~~^-> Autocomplete:FormWidget~~
"click_to_copy", # ~~^-> ClickToCopy:FormWidget~~
]
}
}
}
# ~~->$ PublisherCountry:FormField~~
PUBLISHER_COUNTRY = {
"name": "publisher_country",
"label": "Publisher's country",
"input": "select",
"default": "",
"options_fn": "iso_country_list",
"help": {
"long_help": ["The country where the publisher carries out its business operations and is registered."],
"doaj_criteria": "You must provide a publisher country",
"placeholder": "Type or select the country"
},
"validate": [
{"required": {"message": "Enter the <strong>country</strong> where the publisher carries out its business operations and is registered"}}
],
"widgets": [
{"select": {}}
],
"attr": {
"class": "input-xlarge"
},
"contexts": {
"associate_editor": {
"disabled": True
},
"bulk_edit" : {
"validate" : []
}
}
}
# ~~->$ InstitutionName:FormField~~
INSTITUTION_NAME = {
"name": "institution_name",
"label": "Other organisation's name",
"input": "text",
"optional": True,
"help": {
"short_help": "Any other organisation associated with the journal",
"long_help": ["The journal may be owned, funded, sponsored, or supported by another organisation that is not "
"the publisher. If your journal is linked to "
"a second organisation, enter its name here."],
"placeholder": "Type or select the other organisation's name"
},
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
{"autocomplete": {"type" : "journal", "field": "bibjson.institution.name.exact"}}, # ~~^-> Autocomplete:FormWidget~~
"full_contents" # ~~^->FullContents:FormWidget~~
],
"contexts": {
"admin": {
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
{"autocomplete": {"type": "journal", "field": "bibjson.institution.name.exact"}},
# ~~^-> Autocomplete:FormWidget~~
"click_to_copy", # ~~^-> ClickToCopy:FormWidget~~
]
},
"associate_editor": {
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
{"autocomplete": {"type": "journal", "field": "bibjson.institution.name.exact"}},
# ~~^-> Autocomplete:FormWidget~~
"click_to_copy", # ~~^-> ClickToCopy:FormWidget~~
]
},
"editor": {
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
{"autocomplete": {"type": "journal", "field": "bibjson.institution.name.exact"}},
# ~~^-> Autocomplete:FormWidget~~
"click_to_copy", # ~~^-> ClickToCopy:FormWidget~~
]
}
}
}
# ~~->$ InstitutionCountry:FormField~~
INSTITUTION_COUNTRY = {
"name": "institution_country",
"label": "Other organisation's country",
"input": "select",
"default" : "",
"options_fn": "iso_country_list",
"optional": True,
"help": {
"short_help": "The country in which the other organisation is based",
"placeholder": "Type or select the country"
},
"widgets": [
{"select": {"allow_clear" : True}}
],
"attr": {
"class": "input-xlarge"
}
}
# ~~->$ License:FormField~~
LICENSE = {
"name": "license",
"label": "License(s) permitted by the journal",
"input": "checkbox",
"multiple": True,
"options": [
{"display": "CC BY", "value": "CC BY"},
{"display": "CC BY-SA", "value": "CC BY-SA"},
{"display": "CC BY-ND", "value": "CC BY-ND"},
{"display": "CC BY-NC", "value": "CC BY-NC"},
{"display": "CC BY-NC-SA", "value": "CC BY-NC-SA"},
{"display": "CC BY-NC-ND", "value": "CC BY-NC-ND"},
{"display": "CC0", "value": "CC0"},
{"display": "Public domain", "value": "Public domain"},
{"display": "Publisher's own license", "value": "Publisher's own license", "subfields": ["license_attributes"]},
],
"help": {
"long_help": ["The journal must use some form of licensing to be considered for indexing in DOAJ. ",
"If Creative Commons licensing is not used, then select <em>Publisher's own license</em> and enter "
"more details below.",
"More information on CC licenses: <br/>"
"<a href='https://creativecommons.org/licenses/by/4.0/"
"' target='_blank' 'rel='noopener'>CC BY</a> <br/>"
"<a href='https://creativecommons.org/licenses/by-sa/4.0/"
"' target='_blank' 'rel='noopener'>CC BY-SA</a> <br/>"
"<a href='https://creativecommons.org/licenses/by-nd/4.0/"
"' target='_blank' 'rel='noopener'>CC BY-ND</a> <br/>"
"<a href='https://creativecommons.org/licenses/by-nc/4.0/"
"' target='_blank' 'rel='noopener'>CC BY-NC</a> <br/>"
"<a href='https://creativecommons.org/licenses/by-nc-sa/4.0/"
"' target='_blank' 'rel='noopener'>CC BY-NC-SA</a> <br/>"
"<a href='https://creativecommons.org/licenses/by-nc-nd/4.0/"
"' target='_blank' 'rel='noopener'>CC BY-NC-ND</a>",
"<a href='https://wiki.creativecommons.org/wiki/CC0_"
"FAQ#What_is_the_difference_between_CC0_and_the_Publ"
"ic_Domain_Mark_.28.22PDM.22.29.3F' target='_blank' "
"rel='noopener'>What is the difference between CC0 "
"and the Public Domain Mark (\"PDM\")?</a>"],
"doaj_criteria": "Content must be licensed",
"seal_criteria": "Yes: CC BY, CC BY-SA, CC BY-NC"
},
"validate": [
{"required": {"message": "Select <strong>at least one</strong> type of license"}}
]
}
# ~~->$ LicenseAttributes:FormField~~
LICENSE_ATTRIBUTES = {
"name": "license_attributes",
"label": "Select all the attributes that your license has",
"input": "checkbox",
"multiple": True,
"conditional": [
{"field": "license", "value": "Publisher's own license"}
],
"options": [
{"display": "Attribution", "value": "BY"},
{"display": "Share Alike", "value": "SA"},
{"display": "No Derivatives", "value": "ND"},
{"display": "No Commercial Usage", "value": "NC"}
],
"help": {
"doaj_criteria": "Content must be licensed"
}
}
# ~~->$ LicenseTermsURL:FormField~~
LICENSE_TERMS_URL = {
"name": "license_terms_url",
"label": "Where can we find this information?",
"input": "text",
"diff_table_context": "License terms",
"validate": [
{"required": {"message": "Enter the URL for the journal’s <strong>license terms</strong> page"}},
"is_url" # ~~^->IsURL:FormValidator~~
],
"help": {
"short_help": "Link to the page where the license terms are stated on your site.",
"doaj_criteria": "You must provide a link to your license terms",
"placeholder": "https://www.my-journal.com/about#licensing",
},
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"clickable_url" # ~~^-> ClickableURL:FormWidget~~
]
}
# ~~->$ LicenseDisplay:FormField~~
LICENSE_DISPLAY = {
"name": "license_display",
"label": "Does the journal embed and/or display licensing information in its articles?",
"input": "radio",
"options": [
{"display": "Yes", "value": "y", "subfields": ["license_display_example_url"]},
{"display": "No", "value": "n"}
],
"help": {
"long_help": ["It is recommended that licensing information is included in full-text articles "
"but it is not required for inclusion. "
"Answer <strong>Yes</strong> if licensing is displayed or "
"embedded in all versions of each article."],
"seal_criteria": "If the answer is Embed"
},
"validate": [
{"required": {"message": "Select Yes or No"}}
]
}
#~~->$ LicenseDisplayExampleUrl:FormField~~
LICENSE_DISPLAY_EXAMPLE_URL = {
"name": "license_display_example_url",
"label": "Recent article displaying or embedding a license in the full text",
"input": "text",
"conditional": [
{"field": "license_display", "value": "y"}
],
"help": {
"short_help": "Link to an example article",
"placeholder": "https://www.my-journal.com/articles/article-page"
},
"validate": [
{"required_if": {
"field": "license_display",
"value": "y",
"message": "Enter the URL for any recent article that displays or embeds a license"
}
},
"is_url" # ~~^->IsURL:FormValidator~~
],
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"clickable_url" # ~~^-> ClickableURL:FormWidget~~
]
}
# ~~->$ CopyrightAuthorRetails:FormField~~
COPYRIGHT_AUTHOR_RETAINS = {
"name": "copyright_author_retains",
"label": "For all the licenses you have indicated above, do authors retain the copyright "
"<b>and</b> full publishing rights without restrictions?",
"input": "radio",
"options": [
{"display": "Yes", "value": "y"},
{"display": "No", "value": "n"}
],
"validate": [
{"required": {"message": "Select Yes or No"}}
],
"help": {
"long_help": ["Answer <strong>No</strong> if authors transfer "
"copyright or assign exclusive rights to the publisher"
" (including commercial rights). <br/><br/> Answer "
"<strong>Yes</strong> only if authors publishing "
"under any license allowed by the journal "
"retain all rights."],
"seal_criteria": "The author must retain the copyright"
}
}
# ~~->$ CopyrightURL:FormField~~
COPYRIGHT_URL = {
"name": "copyright_url",
"label": "Where can we find this information?",
"input": "text",
"diff_table_context": "Copyright terms",
"help": {
"short_help": "Link to the journal’s copyright terms"
},
"placeholder": "https://www.my-journal.com/about#licensing",
"validate": [
"is_url" # ~~^->IsURL:FormValidator~~
],
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"clickable_url" # ~~^-> ClickableURL:FormWidget~~
],
"contexts": {
"public": {
"validate": [
{"required": {"message": "Enter the URL for the journal’s <strong>copyright terms</strong> page"}},
"is_url" # ~~^->IsURL:FormValidator~~
]
},
"update_request": {
"validate": [
"required",
"is_url" # ~~^->IsURL:FormValidator~~
]
}
}
}
# ~~->$ ReviewProcess:FormField~~
REVIEW_PROCESS = {
"name": "review_process",
"label": "DOAJ only accepts peer-reviewed journals. "
"Which type(s) of peer review does this journal use?",
"input": "checkbox",
"multiple": True,
"options": [
{"display": "Editorial review", "value": "Editorial review"},
{"display": "Peer review", "value": "Peer review"},
{"display": "Anonymous peer review", "value": "Anonymous peer review"},
{"display": "Double anonymous peer review", "value": "Double anonymous peer review"},
{"display": "Post-publication peer review", "value": "Post-publication peer review"},
{"display": "Open peer review", "value": "Open peer review"},
{"display": "Other", "value": "other", "subfields": ["review_process_other"]}
],
"help": {
"long_help": ["Enter all types of review used by the journal for "
"research articles. Note that editorial review is "
"only accepted for arts and humanities journals."],
"doaj_criteria": "Peer review must be carried out"
},
"validate": [
{"required": {"message": "Select <strong>at least one</strong> type of review process"}}
]
}
# ~~->$ ReviewProcessOther:FormField~~
REVIEW_PROCESS_OTHER = {
"name": "review_process_other",
"label": "Other peer review",
"input": "text",
"help": {
"placeholder": "Other peer review"
},
"conditional": [{"field": "review_process", "value": "other"}],
"validate": [
{"required_if": {
"field": "review_process",
"value": "other",
"message": "Enter the name of another type of peer review"
}
}
],
"widgets" : [
"trim_whitespace" # ~~^-> TrimWhitespace:FormWidget~~
],
"asynchronous_warning": [
{"warn_on_value": {"value": "None"}}
]
}
# ~~->$ ReviewURL:FormField~~
REVIEW_URL = {
"name": "review_url",
"label": "Where can we find this information?",
"input": "text",
"diff_table_context": "Peer review policy",
"help": {
"doaj_criteria": "You must provide a URL",
"short_help": "Link to the journal’s peer review policy"
},
"validate": [
{"required": {"message": "Enter the URL for the journal’s <strong>peer review policy</strong> page"}},
"is_url" # ~~^->IsURL:FormValidator~~
],
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"clickable_url" # ~~^-> ClickableURL:FormWidget~~
]
}
# ~~->$ OAStart:FormField~~
OA_START = {
"name": "oa_start",
"label": "When did the journal start to publish all content using an open license?",
"input": "number",
"datatype": "integer",
"help": {
"long_help": ["Please enter the year that the journal started to publish all content as true open access, according to DOAJ's <a href='https://blog.doaj.org/2020/11/17/what-does-doaj-define-as-open-access/' target='_blank' rel='nofollow'>definition</a>.",
"For journals that have flipped to open access, enter the year that the journal flipped, not the original launch date of the journal.",
"For journals that have made digitised backfiles freely available, enter the year that the journal started publishing as a fully open access title, not the date of the earliest free content."]
},
"validate": [
{"required": {"message": "Enter the Year (YYYY)."}},
{"int_range": {"gte": app.config.get('MINIMAL_OA_START_DATE', 1900), "lte": dates.now().year}},
{"year": {"message": "OA Start Date must be a year in a 4 digit format (eg. 1987) and must be greater than {}".format(app.config.get('MINIMAL_OA_START_DATE', 1900))}}
],
"attr": {
"min": app.config.get('MINIMAL_OA_START_DATE', 1900),
"max": dates.now().year
}
}
# ~~->$ PlagiarismDetection:FormField~~
PLAGIARISM_DETECTION = {
"name": "plagiarism_detection",
"label": "Does the journal routinely screen article submissions for plagiarism?",
"input": "radio",
"help": {
"long_help": ["Screening for plagiarism is recommended, but is not"
" a requirement for inclusion in DOAJ. If the "
"journal does screen for plagiarism, state the "
"services(s) used on your website."],
},
"options": [
{"display": "Yes", "value": "y", "subfields": ["review_process_other"]},
{"display": "No", "value": "n"}
],
"validate": [
{"required": {"message": "Select Yes or No"}}
]
}
#~~->$ PlagiarismURL:FormField~~
PLAGIARISM_URL = {
"name": "plagiarism_url",
"label": "Where can we find this information?",
"diff_table_context": "Plagiarism screening",
"input": "text",
"conditional": [{"field": "plagiarism_detection", "value": "y"}],
"help": {
"doaj_criteria": "You must provide a URL",
"placeholder": "https://www.my-journal.com/about#plagiarism",
"short_help": "Link to the journal’s plagiarism policy",
"long_help": ["The page should state that the journal actively checks for plagiarism and explain how this "
"is done (including the name of any software or service used)."]
},
"validate": [
{"required_if": {
"field": "plagiarism_detection",
"value": "y",
"message": "Enter the URL for the journal’s <strong>plagiarism policy</strong> page"
}
},
"is_url" # ~~^->IsURL:FormValidator~~
],
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"clickable_url" # ~~^-> ClickableURL:FormWidget~~
]
}
# ~~->$ AimsScopeURL:FormField~~
AIMS_SCOPE_URL = {
"name": "aims_scope_url",
"label": "Link to the journal’s <b>Aims & Scope</b>",
"input": "text",
"help": {
"doaj_criteria": "You must provide a URL",
"placeholder": "https://www.my-journal.com/about#aims"
},
"validate": [
{"required": {"message": "Enter the URL for the journal’s <strong>Aims & Scope</strong> page"}},
"is_url" # ~~^->IsURL:FormValidator~~
],
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"clickable_url" # ~~^-> ClickableURL:FormWidget~~
]
}
# ~~->$ EditorialBoardURL:FormField~~
EDITORIAL_BOARD_URL = {
"name": "editorial_board_url",
"label": "Link to the journal’s <b>Editorial Board</b>",
"input": "text",
"help": {
"doaj_criteria": "You must provide a URL",
"placeholder": "https://www.my-journal.com/about#board"
},
"validate": [
{"required": {"message": "Enter the URL for the journal’s <strong>Editorial Board</strong> page"}},
"is_url" # ~~^->IsURL:FormValidator~~
],
"widgets": [
"trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~
"clickable_url" # ~~^-> ClickableURL:FormWidget~~
]
}
# ~~->$ AuthorInstructionsURL:FormField~~
AUTHOR_INSTRUCTIONS_URL = {
"name": "author_instructions_url",
"label": "Link to the journal’s <b>Instructions for Authors</b>",
"input": "text",
"help": {