Skip to content

Commit 11d394d

Browse files
Merge pull request #5 from robertgarrigos/patch-1
Fixes #4 and improvement
2 parents 7dffdae + aa79b15 commit 11d394d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

node_feedback.module

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function node_feedback_settings_form() {
132132
'#default_value' => $flag_button_class_value,
133133
'#size' => 60,
134134
'#maxlength' => 128,
135-
'#required' => TRUE,
135+
'#required' => FALSE,
136136
];
137137

138138
$flag_thanks_message = $config->get('nf_thanks_message');
@@ -212,7 +212,7 @@ function node_feedback_settings_form() {
212212
* This hook declares what blocks are provided by the module.
213213
*/
214214
function node_feedback_block_info() {
215-
$blocks['nf_stats'] = [
215+
$blocks['node_feedback'] = [
216216
// info: The name of the block.
217217
'info' => t('Node Feedback: form'),
218218
'description' => 'Node Feedback form.',
@@ -229,7 +229,7 @@ function node_feedback_block_info() {
229229
function node_feedback_block_view($delta = '', $settings = [], $contexts = []) {
230230
// The $delta parameter tells us which block is being requested.
231231
switch ($delta) {
232-
case 'nf_stats':
232+
case 'node_feedback':
233233
$node = $contexts['node'];
234234
$nf_allowed_content_types = config_get('node_feedback.settings', 'nf_allowed_content_type');
235235
// dpm($nf_allowed_content_types);
@@ -240,7 +240,7 @@ function node_feedback_block_view($delta = '', $settings = [], $contexts = []) {
240240
$nf_form = backdrop_get_form('node_feedback_form', $args);
241241
// Pull out the contextual information (a node in this case) from the
242242
// contexts array.
243-
$block['subject'] = t('Feedback stats for this node');
243+
$block['subject'] = t('Feedback for this node');
244244
$block['content'] = backdrop_render($nf_form);
245245
}
246246
}

0 commit comments

Comments
 (0)