Skip to content

Commit

Permalink
Confirmation form is completed
Browse files Browse the repository at this point in the history
  • Loading branch information
kthakore committed Jan 16, 2011
1 parent bb11ab6 commit ecb5764
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
23 changes: 19 additions & 4 deletions implementation/SIMS/SIMS/lib/SIMS/Controller/Meeting.pm
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,30 @@ my( $self, $c ) = @_;
sub confirm : Chained('base') :PathPart('confirm') :Args(1) {
my ( $self, $c, $id) = @_;

my $con = $c->model('DB::MeetingConfirmation')->search( {key=> $id} )->single();

my $advisor = $con->meeting_advisors()->single();
$c->stash->{confirmation} = $c->model('DB::MeetingConfirmation')->search( {key=> $id} )->single();
my $advisor =$c->stash->{confirmation}->meeting_advisors()->single();

$c->response->redirect( $c->uri_for('/unauthorized') )
unless ( $c->user->id == $advisor->advisor_id() );

$c->stash->{confirm_url} = $c->uri_for('/').'meeting/'
.$c->stash->{meeting}->id().
'/confirm/'.$c->stash->{confirmation}->key();

if( $c->req->param('submit_confirm') )
{

$c->stash->{confirmation}->update
(
{ status => $c->req->param('status'),
details => $c->req->param('details')
}

)


}

$c->response->body( "Got confirmation correctly at ".$con->id().".</ br> and user is". $c->user->id().". And ". $advisor->advisor_id() );

}

Expand Down
2 changes: 1 addition & 1 deletion implementation/SIMS/SIMS/root/meeting/index.tt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<label>Meeting Date</label>
<input type="text" name="meeting_date" class="datetimeinput" value="[% meeting.datetime %]"><br />
<label>Description</label>
<textarea type="textfield" name="meeting_desc">[%meeting.description |html %] </textarea>
<textarea type="textfield" name="meeting_desc">[%meeting.description%] </textarea>
<input name="meeting_up_submit" type="submit" value="Update Meeting" />
</form>

Expand Down
Binary file modified implementation/SIMS/SIMS/sims.db
Binary file not shown.

0 comments on commit ecb5764

Please sign in to comment.