Merge pull request #5205 from solgenomics/topic/generic_trial_upload
[sgn.git] / cgi-bin / solpeople / submit_marker.pl
blob3dea0b8ff9aa3bfe47067755ed8713d0e368a814
1 use strict;
3 use CXGN::DB::Connection;
4 use CXGN::Page;
5 use CXGN::Login;
6 use CXGN::Page::FormattingHelpers qw/ blue_section_html page_title_html /;
7 use CXGN::People;
8 use CXGN::People::Person;
10 my $page=CXGN::Page->new("SGN|Marker submission","Lukas");
11 my $dbh = CXGN::DB::Connection->new();
13 my ($action) = $page -> get_encoded_arguments("action");
15 my $id = CXGN::Login->new($dbh)->verify_session();
17 my $person = CXGN::People::Person->new($dbh, $id);
18 my $firstname = $person->get_first_name();
19 my $lastname = $person ->get_last_name();
20 my $person_id = $person->get_sp_person_id();
22 if (!$action) {
23 display_form();
25 elsif ($action eq "check") {
26 check_entry();
28 elsif ($action eq "submit") {
29 submit_entry();
32 sub check_entry {
35 sub submit_entry {
38 sub display_form {
40 $page->header();
42 print page_title_html("Submit Marker to SGN");
44 print <<HTML;
46 <center>
48 <form action="submit_marker.pl">
49 <table>
51 <tr><td>Marker name:</td><td><input name="marker_name" /></td></tr>
52 <tr><td>Marker type:</td><td><input type="radio" name="marker_type" value="ssr" /> SSR<br />
53 <input type="radio" name="marker_type" value="caps" /> CAPS</td></tr>
54 <tr><td>5' primer seq: </td><td><input name="5primer" size="40" /></td></tr>
55 <tr><td>3' primer seq: </td><td><input name="3primer" size="40" /></td></tr>
57 <tr><td>Annealing temp: </td><td><input name="temp" size="5" />&deg;C</td></tr>
58 <tr><td>Mg conc</td><td><input name="mgconc" size="5" /> mM</td></tr>
60 <tr><td>Enzyme</td><td><input name="enzyme" /></td></tr>
61 <tr><td>Band sizes: </td><td>&nbsp;</td></tr>
62 <!-- a complete list should be generated from the database -->
63 <tr><td>S. lycopersicum LA925</td><td><input name="band-size-1" size="5" /></td></tr>
64 <tr><td>S. pennellii LA716</td><td><input name="band-size-3" size="5" /></td></tr>
65 <tr><td>etc.</td><td>etc.</td></tr>
66 <tr><td colspan="2"></td><td></td></tr>
67 <tr><td>Submitter info:</td><td><b>$firstname $lastname</b></td></tr>
68 </table>
69 <br />
70 <input type="hidden" name="person_id" value="$person_id" />
71 <input type="submit" value="Submit Marker" /> &nbsp;
72 </form>
73 </center>
76 HTML
78 $page->footer();