File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -730,10 +730,11 @@ public function showForm($ID, $options = []) {
730
730
]);
731
731
echo '</td> ' ;
732
732
733
- echo '<td> ' ;
733
+ // Dynamically filled for questions with a itemtype parameter (glpi select field)
734
+ echo '<td id="plugin_formcreator_subtype_label"> ' ;
734
735
echo '</td> ' ;
735
736
736
- echo '<td> ' ;
737
+ echo '<td id="plugin_formcreator_subtype_value" > ' ;
737
738
echo '</td> ' ;
738
739
echo '</tr> ' ;
739
740
@@ -774,7 +775,7 @@ public function showForm($ID, $options = []) {
774
775
echo '</tr> ' ;
775
776
776
777
// Empty row for question-specific settings
777
- // To be replaced bydynamically
778
+ // To be replaced dynamically
778
779
echo '<tr class="plugin_formcreator_question_specific"> ' ;
779
780
echo '<td></td><td></td><td></td><td></td> ' ;
780
781
echo '</tr> ' ;
Original file line number Diff line number Diff line change @@ -1401,12 +1401,14 @@ function plugin_formcreator_changeQuestionType(rand) {
1401
1401
1402
1402
$('.plugin_formcreator_required').toggle(response.may_be_required);
1403
1403
$('.plugin_formcreator_mayBeEmpty').toggle(response.may_be_empty);
1404
+ $('#plugin_formcreator_subtype_label').html(response.label);
1405
+ $('#plugin_formcreator_subtype_value').html(response.field);
1404
1406
plugin_formcreator_updateQuestionSpecific(response.additions);
1405
1407
});
1406
1408
}
1407
1409
1408
1410
function plugin_formcreator_updateQuestionSpecific(html) {
1409
- $('.plugin_formcreator_question_specific:gt(0)' ).remove();
1411
+ $('.plugin_formcreator_question_specific').slice(1 ).remove();
1410
1412
if (html == '') {
1411
1413
$('.plugin_formcreator_question_specific').hide();
1412
1414
return;
You can’t perform that action at this time.
0 commit comments