Commit baf4a76e authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Link add user page from admin nav; link uploadcsv from add user page

parent d8fa3659
......@@ -26,9 +26,9 @@
define('INTERNAL', 1);
define('INSTITUTIONALADMIN', 1);
define('MENUITEM', 'configusers/usersearch');
define('MENUITEM', 'configusers/addusers');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('adduser', 'admin'));
define('TITLE', get_string('addusers', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
require_once('pieforms/pieform.php');
......
......@@ -26,7 +26,7 @@
define('INTERNAL', 1);
define('INSTITUTIONALADMIN', 1);
define('MENUITEM', 'configusers/uploadcsv');
define('MENUITEM', 'configusers/addusers');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('uploadcsv', 'admin'));
require_once('pieforms/pieform.php');
......@@ -345,6 +345,7 @@ $fields .= "</ul>\n";
$smarty = smarty();
$smarty->assign('uploadcsvpagedescription', get_string('uploadcsvpagedescription', 'admin',
get_config('wwwroot') . 'admin/users/add.php',
get_config('wwwroot') . 'admin/extensions/pluginconfig.php?plugintype=artefact&pluginname=internal&type=profile',
get_config('wwwroot') . 'admin/users/institutions.php',
$fields
......
......@@ -199,7 +199,7 @@ $string['uploadcsverrorinvalidusername'] = 'Error on line %s of your file: The u
$string['uploadcsverrormandatoryfieldnotspecified'] = 'Line %s of the file does not have the required "%s" field';
$string['uploadcsverroruseralreadyexists'] = 'Line %s of the file specifies the username "%s" that already exists';
$string['uploadcsverroremailaddresstaken'] = 'Line %s of the file specifies the e-mail address "%s" that is already taken by another user';
$string['uploadcsvpagedescription'] = '<p>You may use this facility to upload new users via a <acronym title="Comma Separated Values">CSV</acronym> file.</p>
$string['uploadcsvpagedescription'] = '<p>You may use this facility to upload new users via a <acronym title="Comma Separated Values">CSV</acronym> file. You may also add users one at a time <a href="%s">here</a>.</p>
<p>The first row of your CSV file should specify the format of your CSV data. For example, it should look like this:</p>
......@@ -271,7 +271,10 @@ $string['confirmremoveuserfrominstitution'] = 'Are you sure you want to remove t
// Add User
$string['adduser'] = 'Add User';
$string['addusers'] = 'Add Users';
$string['createuser'] = 'Create User';
$string['adduserspagedescription'] = 'Otherwise you can create a single user using the form below.';
$string['adduserspagedescriptioncsv'] = 'If you have many users to add, you can import users in bulk from a CSV file by clicking on the button.';
// Login as
$string['loginasuser'] = 'Login as %s';
......
......@@ -1354,9 +1354,9 @@ function admin_nav() {
'weight' => 70,
),
array(
'path' => 'configusers/uploadcsv',
'url' => 'admin/users/uploadcsv.php',
'title' => get_string('uploadcsv', 'admin'),
'path' => 'configusers/addusers',
'url' => 'admin/users/add.php',
'title' => get_string('addusers', 'admin'),
'weight' => 80,
),
);
......@@ -1448,9 +1448,9 @@ function admin_nav() {
'weight' => 50,
),
array(
'path' => 'configusers/uploadcsv',
'url' => 'admin/users/uploadcsv.php',
'title' => get_string('uploadcsv', 'admin'),
'path' => 'configusers/addusers',
'url' => 'admin/users/add.php',
'title' => get_string('addusers', 'admin'),
'weight' => 60,
),
array(
......
......@@ -2,7 +2,11 @@
{include file="columnfullstart.tpl"}
<div id="edituser">
<h2>{str tag=adduser section=admin}</h2>
<h2>{str tag=addusers section=admin}</h2>
<p>{str tag=adduserspagedescriptioncsv section=admin}</p>
<form action="{$WWWROOT}admin/users/uploadcsv.php"><input type="submit" class="submit" value="{str tag=uploadcsv section=admin}" /></form>
<p>{str tag=adduserspagedescription section=admin}</p>
<h3>{str tag=adduser section=admin}</h3>
{$form}
</div>
{include file="columnfullend.tpl"}
......
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