forked from science-ation/science-ation
Disable question fields in the editor that aren't in use.
This commit is contained in:
parent
16567265d6
commit
c527e349c8
@ -46,6 +46,7 @@
|
||||
echo "<select name=\"$name\" id=\"$id\">";
|
||||
echo "<option value=\"\" />-- None --</option>";
|
||||
foreach($fields as $k=>$f) {
|
||||
if($f['editor_disabled'] == true) continue;
|
||||
$sel = ($selected == $k) ? 'selected=\"selected\"': '' ;
|
||||
echo "<option value=\"$k\" $sel >{$f['name']}</option>";
|
||||
}
|
||||
|
@ -380,6 +380,7 @@ $report_judges_fields = array(
|
||||
'header' => 'Q1',
|
||||
'width' => 1,
|
||||
'table' => 'users.id',
|
||||
'editor_disabled' => true, /* Only disables in the report editor, a report can still use it */
|
||||
'exec_function' => 'report_judges_custom_question'),
|
||||
|
||||
'question_2' => array(
|
||||
@ -387,6 +388,7 @@ $report_judges_fields = array(
|
||||
'header' => 'Q2',
|
||||
'width' => 1,
|
||||
'table' => 'users.id',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_custom_question'),
|
||||
|
||||
'question_3' => array(
|
||||
@ -394,6 +396,7 @@ $report_judges_fields = array(
|
||||
'header' => 'Q3',
|
||||
'width' => 1,
|
||||
'table' => 'users.id',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_custom_question'),
|
||||
|
||||
'question_4' => array(
|
||||
@ -401,6 +404,7 @@ $report_judges_fields = array(
|
||||
'header' => 'Q4',
|
||||
'width' => 1,
|
||||
'table' => 'users.id',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_custom_question'),
|
||||
|
||||
'question_5' => array(
|
||||
@ -408,6 +412,7 @@ $report_judges_fields = array(
|
||||
'header' => 'Q5',
|
||||
'width' => 1,
|
||||
'table' => 'users.id',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_custom_question'),
|
||||
|
||||
'question_6' => array(
|
||||
@ -415,6 +420,7 @@ $report_judges_fields = array(
|
||||
'header' => 'Q6',
|
||||
'width' => 1,
|
||||
'table' => 'users.id',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_custom_question'),
|
||||
|
||||
'question_7' => array(
|
||||
@ -422,6 +428,7 @@ $report_judges_fields = array(
|
||||
'header' => 'Q7',
|
||||
'width' => 1,
|
||||
'table' => 'users.id',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_custom_question'),
|
||||
|
||||
'question_8' => array(
|
||||
@ -429,6 +436,7 @@ $report_judges_fields = array(
|
||||
'header' => 'Q8',
|
||||
'width' => 1,
|
||||
'table' => 'users.id',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_custom_question'),
|
||||
|
||||
'question_9' => array(
|
||||
@ -436,6 +444,7 @@ $report_judges_fields = array(
|
||||
'header' => 'Q9',
|
||||
'width' => 1,
|
||||
'table' => 'users.id',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_custom_question'),
|
||||
|
||||
'question_10' => array(
|
||||
@ -443,6 +452,7 @@ $report_judges_fields = array(
|
||||
'header' => 'Q10',
|
||||
'width' => 1,
|
||||
'table' => 'users.id',
|
||||
'editor_disabled' => true,
|
||||
'exec_function' => 'report_judges_custom_question'),
|
||||
|
||||
'static_text' => array(
|
||||
@ -467,6 +477,7 @@ function report_judges_update_questions($year)
|
||||
$f = "question_{$q['ord']}";
|
||||
$report_judges_fields[$f]['header'] = $q['db_heading'];
|
||||
$report_judges_fields[$f]['name'] = 'Judge -- Custom Judge Question: '.$q['question'];
|
||||
$report_judges_fields[$f]['editor_disabled'] = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user