Project

General

Profile

« Previous | Next » 

Revision 2144

Added by sgarg over 20 years ago

Made changes to fix 1301. Works fine with eml2 - need to check if works with emlbeta6.

View differences:

lib/style/common/templates/entryForm.tmpl
125 125
	return newField;
126 126
    }
127 127

  
128
    function addAdditionalPeople() {
129
        var aoCountField = document.getElementById("aoCount");
130
        var aoCount = aoCountField.getAttribute("value");
131
        aoCount++;
132
        aoCountField.setAttribute("value", aoCount);
133
        var aoRow = createAORow(aoCount);
134
        var aoRowMarker = document.getElementById("addaorow");
135
        var parent = aoRowMarker.parentNode;
136
        parent.insertBefore(aoRow, aoRowMarker);
137
    }
128 138

  
139
    function createAORow(aoCount) {
140
        var nameField=createTextField("origNamefirst" + aoCount, "25");
141
        var nameCell = document.createElement("td");
142
        nameCell.appendChild(nameField);
143

  
144
        var namelastField=createTextField("origNamelast" + aoCount, "25");
145
        var namelastCell = document.createElement("td");
146
        namelastCell.appendChild(namelastField);
147

  
148
        var roleField=createRoleTypeSelect("origRole" + aoCount);
149
        var roleCell = document.createElement("td");
150
        roleCell.appendChild(roleField); 
151

  
152
        var aoRow = document.createElement("tr");
153
        aoRow.appendChild(nameCell);
154
        aoRow.appendChild(namelastCell);
155
        aoRow.appendChild(roleCell);
156

  
157
        return aoRow;
158
    }
159

  
160
    function createRoleTypeSelect(name) {
161
        var newField=document.createElement("select");
162
        newField.setAttribute("name", name);
163
	var option1=document.createElement("option");
164
	var text1=document.createTextNode("Principal Investigator");
165
	option1.appendChild(text1);
166
	newField.appendChild(option1);
167
	var option2=document.createElement("option");
168
	var text2=document.createTextNode("Custodian/Steward");
169
	option2.appendChild(text2);
170
	newField.appendChild(option2);
171
	var option3=document.createElement("option");
172
	var text3=document.createTextNode("Metadata Provider");
173
	option3.appendChild(text3);
174
	newField.appendChild(option3)
175
	var option4=document.createElement("option");
176
	var text4=document.createTextNode("Owner");
177
	option4.appendChild(text4);
178
	newField.appendChild(option4);
179
	return newField;
180
    }
181

  
129 182
    function copyContact(){
130 183
        var checkBox = document.getElementById("copyCheckBox");
131 184
        if(checkBox.checked == true)
......
466 519
       target="guide">ADDITIONAL ORIGINATORS</a>
467 520
	</font></b>
468 521
  </p>
522
   [% numAO = 1 %]
523
 [% IF aoCount > 0 %]
524
   [% numAO = aoCount %]
525
 [% END %]
526
  <input type="hidden" name="aoCount" value="[%numAO%]" 
527
            id="aoCount">
469 528
  <table cellspacing="0" border="0" cellpadding="9" width="760"
470 529
bgcolor="#c6d6e7">
471 530
    <tr> 
......
479 538
        <p><font size="-1"><b>Role</b></font></p>
480 539
      </td>
481 540
    </tr>
482
    <tr> 
483
      <td width="21%" valign="TOP"> 
484
        <p><font size="-1"> 
485
          <input type="TEXT" name="origNamefirst1" value="[%origNamefirst1%]">
486
          </font></p>
487
      </td>
488
      <td width="21%" valign="TOP"> 
489
        <p><font size="-1"> 
490
          <input type="TEXT" name="origNamelast1" value="[%origNamelast1%]">
491
          </font></p>
492
      </td>
493
      <td width="58%" valign="TOP"> 
494
        <p> <font size="-1">
495
          <select name="origRole1">
541
    [% cnt = 1 %]
542
        [% WHILE cnt <= numAO%]
543
            <tr> 
544
            <td>
545
            [% SET key = "origNamefirst${cnt}" %]
546
            <input name="origNamefirst[%cnt%]" value="[%$key%]" size="25">
547
            </td>
548

  
549

  
550
            <td>
551
            [% SET key = "origNamelast${cnt}" %]
552
            <input name="origNamelast[%cnt%]" value="[%$key%]" size="25">
553
            </td>
554

  
555
	   <td> 
556
           [% SET origR = "origRole${cnt}" %]
557
	  <select name="origRole[%cnt%]">
496 558
	    [% IF form == 're_entry' %]
497
	     	<option selected>[%origRole1%]</option>
559
	     	<option selected>[%$origR%]</option>
498 560
	    [% END %]
499 561
            <option>Principal Investigator</option>
500 562
            <option>Custodian/Steward</option>
501 563
            <option>Metadata Provider</option>
502 564
            <option>Owner</option>
503
          </select>
504
          </font></p>
505
      </td>
506
    </tr>
507
    <tr> 
508
      <td width="21%" valign="TOP"> 
509
        <p><font size="-1"> 
510
          <input type="TEXT" name="origNamefirst2" value="[%origNamefirst2%]">
511
          </font></p>
512
      </td>
513
      <td width="21%" valign="TOP"> 
514
        <p><font size="-1"> 
515
          <input type="TEXT" name="origNamelast2" value="[%origNamelast2%]">
516
          </font></p>
517
      </td>
518
      <td width="58%" valign="TOP"> 
519
        <p> <font size="-1">
520
          <select name="origRole2">
521
	    [% IF form == 're_entry' %]
522
	     	<option selected>[%origRole2%]</option>
523
	    [% END %]
524
            <option>Principal Investigator</option>
525
            <option>Custodian/Steward</option>
526
            <option>Metadata Provider</option>
527
            <option>Owner</option>
528
          </select>
529
          </font></p>
530
      </td>
531
    </tr>
532
    <tr> 
533
      <td width="21%" valign="TOP"> 
534
        <p><font size="-1"> 
535
          <input type="TEXT" name="origNamefirst3" value="[%origNamefirst3%]">
536
          </font></p>
537
      </td>
538
      <td width="21%" valign="TOP"> 
539
        <p><font size="-1"> 
540
          <input type="TEXT" name="origNamelast3" value="[%origNamelast3%]">
541
          </font></p>
542
      </td>
543
      <td width="58%" valign="TOP"> 
544
        <p> <font size="-1">
545
          <select name="origRole3">
546
	    [% IF form == 're_entry' %]
547
	     	<option selected>[%origRole3%]</option>
548
	    [% END %]
549
            <option>Principal Investigator</option>
550
            <option>Custodian/Steward</option>
551
            <option>Metadata Provider</option>
552
            <option>Owner</option>
553
          </select>
554
          </font></p>
555
      </td>
556
    </tr>
557
    <tr> 
558
      <td width="21%" valign="TOP"> 
559
        <p><font size="-1"> 
560
          <input type="TEXT" name="origNamefirst4" value="[%origNamefirst4%]">
561
          </font></p>
562
      </td>
563
      <td width="21%" valign="TOP"> 
564
        <p><font size="-1"> 
565
          <input type="TEXT" name="origNamelast4" value="[%origNamelast4%]">
566
          </font></p>
567
      </td>
568
      <td width="58%" valign="TOP"> 
569
        <p> <font size="-1">
570
          <select name="origRole4">
571
	    [% IF form == 're_entry' %]
572
	     	<option selected>[%origRole4%]</option>
573
	    [% END %]
574
            <option>Principal Investigator</option>
575
            <option>Custodian/Steward</option>
576
            <option>Metadata Provider</option>
577
            <option>Owner</option>
578
          </select>
579
          </font></p>
580
      </td>
581
    </tr>
582
    <tr> 
583
      <td width="21%" valign="TOP"> 
584
        <p><font size="-1"> 
585
          <input type="TEXT" name="origNamefirst5" value="[%origNamefirst5%]">
586
          </font></p>
587
      </td>
588
      <td width="21%" valign="TOP"> 
589
        <p><font size="-1"> 
590
          <input type="TEXT" name="origNamelast5" value="[%origNamelast5%]">
591
          </font></p>
592
      </td>
593
      <td width="58%" valign="TOP"> 
594
        <p> <font size="-1">
595
          <select name="origRole5">
596
	    [% IF form == 're_entry' %]
597
	     	<option selected>[%origRole5%]</option>
598
	    [% END %]
599
            <option>Principal Investigator</option>
600
            <option>Custodian/Steward</option>
601
            <option>Metadata Provider</option>
602
            <option>Owner</option>
603
          </select>
604
          </font></p>
605
      </td>
606
    </tr>
607
    <tr> 
608
      <td width="21%" valign="TOP"> 
609
        <p><font size="-1"> 
610
          <input type="TEXT" name="origNamefirst6" value="[%origNamefirst6%]">
611
          </font></p>
612
      </td>
613
      <td width="21%" valign="TOP"> 
614
        <p><font size="-1"> 
615
          <input type="TEXT" name="origNamelast6" value="[%origNamelast6%]">
616
          </font></p>
617
      </td>
618
      <td width="58%" valign="TOP"> 
619
        <p> <font size="-1">
620
          <select name="origRole6">
621
	    [% IF form == 're_entry' %]
622
	     	<option selected>[%origRole6%]</option>
623
	    [% END %]
624
            <option>Principal Investigator</option>
625
            <option>Custodian/Steward</option>
626
            <option>Metadata Provider</option>
627
            <option>Owner</option>
628
          </select>
629
          </font></p>
630
      </td>
631
    </tr>
632
    <tr> 
633
      <td width="21%" valign="TOP"> 
634
        <p><font size="-1"> 
635
          <input type="TEXT" name="origNamefirst7" value="[%origNamefirst7%]">
636
          </font></p>
637
      </td>
638
      <td width="21%" valign="TOP"> 
639
        <p><font size="-1"> 
640
          <input type="TEXT" name="origNamelast7" value="[%origNamelast7%]">
641
          </font></p>
642
      </td>
643
      <td width="58%" valign="TOP"> 
644
        <p> <font size="-1">
645
          <select name="origRole7">
646
	    [% IF form == 're_entry' %]
647
	     	<option selected>[%origRole7%]</option>
648
	    [% END %] 
649
            <option>Principal Investigator</option>
650
            <option>Custodian/Steward</option>
651
            <option>Metadata Provider</option>
652
            <option>Owner</option>
653
          </select>
654
          </font></p>
655
      </td>
656
    </tr>
657
    <tr> 
658
      <td width="21%" valign="TOP"> 
659
        <p><font size="-1"> 
660
          <input type="TEXT" name="origNamefirst8" value="[%origNamefirst8%]">
661
          </font></p>
662
      </td>
663
      <td width="21%" valign="TOP"> 
664
        <p><font size="-1"> 
665
          <input type="TEXT" name="origNamelast8" value="[%origNamelast8%]">
666
          </font></p>
667
      </td>
668
      <td width="58%" valign="TOP"> 
669
        <p> <font size="-1">
670
          <select name="origRole8">
671
	    [% IF form == 're_entry' %]
672
	     	<option selected>[%origRole8%]</option>
673
	    [% END %]
674
            <option>Principal Investigator</option>
675
            <option>Custodian/Steward</option>
676
            <option>Metadata Provider</option>
677
            <option>Owner</option>
678
          </select>
679
          </font></p>
680
      </td>
681
    </tr>
682
    <tr> 
683
      <td width="21%" valign="TOP"> 
684
        <p><font size="-1"> 
685
          <input type="TEXT" name="origNamefirst9" value="[%origNamefirst9%]">
686
          </font></p>
687
      </td>
688
      <td width="21%" valign="TOP"> 
689
        <p><font size="-1"> 
690
          <input type="TEXT" name="origNamelast9" value="[%origNamelast9%]">
691
          </font></p>
692
      </td>
693
      <td width="58%" valign="TOP"> 
694
        <p> <font size="-1">
695
          <select name="origRole9">
696
	    [% IF form == 're_entry' %]
697
	     	<option selected>[%origRole9%]</option>
698
	    [% END %]
699
            <option>Principal Investigator</option>
700
            <option>Custodian/Steward</option>
701
            <option>Metadata Provider</option>
702
            <option>Owner</option>
703
          </select>
704
          </font></p>
705
      </td>
706
    </tr>
707
    <tr> 
708
      <td width="21%" valign="TOP"> 
709
        <p><font size="-1"> 
710
          <input type="TEXT" name="origNamefirst10" value="[%origNamefirst10%]">
711
          </font></p>
712
      </td>
713
      <td width="21%" valign="TOP"> 
714
        <p><font size="-1"> 
715
          <input type="TEXT" name="origNamelast10" value="[%origNamelast10%]">
716
          </font></p>
717
      </td>
718
      <td width="58%" valign="TOP"> 
719
        <p> <font size="-1">
720
          <select name="origRole10">
721
	    [% IF form == 're_entry' %]
722
	     	<option selected>[%origRole10%]</option>
723
	    [% END %]
724
            <option>Principal Investigator</option>
725
            <option>Custodian/Steward</option>
726
            <option>Metadata Provider</option>
727
            <option>Owner</option>
728
          </select>
729
          </font></p>
730
      </td>
731
    </tr>
565
            </select>
566
            </td>
567
            </tr>
568
            [% cnt = cnt + 1 %]
569
         [% END %]
570
	 <tr id="addaorow"> 
571
            <td>
572
                <input type="button" value="Add Associated Party" id="addaobutton1"
573
                    onClick="addAdditionalPeople()">
574
            </td>
575
        </tr>
732 576
  </table>
733 577
  <br>
734 578
  <p align="left"><font size="4" color="0000ff"><b><font size="-1">
lib/style/common/templates/genericResponse.tmpl
86 86
  <input type="hidden" name="origPhoneContact" value="[%origPhoneContact%]">
87 87
  <input type="hidden" name="origFAXContact" value="[%origFAXContact%]">
88 88
  <input type="hidden" name="origEmailContact" value="[%origEmailContact%]">
89
  <input type="hidden" name="origNamefirst1" value="[%origNamefirst1%]">
90
  <input type="hidden" name="origNamelast1" value="[%origNamelast1%]">
91
  <input type="hidden" name="origRole1" value="[%origRole1%]">    
92
  <input type="hidden" name="origNamefirst2" value="[%origNamefirst2%]">
93
  <input type="hidden" name="origNamelast2" value="[%origNamelast2%]">
94
  <input type="hidden" name="origRole2" value="[%origRole2%]">    
95
  <input type="hidden" name="origNamefirst3" value="[%origNamefirst3%]">
96
  <input type="hidden" name="origNamelast3" value="[%origNamelast3%]">
97
  <input type="hidden" name="origRole3" value="[%origRole3%]">    
98
  <input type="hidden" name="origNamefirst4" value="[%origNamefirst4%]">
99
  <input type="hidden" name="origNamelast4" value="[%origNamelast4%]">
100
  <input type="hidden" name="origRole4" value="[%origRole4%]">    
101
  <input type="hidden" name="origNamefirst5" value="[%origNamefirst5%]">
102
  <input type="hidden" name="origNamelast5" value="[%origNamelast5%]">
103
  <input type="hidden" name="origRole5" value="[%origRole5%]">    
104
  <input type="hidden" name="origNamefirst6" value="[%origNamefirst6%]">
105
  <input type="hidden" name="origNamelast6" value="[%origNamelast6%]">
106
  <input type="hidden" name="origRole6" value="[%origRole6%]">    
107
  <input type="hidden" name="origNamefirst7" value="[%origNamefirst7%]">
108
  <input type="hidden" name="origNamelast7" value="[%origNamelast7%]">
109
  <input type="hidden" name="origRole7" value="[%origRole7%]">    
110
  <input type="hidden" name="origNamefirst8" value="[%origNamefirst8%]">
111
  <input type="hidden" name="origNamelast8" value="[%origNamelast8%]">
112
  <input type="hidden" name="origRole8" value="[%origRole8%]">    
113
  <input type="hidden" name="origNamefirst9" value="[%origNamefirst9%]">
114
  <input type="hidden" name="origNamelast9" value="[%origNamelast9%]">
115
  <input type="hidden" name="origRole9" value="[%origRole9%]">    
116
  <input type="hidden" name="origNamefirst10" value="[%origNamefirst10%]">
117
  <input type="hidden" name="origNamelast10" value="[%origNamelast10%]">
118
  <input type="hidden" name="origRole10" value="[%origRole10%]">
89
 [% numAO = 0 %]
90
    [% IF aoCount > 0 %]
91
        [% numAO = aoCount %]
92
    [% END %]
93
  [% cnt = 1 %]
94
  [% WHILE cnt <= numAO %]
95
      [% SET origNamefirst = "origNamefirst${cnt}" %]
96
      [% SET origNamelast = "origNamelast${cnt}" %]
97
      [% SET origRole = "origRole${cnt}" %]
98
      <input type="hidden" name="[% origNamefirst %]" value="[% $origNamefirst%]">
99
      <input type="hidden" name="[% origNamelast %]" value="[% $origNamelast%]">
100
      <input type="hidden" name="[% origRole %]" value="[% $origRole%]">
101
      [% cnt = cnt + 1 %]
102
  [% END %]
103

  
119 104
  <input type="hidden" name="abstract" value="[%abstract%]">
120 105
  <input type="hidden" name="keyCount" value="[%keyCount%]">
121 106
  [% numKey = 0 %]
src/perl/register-dataset.cgi
1420 1420
    # find out the tag <creator>. 
1421 1421
    $results = $doc->findnodes('//dataset/creator/individualName');
1422 1422
    debug("Registry: Creators: ".$results->size());
1423
    if ($results->size() > 11) {
1424
        errMoreThanN("creator/individualName");
1425
    } else {
1426
        foreach $node ($results->get_nodelist) {
1423
     foreach $node ($results->get_nodelist) {
1427 1424
            dontOccur($node, "../positionName|../onlineURL|../userId", 
1428 1425
              "positionName, onlineURL, userId");
1429 1426
        
......
1495 1492
                }
1496 1493
            }
1497 1494
        }
1498
    }
1499 1495

  
1500 1496
    $results = $doc->findnodes('//dataset/creator/organizationName');
1501 1497
    my $wgroups = $doc->findnodes("//dataset/creator/organizationName[contains(text(),'(NCEAS ')]");
......
1524 1520
    }
1525 1521

  
1526 1522
    $results = $doc->findnodes('//dataset/metadataProvider');
1527
    if ($results->size() > 11) {
1528
        errMoreThanN("metadataProvider");    
1529
    } else {
1530
        foreach $node ($results->get_nodelist) {
1523
    foreach $node ($results->get_nodelist) {
1531 1524
            dontOccur($node, "./organizationName|./positionName|./onlineURL|./userId|./electronicMailAddress|./phone|./address", 
1532 1525
                "organizationName, positionName, onlineURL, userId, electronicMailAddress, phone, address in metadataProvider");
1533 1526
        
1534
            $tempResult = $node->findnodes('./individualName');
1527
	    $tempResult = $node->findnodes('./individualName');
1535 1528
            if ($tempResult->size > 1) {
1536 1529
                errMoreThanOne("metadataProvider/indvidualName");
1537 1530
            } else {
......
1548 1541
                }
1549 1542
            }
1550 1543
        }
1551
    }
1552 1544

  
1553 1545
    $results = $doc->findnodes('//dataset/associatedParty');
1554
    if ($results->size() > 10) {
1555
        errMoreThanN("associatedParty");
1556
    } else {
1557
        foreach $node ($results->get_nodelist) {
1546
    foreach $node ($results->get_nodelist) {
1558 1547
            dontOccur($node, "./organizationName|./positionName|./onlineURL|./userId|./electronicMailAddress|./phone|./address", 
1559 1548
                "organizationName, positionName, onlineURL, userId, electronicMailAddress, phone, address in associatedParty");
1560 1549
       
......
1569 1558
                    $aoCount++;           
1570 1559
                }
1571 1560
            }
1572
        }
1573
    }
1561
     }
1574 1562

  
1575 1563
    $results = $doc->findnodes('//dataset/publisher');
1576
    if ($results->size() > 10) {
1577
        errMoreThanN("publisher");
1578
    } else {
1564
#    if ($results->size() > 10) {
1565
 #       errMoreThanN("publisher");
1566
 #   } else {
1579 1567
        foreach $node ($results->get_nodelist) {
1580 1568
            dontOccur($node, "./organizationName|./positionName|./onlineURL|./userId|./electronicMailAddress|./phone|./address", 
1581 1569
                "organizationName, positionName, onlineURL, userId, electronicMailAddress, phone, address in associatedParty");
......
1592 1580
                }
1593 1581
            }
1594 1582
        }
1595
    }
1583
  #  }
1596 1584

  
1597
    if ($aoCount > 11) {
1598
        errMoreThanN("Additional Originators");
1599
    } 
1585
  #  if ($aoCount > 11) {
1586
  #      errMoreThanN("Additional Originators");
1587
 #   } 
1600 1588

  
1589
    $$templateVars{'aoCount'} = $aoCount-1;
1590
    
1601 1591
    dontOccur($doc, "./pubDate", "pubDate");
1602 1592
    dontOccur($doc, "./language", "language");
1603 1593
    dontOccur($doc, "./series", "series");
......
2171 2161
        $$templateVars{'origFAXContact'} = normalizeCD($FORM::origFAXContact);
2172 2162
        $$templateVars{'origEmailContact'} = normalizeCD($FORM::origEmailContact);    
2173 2163
    }
2174
    $$templateVars{'origNamefirst1'} = normalizeCD($FORM::origNamefirst1);
2175
    $$templateVars{'origNamelast1'} = normalizeCD($FORM::origNamelast1);
2176
    if($FORM::origNamefirst1 eq "" && $FORM::origNamelast1 eq ""){
2177
        $$templateVars{'origRole1'} = "";
2178
    }else{
2179
        $$templateVars{'origRole1'} = $FORM::origRole1;
2164

  
2165
    $$templateVars{'aoCount'} = $FORM::aoCount;
2166
    foreach my $origName (param()) {
2167
	if ($origName =~ /origNamefirst/) {
2168
	    my $origNameIndex = $origName;
2169
	    $origNameIndex =~ s/origNamefirst//; # get the index of the parameter 0, ..., 10
2170
	    my $origNamelast = "origNamelast".$origNameIndex;
2171
	    my $origRole = "origRole".$origNameIndex;
2172
	    if ( $origNameIndex =~ /[0-9]/  && $origNameIndex > 0){
2173
		if (hasContent(param($origName)) && hasContent(param($origNamelast)) && hasContent(param($origRole))) {
2174
		    debug("Registry processing keyword: $origName = ".param($origName)." $origNamelast = ".param($origNamelast)." $origRole = ".param($origRole));
2175
		    $$templateVars{$origName} = normalizeCD(param($origName));
2176
		    $$templateVars{$origNamelast} = normalizeCD(param($origNamelast));
2177
		    $$templateVars{$origRole} = normalizeCD(param($origRole));
2178
		}
2179
	    }
2180
	}
2180 2181
    }
2181
    $$templateVars{'origNamefirst2'} = normalizeCD($FORM::origNamefirst2);
2182
    $$templateVars{'origNamelast2'} = normalizeCD($FORM::origNamelast2);
2183
    if($FORM::origNamefirst2 eq "" && $FORM::origNamelast2 eq ""){
2184
        $$templateVars{'origRole2'} = "";
2185
    }else{
2186
        $$templateVars{'origRole2'} = $FORM::origRole2;
2187
    }
2188
    $$templateVars{'origNamefirst3'} = normalizeCD($FORM::origNamefirst3);
2189
    $$templateVars{'origNamelast3'} = normalizeCD($FORM::origNamelast3);
2190
    if($FORM::origNamefirst3 eq "" && $FORM::origNamelast3 eq ""){
2191
        $$templateVars{'origRole3'} = "";
2192
    }else{
2193
        $$templateVars{'origRole3'} = $FORM::origRole3;
2194
    }
2195
    $$templateVars{'origNamefirst4'} = normalizeCD($FORM::origNamefirst4);
2196
    $$templateVars{'origNamelast4'} = normalizeCD($FORM::origNamelast4);
2197
    if($FORM::origNamefirst4 eq "" && $FORM::origNamelast4 eq ""){
2198
        $$templateVars{'origRole4'} = "";
2199
    }else{
2200
        $$templateVars{'origRole4'} = $FORM::origRole4;
2201
    }
2202
    $$templateVars{'origNamefirst5'} = normalizeCD($FORM::origNamefirst5);
2203
    $$templateVars{'origNamelast5'} = normalizeCD($FORM::origNamelast5);
2204
    if($FORM::origNamefirst5 eq "" && $FORM::origNamelast5 eq ""){
2205
        $$templateVars{'origRole5'} = "";
2206
    }else{
2207
        $$templateVars{'origRole5'} = $FORM::origRole5;
2208
    }
2209
    $$templateVars{'origNamefirst6'} = normalizeCD($FORM::origNamefirst6);
2210
    $$templateVars{'origNamelast6'} = normalizeCD($FORM::origNamelast6);
2211
    if($FORM::origNamefirst6 eq "" && $FORM::origNamelast6 eq ""){
2212
        $$templateVars{'origRole6'} = "";
2213
    }else{
2214
        $$templateVars{'origRole6'} = $FORM::origRole6;
2215
    }
2216
    $$templateVars{'origNamefirst7'} = normalizeCD($FORM::origNamefirst7);
2217
    $$templateVars{'origNamelast7'} = normalizeCD($FORM::origNamelast7);
2218
    if($FORM::origNamefirst7 eq "" && $FORM::origNamelast7 eq ""){
2219
        $$templateVars{'origRole7'} = "";
2220
    }else{
2221
        $$templateVars{'origRole7'} = $FORM::origRole7;
2222
    }
2223
    $$templateVars{'origNamefirst8'} = normalizeCD($FORM::origNamefirst8);
2224
    $$templateVars{'origNamelast8'} = normalizeCD($FORM::origNamelast8);
2225
    if($FORM::origNamefirst8 eq "" && $FORM::origNamelast8 eq ""){
2226
        $$templateVars{'origRole8'} = "";
2227
    }else{
2228
        $$templateVars{'origRole8'} = $FORM::origRole8;
2229
    }
2230
    $$templateVars{'origNamefirst9'} = normalizeCD($FORM::origNamefirst9);
2231
    $$templateVars{'origNamelast9'} = normalizeCD($FORM::origNamelast9);
2232
    if($FORM::origNamefirst9 eq "" && $FORM::origNamelast9 eq ""){
2233
        $$templateVars{'origRole9'} = "";
2234
    }else{
2235
        $$templateVars{'origRole9'} = $FORM::origRole9;
2236
    }
2237
    $$templateVars{'origNamefirst10'} = normalizeCD($FORM::origNamefirst10);
2238
    $$templateVars{'origNamelast10'} = normalizeCD($FORM::origNamelast10);
2239
    if($FORM::origNamefirst10 eq "" && $FORM::origNamelast10 eq ""){
2240
        $$templateVars{'origRole10'} = "";
2241
    }else{
2242
        $$templateVars{'origRole10'} = $FORM::origRole10;
2243
    }
2182

  
2244 2183
    $$templateVars{'abstract'} = normalizeCD($FORM::abstract);
2245 2184
    $$templateVars{'keyCount'} = $FORM::keyCount;
2246 2185
    foreach my $kyd (param()) {
......
2413 2352
    $$templateVars{'origPhoneContact'} = $FORM::origPhoneContact;
2414 2353
    $$templateVars{'origFAXContact'} = $FORM::origFAXContact;
2415 2354
    $$templateVars{'origEmailContact'} = $FORM::origEmailContact;    
2416
    $$templateVars{'origNamefirst1'} = $FORM::origNamefirst1;
2417
    $$templateVars{'origNamelast1'} = $FORM::origNamelast1;
2418
    $$templateVars{'origRole1'} = $FORM::origRole1;
2419
    $$templateVars{'origNamefirst2'} = $FORM::origNamefirst2;
2420
    $$templateVars{'origNamelast2'} = $FORM::origNamelast2;
2421
    $$templateVars{'origRole2'} = $FORM::origRole2;
2422
    $$templateVars{'origNamefirst3'} = $FORM::origNamefirst3;
2423
    $$templateVars{'origNamelast3'} = $FORM::origNamelast3;
2424
    $$templateVars{'origRole3'} = $FORM::origRole3;
2425
    $$templateVars{'origNamefirst4'} = $FORM::origNamefirst4;
2426
    $$templateVars{'origNamelast4'} = $FORM::origNamelast4;
2427
    $$templateVars{'origRole4'} = $FORM::origRole4;
2428
    $$templateVars{'origNamefirst5'} = $FORM::origNamefirst5;
2429
    $$templateVars{'origNamelast5'} = $FORM::origNamelast5;
2430
    $$templateVars{'origRole5'} = $FORM::origRole5;
2431
    $$templateVars{'origNamefirst6'} = $FORM::origNamefirst6;
2432
    $$templateVars{'origNamelast6'} = $FORM::origNamelast6;
2433
    $$templateVars{'origRole6'} = $FORM::origRole6;
2434
    $$templateVars{'origNamefirst7'} = $FORM::origNamefirst7;
2435
    $$templateVars{'origNamelast7'} = $FORM::origNamelast7;
2436
    $$templateVars{'origRole7'} = $FORM::origRole7;
2437
    $$templateVars{'origNamefirst8'} = $FORM::origNamefirst8;
2438
    $$templateVars{'origNamelast8'} = $FORM::origNamelast8;
2439
    $$templateVars{'origRole8'} = $FORM::origRole8;
2440
    $$templateVars{'origNamefirst9'} = $FORM::origNamefirst9;
2441
    $$templateVars{'origNamelast9'} = $FORM::origNamelast9;
2442
    $$templateVars{'origRole9'} = $FORM::origRole9;
2443
    $$templateVars{'origNamefirst10'} = $FORM::origNamefirst10;
2444
    $$templateVars{'origNamelast10'} = $FORM::origNamelast10;
2445
    $$templateVars{'origRole10'} = $FORM::origRole10;
2355
    
2356
    $$templateVars{'aoCount'} = $FORM::aoCount;
2357
    foreach my $origName (param()) {
2358
	if ($origName =~ /origNamefirst/) {
2359
	    my $origNameIndex = $origName;
2360
	    $origNameIndex =~ s/origNamefirst//; # get the index of the parameter 0, ..., 10
2361
	    my $origNamelast = "origNamelast".$origNameIndex;
2362
	    my $origRole = "origRole".$origNameIndex;
2363
	    if ( $origNameIndex =~ /[0-9]/  && $origNameIndex > 0){
2364
		if (hasContent(param($origName)) && hasContent(param($origNamelast)) && hasContent(param($origRole))) {
2365
		    debug("Registry processing keyword: $origName = ".param($origName)." $origNamelast = ".param($origNamelast)." $origRole = ".param($origRole));
2366
		    $$templateVars{$origName} = normalizeCD(param($origName));
2367
		    $$templateVars{$origNamelast} = normalizeCD(param($origNamelast));
2368
		    $$templateVars{$origRole} = normalizeCD(param($origRole));
2369
		}
2370
	    }
2371
	}
2372
    }
2373

  
2446 2374
    $$templateVars{'abstract'} = $FORM::abstract;
2447 2375
    $$templateVars{'keyCount'} = $FORM::keyCount;
2448 2376
    foreach my $kyd (param()) {

Also available in: Unified diff