-
Notifications
You must be signed in to change notification settings - Fork 0
/
nameday.admin.inc
39 lines (38 loc) · 1.58 KB
/
nameday.admin.inc
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
39
<?php
/**
* @file
* Nameday block settings
*/
function nameday_settings() {
$form = array();
$form['nameday_show_date'] = array(
'#type' => 'checkbox',
'#title' => t('Show date in the name day'),
'#default_value' => variable_get('nameday_show_date', TRUE),
'#description' => 'If this checked, the date is displayed before the name days and holidays.'
);
$form['nameday_show_holiday'] = array(
'#type' => 'checkbox',
'#title' => t('Show holiday in the name day, if any.'),
'#default_value' => variable_get('nameday_show_holiday', TRUE),
);
$form['nameday_date_format'] = array(
"#type" => 'select',
'#title' => t('Date format'),
'#options' => array(
'small' => t('Short date format'),
'medium' => t('Medium date format'),
'large' => t('Long date format'),
'custom' => t('Custom date format'),
),
'#default_value' => variable_get('nameday_date_format', 'small'),
'#description' => t('If you want to show the date, You can choose the format of it. You can set it up in the <a href="@url">Date and time settings</a>', array('@url' => url('admin/settings/date-time'))),
);
$form['nameday_date_format_custom'] = array(
'#type' => 'textfield',
'#title' => t('Custom date format'),
'#default_value' => variable_get('nameday_date_format_custom', ''),
'#description' => t('If You choose the custom date format here You can define the date format. See the <a href="@url">PHP manual</a> for available options.', array('@url' => 'http://php.net/manual/function.date.php')),
);
return system_settings_form($form);
}