Commit ca6ec173 authored by Penny Leach's avatar Penny Leach
Browse files

contextual help for admin done

parent 5ee96a18
......@@ -35,6 +35,10 @@ require_once('pieforms/pieform.php');
$plugintype = param_alpha('plugintype');
$pluginname = param_alpha('pluginname');
define('SECTION_PLUGINTYPE', $plugintype);
define('SECTION_PLUGINNAME', $pluginname);
define('SECTION_PAGE', 'pluginconfig');
safe_require($plugintype, $pluginname);
if ($plugintype == 'artefact') {
$type = param_alpha('type');
......
......@@ -30,6 +30,9 @@ define('MENUITEM', 'configextensions');
define('SUBMENUITEM', 'pluginadmin');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('pluginadmin', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'plugins');
require('upgrade.php');
$plugins = array();
......
......@@ -31,6 +31,9 @@ define('MENUITEM', 'configextensions');
define('SUBMENUITEM', 'templatesadmin');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('templatesadmin', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'templates');
require_once(get_config('libroot') . 'template.php');
......
......@@ -28,6 +28,9 @@ define('INTERNAL', 1);
define('ADMIN', 1);
define('MENUITEM', 'configsite');
define('SUBMENUITEM', 'adminfiles');
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'adminfiles');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
safe_require('artefact', 'file');
......
......@@ -28,6 +28,11 @@ define('INTERNAL', 1);
define('ADMIN', 1);
define('MENUITEM', 'configsite');
define('SUBMENUITEM', 'sitemenu');
define('SUBMENUITEM', 'sitepages');
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'sitemenu');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('sitemenu', 'admin'));
......@@ -43,6 +48,7 @@ foreach ($adminstrings as $string) {
$getstring[$string] = "'" . get_string($string,'admin') . "'";
}
// TODO: this should be using json_encode
$thead = array(get_string('type','admin'),get_string('name','admin'),get_string('linkedto','admin'),'');
$ijs = "var thead = TR(null,map(partial(TH,null),['" . implode($thead,"','") . "']));\n";
$ijs .= "var externallink = '" . get_string('externallink','admin') . "';\n";
......@@ -87,7 +93,15 @@ function formatrow (item) {
del.onclick = function () { delitem(item.id); };
var edit = INPUT({'type':'button','class':'button','value':{$getstring['edit']}});
edit.onclick = function () { edititem(item); };
var cells = map(partial(TD,null),[type,item.name,linkedto,[del,edit]]);
var cells = map(
partial(TD,null),
[
type,
item.name,
linkedto,
[del,edit,contextualHelpIcon(null, null, 'core', 'admin', null, 'adminmenuedit')]
]
);
return TR({'id':'menuitem_'+item.id},cells);
}
......@@ -168,8 +182,8 @@ function editform(item) {
'value':item.linkedto});
setNodeAttribute(elink,'checked',true);
}
var radios = [DIV(null, LABEL(null,elink,{$getstring['externallink']})),
DIV(null, LABEL(null,afile,{$getstring['adminfile']}))];
var radios = [DIV(null, LABEL(null,elink,{$getstring['externallink']}), contextualHelpIcon(null, null, 'core', 'admin', null, 'adminexternallink')),
DIV(null, LABEL(null,afile,{$getstring['adminfile']}), contextualHelpIcon(null, null, 'core', 'admin', null, 'adminadminfile'))];
var row = TR({'id':'row'+item.id, 'class':rowtype},
map(partial(TD,null),[radios,name,linkedto,savecancel]));
return row;
......
......@@ -42,15 +42,18 @@ $yesno = array(true => get_string('yes'),
$searchpluginoptions = get_search_plugins();
$siteoptionform = pieform(array(
'name' => 'siteoptions',
'jsform' => true,
'renderer' => 'table',
'elements' => array(
'name' => 'siteoptions',
'jsform' => true,
'renderer' => 'table',
'plugintype' => 'core',
'pluginname' => 'admin',
'elements' => array(
'sitename' => array(
'type' => 'text',
'title' => get_string('sitename','admin'),
'description' => get_string('sitenamedescription','admin'),
'defaultvalue' => get_config('sitename'),
'help' => true,
),
'language' => array(
'type' => 'select',
......@@ -59,6 +62,7 @@ $siteoptionform = pieform(array(
'defaultvalue' => get_config('language'),
'collapseifoneoption' => true,
'options' => $langoptions,
'help' => true,
),
'theme' => array(
'type' => 'select',
......@@ -67,6 +71,7 @@ $siteoptionform = pieform(array(
'defaultvalue' => get_config('theme'),
'collapseifoneoption' => true,
'options' => $themeoptions,
'help' => true,
),
'searchplugin' => array(
'type' => 'select',
......@@ -75,24 +80,28 @@ $siteoptionform = pieform(array(
'defaultvalue' => get_config('searchplugin'),
'collapseifoneoption' => true,
'options' => $searchpluginoptions,
'help' => true,
),
'pathtofile' => array(
'type' => 'text',
'title' => get_string('pathtofile','admin'),
'description' => get_string('pathtofiledescription','admin'),
'defaultvalue' => get_config('pathtofile'),
'help' => true,
),
'viruschecking' => array(
'type' => 'checkbox',
'title' => get_string('viruschecking','admin'),
'description' => get_string('viruscheckingdescription','admin'),
'defaultvalue' => get_config('viruschecking'),
'help' => true,
),
'pathtoclam' => array(
'type' => 'text',
'title' => get_string('pathtoclam','admin'),
'description' => get_string('pathtoclamdescription','admin'),
'defaultvalue' => get_config('pathtoclam'),
'help' => true,
),
'sessionlifetime' => array(
'type' => 'text',
......@@ -100,6 +109,7 @@ $siteoptionform = pieform(array(
'title' => get_string('sessionlifetime','admin'),
'description' => get_string('sessionlifetimedescription','admin'),
'defaultvalue' => get_config('session_timeout') / 60,
'help' => true,
),
'allowpublicviews' => array(
'type' => 'select',
......@@ -107,12 +117,14 @@ $siteoptionform = pieform(array(
'description' => get_string('allowpublicviewsdescription','admin'),
'defaultvalue' => get_config('allowpublicviews'),
'options' => $yesno,
'help' => true,
),
'artefactviewinactivitytime' => array(
'type' => 'expiry',
'title' => get_string('artefactviewinactivitytime','admin'),
'description' => get_string('artefactviewinactivitytimedescription','admin'),
'defaultvalue' => get_config('artefactviewinactivitytime'),
'help' => true,
),
'submit' => array(
'type' => 'submit',
......
......@@ -28,6 +28,10 @@ define('INTERNAL', 1);
define('ADMIN', 1);
define('MENUITEM', 'configsite');
define('SUBMENUITEM', 'sitepages');
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'sitepages');
require(dirname(dirname(dirname(__FILE__))).'/init.php');
require_once('pieforms/pieform.php');
define('TITLE', get_string('sitepages', 'admin'));
......
......@@ -32,6 +32,9 @@ define('MENUITEM', 'configusers');
define('SUBMENUITEM', 'adminusers');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('adminusers', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'adminusers');
require_once('pieforms/pieform.php');
$smarty = smarty();
......
......@@ -30,6 +30,9 @@ define('MENUITEM', 'configusers');
define('SUBMENUITEM', 'institutions');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('institutions', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'institutions');
require_once('pieforms/pieform.php');
$smarty = smarty();
......@@ -109,7 +112,8 @@ if ($institution || $add) {
'maxlength' => 255,
'regex' => '/^[a-zA-Z]+$/'
),
'ignore' => !$add
'ignore' => !$add,
'help' => true,
),
'add' => array(
'type' => 'hidden',
......@@ -128,39 +132,47 @@ if ($institution || $add) {
'rules' => array(
'required' => true,
'maxlength' => 255
)
),
'help' => true,
),
'authplugin' => array(
'type' => 'select',
'title' => get_string('authplugin', 'admin'),
'options' => get_records_menu('auth_installed', '', '', 'name', 'name, name')
'options' => get_records_menu('auth_installed', '', '', 'name', 'name, name'),
'help' => true,
),
'registerallowed' => array(
'type' => 'checkbox',
'title' => get_string('registrationallowed', 'admin'),
'description' => get_string('registrationalloweddescription', 'admin'),
'defaultvalue' => $data->registerallowed,
'help' => true,
),
'defaultaccountlifetime' => array(
'type' => 'expiry',
'title' => get_string('defaultaccountlifetime', 'admin'),
'description' => get_string('defaultaccountlifetimedescription', 'admin'),
'defaultvalue' => $data->defaultaccountlifetime
'defaultvalue' => $data->defaultaccountlifetime,
'help' => true,
),
'defaultaccountinactiveexpire' => array(
'type' => 'expiry',
'title' => get_string('defaultaccountinactiveexpire', 'admin'),
'description' => get_string('defaultaccountinactiveexpiredescription', 'admin'),
'defaultvalue' => $data->defaultaccountinactiveexpire
'defaultvalue' => $data->defaultaccountinactiveexpire,
'help' => true,
),
'defaultaccountinactivewarn' => array(
'type' => 'expiry',
'title' => get_string('defaultaccountinactivewarn', 'admin'),
'description' => get_string('defaultaccountinactivewarndescription', 'admin'),
'defaultvalue' => $data->defaultaccountinactivewarn
'defaultvalue' => $data->defaultaccountinactivewarn,
'help' => true,
),
'lockedfields' => array(
'value' => '<tr><th colspan="2">Locked fields</th></tr>'
'value' => '<tr><th colspan="2">Locked fields '
. get_help_icon('core', 'admin', 'institution', 'lockedfields')
. '</th></tr>'
)
);
......@@ -179,6 +191,8 @@ if ($institution || $add) {
$smarty->assign('institution_form', pieform(array(
'name' => 'institution',
'renderer' => 'table',
'plugintype' => 'core',
'pluginname' => 'admin',
'elements' => $elements
)));
......
......@@ -30,6 +30,9 @@ define('MENUITEM', 'configusers');
define('SUBMENUITEM', 'adminnotifications');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('adminnotifications', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'notifications');
require_once('pieforms/pieform.php');
......
......@@ -30,6 +30,9 @@ define('MENUITEM', 'configusers');
define('SUBMENUITEM', 'usersearch');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('usersearch', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'usersearch');
$query = param_variable('query',null);
......
......@@ -32,6 +32,9 @@ define('MENUITEM', 'configusers');
define('SUBMENUITEM', 'staffusers');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('staffusers', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'staffusers');
require_once('pieforms/pieform.php');
$smarty = smarty();
......
......@@ -30,6 +30,9 @@ define('MENUITEM', 'configusers');
define('SUBMENUITEM', 'suspendedusers');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('suspendedusers', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'suspendedusers');
require_once('pieforms/pieform.php');
$smarty = smarty(array('tablerenderer'));
......
<h3>Icon size</h3>
<p>Icon size specifies a maximum pixel height and width for a user’s profile icon. All images uploaded to the Profile Icons area will be resized to these dimensions. </p>
<h3>Plugin Administration</h3>
<p>Those profile fields marked as Mandatory must be included in a user account creation CSV file or populated by the user once they complete registration on the site. </p>
<p>Those profile fields marked as Public will be available for all logged in users to search upon and view within another user’s public profile area.</p>
......@@ -296,7 +296,8 @@ class ArtefactTypeProfile extends ArtefactType {
'rules' => array(
'required' => true,
'integer' => true,
)
),
'help' => true,
);
return $form;
......
<h3>Authentication plugin</h3>
<p>Where multiple authentication plugins are enabled on your Mahara site, all available authentication methods will be listed in dropdown menu for selection against the Institution.</p>
<h3>Default account inactivity time</h3>
<p>An Institution may set the period of inactivity required on a user’s account before it is flagged. This time may be specified in Days, Weeks, Months, Years or No End Date may be selected where user accounts should not be flagged as inactive. An account is considered inactive when the user has not logged into the site.</p>
<h3>Warning time for inactivity/expiry</h3>
<p>An Institution may set the time before a user’s account is due to expire or be flagged as inactive, that they receive an alert message. This time may be specified in Days, Weeks, Months, Years or No End Date may be selected where users should not receive a warning before their account expires or they are flagged as having an inactive account.</p>
<h3>Default account lifetime</h3>
<p>An Institution may set how long before a user’s account will automatically expire and be removed from the system. This time may be specified in Days, Weeks, Months, Years or No End Date may be selected where user accounts should never expire.</p>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment