<div class="panel-heading">' . $gL10n->get('LST_INFOBOX') . ': ' . $role->getValue('rol_name') . '</div> <div class="panel-body">'; $form = new HtmlForm('list_infobox_items', null); $form->addStaticControl('infobox_category', $gL10n->get('SYS_CATEGORY'), $role->getValue('cat_name')); // Description if (strlen($role->getValue('rol_description')) > 0) { $form->addStaticControl('infobox_description', $gL10n->get('SYS_DESCRIPTION'), $role->getValue('rol_description')); } // Period if (strlen($role->getValue('rol_start_date')) > 0) { $form->addStaticControl('infobox_period', $gL10n->get('SYS_PERIOD'), $gL10n->get('SYS_DATE_FROM_TO', $role->getValue('rol_start_date', $gPreferences['system_date']), $role->getValue('rol_end_date', $gPreferences['system_date']))); } // Event if ($role->getValue('rol_weekday') > 0 || strlen($role->getValue('rol_start_time')) > 0) { if ($role->getValue('rol_weekday') > 0) { $value = DateTimeExtended::getWeekdays($role->getValue('rol_weekday')) . ' '; } 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 ($gPreferences['enable_weblinks_module'] > 0) { $form->addCheckbox('rol_weblinks', $gL10n->get('ROL_RIGHT_WEBLINKS'), $role->getValue('rol_weblinks'), array('icon' => 'weblinks.png')); } /*if($gPreferences['enable_inventory_module'] > 0) { $form->addCheckbox('rol_inventory', $gL10n->get('ROL_RIGHT_INVENTORY'), $role->getValue('rol_inventory'), array('icon' => 'inventory.png')); }*/ $form->closeGroupBox(); $form->openGroupBox('gb_dates_meetings', $gL10n->get('DAT_DATES') . ' / ' . $gL10n->get('ROL_MEETINGS') . ' (' . $gL10n->get('SYS_OPTIONAL') . ')'); $form->addInput('rol_start_date', $gL10n->get('ROL_VALID_FROM'), $role->getValue('rol_start_date'), array('type' => 'date')); $form->addInput('rol_end_date', $gL10n->get('ROL_VALID_TO'), $role->getValue('rol_end_date'), array('type' => 'date')); $form->addInput('rol_start_time', $gL10n->get('SYS_TIME_FROM'), $role->getValue('rol_start_time'), array('type' => 'time')); $form->addInput('rol_end_time', $gL10n->get('SYS_TIME_TO'), $role->getValue('rol_end_time'), array('type' => 'time')); $form->addSelectBox('rol_weekday', $gL10n->get('ROL_WEEKDAY'), DateTimeExtended::getWeekdays(), array('defaultValue' => $role->getValue('rol_weekday'))); $form->addInput('rol_location', $gL10n->get('SYS_LOCATION'), $role->getValue('rol_location'), array('maxLength' => 100)); $form->closeGroupBox(); $form->openGroupBox('gb_dependencies', $gL10n->get('ROL_DEPENDENCIES') . ' (' . $gL10n->get('SYS_OPTIONAL') . ')'); $rolename_var = $gL10n->get('ROL_NEW_ROLE'); if ($role->getValue('rol_name') !== '') { $rolename_var = $gL10n->get('SYS_ROLE') . ' <b>' . $role->getValue('rol_name') . '</b>'; } $form->addHtml('<p>' . $gL10n->get('ROL_ROLE_DEPENDENCIES', $rolename_var) . '</p>'); // list all roles that the user is allowed to see $sqlAllRoles = ' SELECT rol_id, rol_name, cat_name FROM ' . TBL_ROLES . ', ' . TBL_CATEGORIES . ' WHERE rol_valid = 1 AND rol_visible = 1 AND rol_cat_id = cat_id