setTitle(_c("room-reservation:Configuration")); $this->setIcon("mod_room-reservation_config"); } public function processRequestVariables() { // default values $this->bPostShowWeekend = $this->oCfg->isShowWeekend(); $this->bPostShowLessons = $this->oCfg->isShowLessons(); if(isset($_POST["mod_roomReservationConfigPage"])) { if(isset($_POST["mod_roomReservationConfigPage"]["showweekend"])) { $this->bPostShowWeekend = ($_POST["mod_roomReservationConfigPage"]["showweekend"] == true); } ########### echo "bPostShowWeekend is ".($this->bPostShowWeekend?"true ":"false "); ########### if(isset($_POST["mod_roomReservationConfigPage"]["showlessons"])) { $this->bPostShowLessons = ($_POST["mod_roomReservationConfigPage"]["showlessons"] == true); } ########### echo "bPostShowLessons is ".($this->bPostShowLessons?"true ":"false "); ########### // process the request if(isset($_POST["mod_roomReservationConfigPage"]["submit"])) { $this->oCfg->setShowWeekend($this->bPostShowWeekend); $this->oCfg->setShowLessons($this->bPostShowLessons); try { $this->oCfg->writeConfig(); } catch(Exception $e) { $this->asMessages[] = $e->getMessage(); } } } } public function doShow() { // error messages if(count($this->asMessages) > 0) { printf("
%s
", nl2br(q(join("\n", $this->asMessages)))); } echo "\n"; // two rows
GroupBox(_("Privileges"), "keys");
$asAdminGroups = rrPrivilegedGroups("mod_roomreservation_admin");
$asBookGroups = rrPrivilegedGroups("mod_roomreservation_book");
$asViewGroups = rrPrivilegedGroups("mod_roomreservation_view");
echo sprintf(" %s \n%s \n%s ", _c("room-reservation:This is ". "a short summary of the privileges related to the room reservation ". "schedulde and the groups which have them assigned."), sprintf(_c("room-reservation:If one of these privileges is not assigned to ". "any group, all users on this server are allowed to perform the specified ". "action. Please use the %sgroup administration%s to assign and revoke ". "privileges."), "", ""), _c("room-reservation:Please note that every group with the booking ". "privilege can also implicitly view the booking table and every group with ". "the administration privilege can also implicitly book and view the ". "booking table.")); echo "
| \n";
GroupBox(_c("room-reservation:Periods"), "mod_room-reservation_timeslice");
printf(" %s ", _c("room-reservation:Here you can fill in the ". "periods where bookings can be undertaken. A booking period can ". "e. g. correspond to a lesson.")); echo "";
$otlb = new mod_roomReservationTimesliceListBox($this->oCfg);
$otlb->show();
echo " ";
_GroupBox();
echo " |