if (strlen($role->getValue('rol_start_time')) > 0) { $value = $gL10n->get('LST_FROM_TO', $role->getValue('rol_start_time', $gPreferences['system_time']), $role->getValue('rol_end_time', $gPreferences['system_time'])); } $form->addStaticControl('infobox_date', $gL10n->get('DAT_DATE'), $value); } // Meeting Point if (strlen($role->getValue('rol_location')) > 0) { $form->addStaticControl('infobox_location', $gL10n->get('SYS_LOCATION'), $role->getValue('rol_location')); } // Member Fee if (strlen($role->getValue('rol_cost')) > 0) { $form->addStaticControl('infobox_contribution', $gL10n->get('SYS_CONTRIBUTION'), $role->getValue('rol_cost') . ' ' . $gPreferences['system_currency']); } // Fee period if (strlen($role->getValue('rol_cost_period')) > 0 && $role->getValue('rol_cost_period') != 0) { $form->addStaticControl('infobox_contribution_period', $gL10n->get('SYS_CONTRIBUTION_PERIOD'), $role->getCostPeriods($role->getValue('rol_cost_period'))); } // max participants if (strlen($role->getValue('rol_max_members')) > 0) { $form->addStaticControl('infobox_max_participants', $gL10n->get('SYS_MAX_PARTICIPANTS'), $role->getValue('rol_max_members')); } $htmlBox .= $form->show(false); $htmlBox .= '</div> </div>'; } // end of infobox $page->addHtml($htmlBox); } // show complete html page $page->show(); }
$selectBoxEntries = array(0 => $gL10n->get('ROL_SYSTEM_DEFAULT_LIST')); // SQL-Statement fuer alle Listenkonfigurationen vorbereiten, die angezeigt werdne sollen $sql = 'SELECT lst_id, lst_name FROM ' . TBL_LISTS . ' WHERE lst_org_id = ' . $gCurrentOrganization->getValue('org_id') . ' AND lst_global = 1 AND lst_name IS NOT NULL ORDER BY lst_global ASC, lst_name ASC'; $pdoStatement = $gDb->query($sql); while ($row = $pdoStatement->fetch()) { $selectBoxEntries[$row['lst_id']] = $row['lst_name']; } $form->addSelectBox('rol_lst_id', $gL10n->get('ROL_DEFAULT_LIST'), $selectBoxEntries, array('defaultValue' => $role->getValue('rol_lst_id'), 'showContextDependentFirstEntry' => false, 'helpTextIdLabel' => 'ROL_DEFAULT_LIST_DESC')); $form->addCheckbox('rol_default_registration', $gL10n->get('ROL_DEFAULT_REGISTRATION'), $role->getValue('rol_default_registration'), array('helpTextIdLabel' => 'ROL_DEFAULT_REGISTRATION_DESC')); $form->addInput('rol_max_members', $gL10n->get('SYS_MAX_PARTICIPANTS') . '<br />(' . $gL10n->get('ROL_WITHOUT_LEADER') . ')', $role->getValue('rol_max_members'), array('type' => 'number', 'minNumber' => 0, 'maxNumber' => 99999)); $form->addInput('rol_cost', $gL10n->get('SYS_CONTRIBUTION') . ' ' . $gPreferences['system_currency'], $role->getValue('rol_cost'), array('maxLength' => 6, 'class' => 'form-control-small')); $form->addSelectBox('rol_cost_period', $gL10n->get('SYS_CONTRIBUTION_PERIOD'), $role->getCostPeriods(), array('defaultValue' => $role->getValue('rol_cost_period'))); $form->closeGroupBox(); $form->openGroupBox('gb_authorization', $gL10n->get('SYS_AUTHORIZATION')); $form->addCheckbox('rol_assign_roles', $gL10n->get('ROL_RIGHT_ASSIGN_ROLES'), $role->getValue('rol_assign_roles'), array('helpTextIdLabel' => 'ROL_RIGHT_ASSIGN_ROLES_DESC', 'icon' => 'roles.png')); $form->addCheckbox('rol_all_lists_view', $gL10n->get('ROL_RIGHT_ALL_LISTS_VIEW'), $role->getValue('rol_all_lists_view'), array('icon' => 'lists.png')); $form->addCheckbox('rol_approve_users', $gL10n->get('ROL_RIGHT_APPROVE_USERS'), $role->getValue('rol_approve_users'), array('icon' => 'new_registrations.png')); $form->addCheckbox('rol_edit_user', $gL10n->get('ROL_RIGHT_EDIT_USER'), $role->getValue('rol_edit_user'), array('helpTextIdLabel' => 'ROL_RIGHT_EDIT_USER_DESC', 'icon' => 'group.png')); if ($gPreferences['enable_mail_module'] > 0) { $form->addCheckbox('rol_mail_to_all', $gL10n->get('ROL_RIGHT_MAIL_TO_ALL'), $role->getValue('rol_mail_to_all'), array('icon' => 'email.png')); } $form->addCheckbox('rol_profile', $gL10n->get('ROL_RIGHT_PROFILE'), $role->getValue('rol_profile'), array('icon' => 'profile.png')); if ($gPreferences['enable_announcements_module'] > 0) { $form->addCheckbox('rol_announcements', $gL10n->get('ROL_RIGHT_ANNOUNCEMENTS'), $role->getValue('rol_announcements'), array('icon' => 'announcements.png')); } if ($gPreferences['enable_dates_module'] > 0) { $form->addCheckbox('rol_dates', $gL10n->get('ROL_RIGHT_DATES'), $role->getValue('rol_dates'), array('icon' => 'dates.png'));