Skip to content

Commit 36f4fba

Browse files
committed
added: container info to questions edit form
1 parent 6476a4c commit 36f4fba

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

languages/en.php

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
'notification:object:answer:create' => "Send a notification when an answer is created",
1919
'notification:object:question:create' => "Send a notification when a questions is created",
2020

21+
'input:container_guid:object:question:info' => "This question will be posted in %s",
22+
2123
// admin
2224
'admin:upgrades:set_question_status' => "Set status on all questions",
2325
'admin:upgrades:set_question_status:description' => "Make sure all questions have a status metadata field. Older questions don't have this by default.",

views/default/forms/object/question/save.php

+8-6
Original file line numberDiff line numberDiff line change
@@ -164,16 +164,18 @@
164164
}
165165
}
166166

167-
// end of the form
168-
$footer_fields = [];
169167
if (!$container_options) {
170-
$footer_fields[] = [
171-
'#type' => 'hidden',
172-
'name' => 'container_guid',
168+
echo elgg_view_field([
169+
'#type' => 'container_guid',
170+
'entity_type' => 'object',
171+
'entity_subtype' => \ElggQuestion::SUBTYPE,
173172
'value' => elgg_extract('container_guid', $vars),
174-
];
173+
]);
175174
}
176175

176+
// end of the form
177+
$footer_fields = [];
178+
177179
$footer_fields[] = [
178180
'#type' => 'submit',
179181
'value' => elgg_echo('submit'),

0 commit comments

Comments
 (0)