Révision d50a36e0
Ajouté par Assos Assos il y a presque 4 ans
drupal7/sites/all/modules/fivestar/includes/fivestar.admin.inc | ||
---|---|---|
16 | 16 |
'#title' => t('Voting tags'), |
17 | 17 |
'#description' => t('Choose the voting tags that will be available for node rating. A tag is simply a category of vote. If you only need to rate one thing per node, leave this as the default "vote".'), |
18 | 18 |
'#weight' => 3, |
19 |
);
|
|
19 |
); |
|
20 | 20 |
|
21 | 21 |
$form['tags']['tags'] = array( |
22 | 22 |
'#type' => 'textfield', |
... | ... | |
24 | 24 |
'#default_value' => variable_get('fivestar_tags', 'vote'), |
25 | 25 |
'#required' => TRUE, |
26 | 26 |
'#description' => t('Separate multiple tags with commas.'), |
27 |
);
|
|
27 |
); |
|
28 | 28 |
|
29 |
$form['#submit'][] ='fivestar_settings_submit'; |
|
29 |
$form['#submit'][] = 'fivestar_settings_submit';
|
|
30 | 30 |
|
31 | 31 |
$form['submit'] = array( |
32 | 32 |
'#type' => 'submit', |
... | ... | |
37 | 37 |
return $form; |
38 | 38 |
} |
39 | 39 |
|
40 |
/** |
|
41 |
* Submit handler for fivestar_settings() form. |
|
42 |
*/ |
|
40 | 43 |
function fivestar_settings_submit($form, &$form_state) { |
41 | 44 |
drupal_set_message(t('Your settings have been saved.')); |
42 |
// TODO We could delete all variables for removed tags
|
|
45 |
// @todo We could delete all variables for removed tags.
|
|
43 | 46 |
variable_set('fivestar_tags', $form_state['values']['tags']); |
44 | 47 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules