static public showMaxFilesize ( $name, $value ) | ||
$name | ||
$value | (default 0) |
/** * Print the config form for connections * * @return Nothing (display) **/ function showFormHelpdesk() { global $DB, $CFG_GLPI; if (!self::canView()) { return false; } $canedit = Config::canUpdate(); if ($canedit) { echo "<form name='form' action=\"" . Toolbox::getItemTypeFormURL(__CLASS__) . "\" method='post'>"; } echo "<div class='center spaced' id='tabsbody'>"; echo "<table class='tab_cadre_fixe'>"; echo "<tr><th colspan='4'>" . __('Assistance') . "</th></tr>"; echo "<tr class='tab_bg_2'>"; echo "<td width='30%'>" . __('Step for the hours (minutes)') . "</td>"; echo "<td width='20%'>"; Dropdown::showNumber('time_step', array('value' => $CFG_GLPI["time_step"], 'min' => 30, 'max' => 60, 'step' => 30, 'toadd' => array(1 => 1, 5 => 5, 10 => 10, 15 => 15, 20 => 20))); echo "</td>"; echo "<td width='30%'>" . __('Limit of the schedules for planning') . "</td>"; echo "<td width='20%'>"; Dropdown::showHours('planning_begin', array('value' => $CFG_GLPI["planning_begin"])); echo " -> "; Dropdown::showHours('planning_end', array('value' => $CFG_GLPI["planning_end"])); echo "</td></tr>"; echo "<tr class='tab_bg_2'>"; echo "<td>" . __('Default file size limit imported by the mails receiver') . "</td><td>"; MailCollector::showMaxFilesize('default_mailcollector_filesize_max', $CFG_GLPI["default_mailcollector_filesize_max"]); echo "</td>"; echo "<td>" . __('Use rich text for helpdesk') . "</td><td>"; $id = 'alert' . mt_rand(); $param['on_change'] = '$("#' . $id . '").html(""); if ($(this).val() == 0) { $("#' . $id . '").html("<br>' . __('You will lose the formatting of your data') . '"); }'; Dropdown::showYesNo("use_rich_text", $CFG_GLPI["use_rich_text"], -1, $param); echo "<span class='red' id='" . $id . "'></span>"; echo "</td></tr>"; echo "<tr class='tab_bg_2'>"; echo "<td>" . __('Default heading when adding a document to a ticket') . "</td><td>"; DocumentCategory::dropdown(array('value' => $CFG_GLPI["documentcategories_id_forticket"], 'name' => "documentcategories_id_forticket")); echo "</td>"; echo "<td>" . __('By default, a software may be linked to a ticket') . "</td><td>"; Dropdown::showYesNo("default_software_helpdesk_visible", $CFG_GLPI["default_software_helpdesk_visible"]); echo "</td></tr>"; echo "<tr class='tab_bg_2'>"; echo "<td>" . __('Keep tickets when purging hardware in the inventory') . "</td><td>"; Dropdown::showYesNo("keep_tickets_on_delete", $CFG_GLPI["keep_tickets_on_delete"]); echo "</td><td>" . __('Show personnal information in new ticket form (simplified interface)'); echo "</td><td>"; Dropdown::showYesNo('use_check_pref', $CFG_GLPI['use_check_pref']); echo "</td></tr>"; echo "<tr class='tab_bg_2'>"; echo "<td>" . __('Allow anonymous ticket creation (helpdesk.receiver)') . "</td><td>"; Dropdown::showYesNo("use_anonymous_helpdesk", $CFG_GLPI["use_anonymous_helpdesk"]); echo "</td><td>" . __('Allow anonymous followups (receiver)') . "</td><td>"; Dropdown::showYesNo("use_anonymous_followups", $CFG_GLPI["use_anonymous_followups"]); echo "</td></tr>"; echo "</table>"; echo "<table class='tab_cadre_fixe'>"; echo "<tr><th colspan='7'>" . __('Matrix of calculus for priority'); echo "<input type='hidden' name='_matrix' value='1'></th></tr>"; echo "<tr class='tab_bg_2'>"; echo "<td class='b right' colspan='2'>" . __('Impact') . "</td>"; for ($impact = 5; $impact >= 1; $impact--) { echo "<td class='center'>" . Ticket::getImpactName($impact) . '<br>'; if ($impact == 3) { $isimpact[3] = 1; echo "<input type='hidden' name='_impact_3' value='1'>"; } else { $isimpact[$impact] = ($CFG_GLPI['impact_mask'] & 1 << $impact) > 0; Dropdown::showYesNo("_impact_{$impact}", $isimpact[$impact]); } echo "</td>"; } echo "</tr>"; echo "<tr class='tab_bg_1'>"; echo "<td class='b' colspan='2'>" . __('Urgency') . "</td>"; for ($impact = 5; $impact >= 1; $impact--) { echo "<td> </td>"; } echo "</tr>"; for ($urgency = 5; $urgency >= 1; $urgency--) { echo "<tr class='tab_bg_1'>"; echo "<td>" . Ticket::getUrgencyName($urgency) . " </td>"; echo "<td>"; if ($urgency == 3) { $isurgency[3] = 1; echo "<input type='hidden' name='_urgency_3' value='1'>"; } else { $isurgency[$urgency] = ($CFG_GLPI['urgency_mask'] & 1 << $urgency) > 0; Dropdown::showYesNo("_urgency_{$urgency}", $isurgency[$urgency]); } echo "</td>"; for ($impact = 5; $impact >= 1; $impact--) { $pri = round(($urgency + $impact) / 2); if (isset($CFG_GLPI['priority_matrix'][$urgency][$impact])) { $pri = $CFG_GLPI['priority_matrix'][$urgency][$impact]; } if ($isurgency[$urgency] && $isimpact[$impact]) { $bgcolor = $_SESSION["glpipriority_{$pri}"]; echo "<td class='center' bgcolor='{$bgcolor}'>"; Ticket::dropdownPriority(array('value' => $pri, 'name' => "_matrix_{$urgency}_{$impact}")); echo "</td>"; } else { echo "<td><input type='hidden' name='_matrix_{$urgency}_{$impact}' value='{$pri}'>\n </td>"; } } echo "</tr>\n"; } if ($canedit) { echo "<tr class='tab_bg_2'>"; echo "<td colspan='7' class='center'>"; echo "<input type='submit' name='update' class='submit' value=\"" . _sx('button', 'Save') . "\">"; echo "</td></tr>"; } echo "</table></div>"; Html::closeForm(); }
/** * Print the config form for connections * * @return Nothing (display) **/ function showFormHelpdesk() { global $DB, $LANG, $CFG_GLPI; if (!haveRight("config", "w")) { return false; } echo "<form name='form' action=\"" . getItemTypeFormURL(__CLASS__) . "\" method='post'>"; echo "<div class='center' id='tabsbody'>"; echo "<table class='tab_cadre_fixe'>"; echo "<tr><th colspan='4'>" . $LANG['title'][24] . "</th></tr>"; echo "<tr class='tab_bg_2'>"; echo "<td>" . $LANG['setup'][612] . " :</td><td>"; Dropdown::showYesNo("is_ticket_category_mandatory", $CFG_GLPI["is_ticket_category_mandatory"]); echo "</td><td>" . $LANG['setup'][148] . " :</td><td>"; Dropdown::showInteger('time_step', $CFG_GLPI["time_step"], 30, 60, 30, array(5 => 5, 10 => 10, 15 => 15, 20 => 20)); echo " " . $LANG['job'][22]; echo "</td></tr>"; echo "<tr class='tab_bg_2'>"; echo "<td>" . $LANG['setup'][610] . " :</td><td>"; Dropdown::showYesNo("is_ticket_title_mandatory", $CFG_GLPI["is_ticket_title_mandatory"]); echo "</td><td>" . $LANG['setup'][223] . " :</td><td>"; Dropdown::showHours('planning_begin', $CFG_GLPI["planning_begin"]); echo " -> "; Dropdown::showHours('planning_end', $CFG_GLPI["planning_end"]); echo "</td></tr>"; echo "<tr class='tab_bg_2'>"; echo "<td> " . $LANG['setup'][611] . " :</td><td>"; Dropdown::showYesNo("is_ticket_content_mandatory", $CFG_GLPI["is_ticket_content_mandatory"]); echo "</td><td>" . $LANG['mailgate'][7] . " (" . $LANG['setup'][46] . ") :</td><td>"; MailCollector::showMaxFilesize('default_mailcollector_filesize_max', $CFG_GLPI["default_mailcollector_filesize_max"]); echo "</td></tr>"; echo "<tr class='tab_bg_2'>"; echo "<td> " . $LANG['setup'][52] . " :</td><td>"; $autoassign = array(NO_AUTO_ASSIGN => $LANG['choice'][0], AUTO_ASSIGN_HARDWARE_CATEGORY => $LANG['setup'][51], AUTO_ASSIGN_CATEGORY_HARDWARE => $LANG['setup'][50]); Dropdown::showFromArray('auto_assign_mode', $autoassign, array('value' => $CFG_GLPI["auto_assign_mode"])); echo "</td><td>" . $LANG['setup'][409] . " :</td><td>"; Dropdown::show('DocumentCategory', array('value' => $CFG_GLPI["documentcategories_id_forticket"], 'name' => "documentcategories_id_forticket")); echo "</td></tr>"; echo "<tr class='tab_bg_2'>"; echo "<td>" . $LANG['entity'][18] . " :</td><td>"; Dropdown::showInteger('autoclose_delay', $CFG_GLPI['autoclose_delay'], 0, 99, 1, array(-10 => $LANG['setup'][307])); echo " " . $LANG['stats'][31] . "</td>"; echo "<td>" . $LANG['setup'][608] . " :</td><td>"; Dropdown::showYesNo("default_software_helpdesk_visible", $CFG_GLPI["default_software_helpdesk_visible"]); echo "</td></tr>"; echo "<tr class='tab_bg_2'>"; echo "<td>" . $LANG['tracking'][37] . " :</td><td>"; Dropdown::showYesNo("keep_tickets_on_delete", $CFG_GLPI["keep_tickets_on_delete"]); echo "</td><td>" . $LANG['setup'][219] . " :</td><td>"; Dropdown::showYesNo("use_anonymous_helpdesk", $CFG_GLPI["use_anonymous_helpdesk"]); echo "</td></tr>"; echo "</table><br>"; echo "<table class='tab_cadre_fixe'>"; echo "<tr><th colspan='7'>" . $LANG['help'][1]; echo "<input type='hidden' name='_matrix' value='1'></th></tr>"; echo "<tr class='tab_bg_2'>"; echo "<td class='b right' colspan='2'>" . $LANG['joblist'][30] . " :</td>"; for ($impact = 5, $msg = 47; $impact >= 1; $impact--, $msg++) { echo "<td>" . $LANG['help'][$msg] . " : "; if ($impact == 3) { $isimpact[3] = 1; echo "<input type='hidden' name='_impact_3' value='1'>"; } else { $isimpact[$impact] = ($CFG_GLPI['impact_mask'] & 1 << $impact) > 0; Dropdown::showYesNo("_impact_{$impact}", $isimpact[$impact]); } echo "</td>"; } echo "</tr>"; echo "<tr class='tab_bg_1'>"; echo "<td class='b' colspan='2'>" . $LANG['joblist'][29] . " :</td>"; for ($impact = 5, $msg = 47; $impact >= 1; $impact--, $msg++) { echo "<td> </td>"; } echo "</tr>"; for ($urgency = 5, $msg = 42; $urgency >= 1; $urgency--, $msg++) { echo "<tr class='tab_bg_1'>"; echo "<td>" . $LANG['help'][$msg] . " :</td>"; echo "<td>"; if ($urgency == 3) { $isurgency[3] = 1; echo "<input type='hidden' name='_urgency_3' value='1'>"; } else { $isurgency[$urgency] = ($CFG_GLPI['urgency_mask'] & 1 << $urgency) > 0; Dropdown::showYesNo("_urgency_{$urgency}", $isurgency[$urgency]); } echo "</td>"; for ($impact = 5; $impact >= 1; $impact--) { $pri = round(($urgency + $impact) / 2); if (isset($CFG_GLPI['priority_matrix'][$urgency][$impact])) { $pri = $CFG_GLPI['priority_matrix'][$urgency][$impact]; } if ($isurgency[$urgency] && $isimpact[$impact]) { $bgcolor = $_SESSION["glpipriority_{$pri}"]; echo "<td bgcolor='{$bgcolor}'>"; Ticket::dropdownPriority("_matrix_{$urgency}_{$impact}", $pri); echo "</td>"; } else { echo "<td><input type='hidden' name='_matrix_{$urgency}_{$impact}' value='{$pri}'></td>"; } } echo "</tr>\n"; } echo "<tr class='tab_bg_2'>"; echo "<td colspan='7' class='center'>"; echo "<input type='hidden' name='id' value='" . $CFG_GLPI["id"] . "'>"; echo "<input type='submit' name='update' class='submit' value=\"" . $LANG['buttons'][2] . "\">"; echo "</td></tr>"; echo "</table></div>"; echo "</form>"; }