1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* @file
|
5
|
* Contains the administrative functions of the print_pdf_wkhtmltopdf module.
|
6
|
*
|
7
|
* This file is included by the print_pdf_wkhtmltopdf module, and includes the
|
8
|
* settings form.
|
9
|
*
|
10
|
* @ingroup print
|
11
|
*/
|
12
|
|
13
|
/**
|
14
|
* Form constructor for the wkhtmltopdf options settings form.
|
15
|
*
|
16
|
* @ingroup forms
|
17
|
*/
|
18
|
function print_pdf_wkhtmltopdf_settings() {
|
19
|
$form['settings'] = array(
|
20
|
'#type' => 'fieldset',
|
21
|
'#title' => t('wkhtmltopdf options'),
|
22
|
);
|
23
|
|
24
|
$form['settings']['print_pdf_wkhtmltopdf_options'] = array(
|
25
|
'#type' => 'textfield',
|
26
|
'#title' => t('wkhtmltopdf options'),
|
27
|
'#size' => 60,
|
28
|
'#maxlength' => 500,
|
29
|
'#default_value' => variable_get('print_pdf_wkhtmltopdf_options', PRINT_PDF_WKHTMLTOPDF_OPTIONS),
|
30
|
'#description' => t('(wkhtmltopdf only) Set any additional options to be passed to the wkhtmltopdf executable. Tokens may be used in these options (see list below).'),
|
31
|
);
|
32
|
|
33
|
if (module_exists('token')) {
|
34
|
$form['settings']['print_pdf_filename_patterns'] = array(
|
35
|
'#theme' => 'token_tree',
|
36
|
'#token_types' => array('node'),
|
37
|
'#dialog' => TRUE,
|
38
|
);
|
39
|
}
|
40
|
|
41
|
return system_settings_form($form);
|
42
|
}
|