Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion class/command/EditNomination.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function execute(Context $context)
// If anything was missing, redirect back to the form
// TODO: Fix this so that it shows a useful error notification if the user gets the CAPTCHA wrong

if(!empty($missing) || !Captcha::verify()){
if(!empty($missing)){

// Notify the user that they must reselect their file

Expand Down
11 changes: 11 additions & 0 deletions class/view/ReferenceForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use \nomination\NominationFactory;
use \nomination\ReferenceFactory;
use \nomination\ViewFactory;
use \nomination\DocumentFactory;

/**
* ReferenceForm
Expand Down Expand Up @@ -60,6 +61,16 @@ public function display(Context $context)
$form->addHidden('unique_id', $context['unique_id']);

$tpl = array();

$doc = new DocumentFactory();
$docID = $ref->getDocId();

if($docID)
{
$doc = $doc->getDocumentById($ref->getDocId());
$tpl['DOWNLOAD'] = $doc->getDownloadLink($ref->getDocId(), 'Download Statement');
}

$tpl['RECOMMENDATION'] = NominationDocument::getFileWidget(null, 'recommendation', $form);
$tpl['STUDENT'] = $nom->getFullName();

Expand Down
8 changes: 7 additions & 1 deletion templates/reference_form.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ Please upload a letter of recommendation for {STUDENT}.
<p>
After uploading your letter click submit to save your recommendation.
</p>

<!-- BEGIN DOWNLOAD -->
<hr>
<p>
If you need to reupload a new statement, please use the choose file button above and resubmit the form.
Otherwise the link below will allow you to see the document you've already uploaded.</p>
{DOWNLOAD}
<!-- END DOWNLOAD -->
<div class="row">
<div class="col-md-2">
<button type="submit" class="btn btn-success btn-lg">
Expand Down