Project

General

Profile

« Previous | Next » 

Revision 1974

Additional work on the NCEAS/AdminDB integration. Working Groups now
presented as a dropdown box for multiple selection. Need to write the
info to the XML file now and handle it in confirmation template.

View differences:

lib/style/common/templates/entryForm.tmpl
102 102
[% END %]
103 103
[% IF cfg == 'nceas' %]
104 104
        <p align="left"> <font size="-1">
105
          <input type="TEXT" name="site" size="40" value="[%site%]">
106
          <b><font color="#ff0000">*</font>Working Group Name</b></font></p>
105
          <select name="wg" multiple="multiple">
106
            [% FOREACH project = projects %]
107
              [% SET label = "${project.1}: $project.3 (NCEAS ${project.0})" %]
108
              [% SET sel = '' %]
109
              [% FOREACH group = wg %]
110
                  [% IF group == label %]
111
                      [% SET sel = 'selected="selected"' %]
112
                  [% END %]
113
              [% END %]
114
              <option [% sel %]>[% label %]</option>
115
            [% END %]
116
          </select>
117
          <b><font color="#ff0000">*</font>Working Group(s)</b></font></p>
107 118
[% END %]
108 119
        <p align="left"><font size="-1"> 
109 120
          <input type="TEXT" name="title" value="[%title%]" size="53">
src/perl/register-dataset.cgi
229 229
    
230 230
    if ($FORM::cfg eq 'nceas') {
231 231
        my $projects = getProjectList();
232
        for (my $i = 0; $i < scalar(@$projects); $i++) {
233
            print @$projects[$i]->[0]," ", @$projects[$i]->[3],"\n";
234
        }
232
        $$templateVars{'projects'} = $projects;
233
        $$templateVars{'wg'} = \@FORM::wg;
235 234
    }
235

  
236 236
    $$templateVars{'siteList'} = \@sortedSites;
237 237
    $$templateVars{'section'} = "Entry Form";
238 238
    $$templateVars{'docid'} = "";
......
586 586
    push(@invalidParams, "Provider's last name is missing.")
587 587
        unless hasContent($FORM::providerSurName);
588 588
    push(@invalidParams, "Name of site is missing.")
589
        unless (hasContent($FORM::site) || $FORM::site =~ /elect/);
589
        unless (hasContent($FORM::site) || $FORM::site =~ /elect/ ||
590
                $FORM::cfg eq "nceas");
590 591
    push(@invalidParams, "Data set title is missing.")
591 592
        unless hasContent($FORM::title);
592 593
    push(@invalidParams, "Originator's first name is missing.")
......
2517 2518

  
2518 2519
    # This block is for testing only!  Remove for production use
2519 2520
    my @row1;
2520
    $row1[0] = 6000; $row1[1] = 'a1'; $row1[2] = 'a2'; $row1[3] = 'a3';
2521
    $row1[0] = 6000; $row1[1] = 'Andelman'; $row1[2] = 'Sandy'; $row1[3] = 'The very long and windy path to an apparent ecological conclusion: statistics lie';
2521 2522
    my @row2; 
2522
    $row2[0] = 7000; $row2[1] = 'b1'; $row2[2] = 'b2'; $row2[3] = 'b3';
2523
    $row2[0] = 7000; $row2[1] = 'Bascompte'; $row2[2] = 'Jordi'; $row2[3] = 'Postdoctoral Fellow';
2523 2524
    my @projects;
2524 2525
    $projects[0] = \@row1;
2525 2526
    $projects[1] = \@row2;

Also available in: Unified diff