forked from AppStateESS/InternshipInventory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAffiliateFolder.php
38 lines (31 loc) · 1.1 KB
/
AffiliateFolder.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
namespace Intern;
\PHPWS_Core::initModClass('filecabinet', 'Folder.php');
/**
* AffiliateFolder
*
*
* @author Chris Detsch
*/
class AffiliateFolder extends \Folder
{
/**
* Similar to Folder::uploadLink except this one takes a internship id as parameter
* and links to intern module instead of filecabinet.
*/
public function documentUpload($affiliationId)
{
$link_var = array();
$link_var['folder_id'] = $this->id;
$link_var['action'] = 'uploadAffiliationAgreemenet';
$link_var['affiliate'] = $affiliationId;
$link = new \PHPWS_Link(null, 'intern', $link_var, true);
$link->convertAmp(false);
$link->setSalted();
$vars = array();
$vars['address'] = $link->getAddress();
$label = dgettext('filecabinet', 'Add document');
\javascript('open_window');
return '<button type="button" class="btn btn-default btn-md" onClick="javascript:open_window(\'' . $link->getAddress() . '\', 600, 600, \'default970975506\', 1); return false;"><i class="fa fa-upload"></i> ' . $label . '</button>';
}
}