Skip to content

Commit

Permalink
Provide Template:L with 'MISSING' as second parameter if date is omit…
Browse files Browse the repository at this point in the history
  • Loading branch information
sohomdatta1 authored Sep 18, 2023
1 parent 65aca14 commit c35d9c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/modules/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1467,11 +1467,6 @@
} else {
value = $element.val();

// Ignore placeholder text
if ( value === $element.attr( 'placeholder' ) ) {
value = '';
}

// For <select multiple> with nothing selected, jQuery returns null...
// convert that to an empty array so that $.each() won't explode later
if ( value === null ) {
Expand Down
9 changes: 7 additions & 2 deletions src/modules/submissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2223,12 +2223,17 @@

// Add biography details
if ( data.isBiography ) {

var deathYear = 'LIVING';
if ( data.lifeStatus === 'dead' ) {
deathYear = data.deathYear || 'MISSING';
} else if ( data.lifeStatus === 'unknown' ) {
deathYear = 'UNKNOWN';
}
// {{subst:L}}, which generates DEFAULTSORT as well as
// adds the appropriate birth/death year categories
newText.append( '\n{{subst:L' +
'|1=' + data.birthYear +
'|2=' + ( data.deathYear || '' ) +
'|2=' + deathYear +
'|3=' + data.subjectName + '}}'
);

Expand Down

0 comments on commit c35d9c8

Please sign in to comment.