Commit edd8e77d authored by Robert Lyon's avatar Robert Lyon Committed by Aaron Wells
Browse files

Bug 1393536: Messsage when connection page redirects



So you know why/what to do in insitition page

behatnotneeded

Change-Id: I24153670830c120b9fdfaf7617d429a196768d76
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 442dc945
......@@ -53,7 +53,7 @@ $string['usernameinvalidadminform'] = 'Usernames may contain letters, numbers an
$string['youmaynotregisterwithouttandc'] = 'You may not register unless you agree to abide by the <a href="terms.php">Terms and Conditions</a>.';
$string['pluginconnections'] = 'Plugin Connection Objects';
$string['pluginconnections'] = 'Plugin connection objects';
$string['pcdescription'] = 'Create connections connected to the Connection Objects of registered plugins.';
$string['addconnection'] = 'Add Client Connection';
......@@ -78,7 +78,8 @@ $string['invalidauthtypecombination'] = 'Invalid authentication type selected fo
$string['emptycertextended'] = 'When using certificate based auth you must also enter a token or username/password';
$string['emptyoauth'] = 'Consumer and Secret must be supplied for OAuth1.x';
$string['consumer'] = 'Consumer Key';
$string['secret'] ='Secret';
$string['secret'] = 'Secret';
$string['chooseinstitution'] = 'Please choose the <span class="icon icon-plug"></span><span class="sr-only">connect</span> for the institution you want to create the connection for';
// core webservices strings start here
$string['control_webservices1'] = 'Use web services: ';
......
......@@ -100,7 +100,12 @@ class PluginAuthWebservice extends PluginAuth {
'title' => get_string('webservice', 'auth.webservice'),
'weight' => 70,
),
'webservices/config' => array(
'path' => 'webservices/config',
'url' => 'webservice/admin/index.php',
'title' => get_string('webservice', 'auth.webservice'),
'weight' => 5,
),
'webservices/oauthconfig' => array(
'path' => 'webservices/oauthconfig',
'url' => 'webservice/admin/oauthv1sregister.php',
......
......@@ -25,6 +25,7 @@ $string['moveitemup'] = 'Move up';
$string['moveitemdown'] = 'Move down';
$string['edit'] = 'Edit';
$string['editspecific'] = 'Edit "%s"';
$string['connectspecific'] = 'Connect "%s"';
$string['editing'] = 'Editing';
$string['settingsspecific'] = 'Settings for "%s"';
$string['move'] = 'Move';
......
......@@ -23,15 +23,12 @@
{if !$institution->site}</a>{/if}</td>
<td class="center">{if $institution->suspended}<span class="suspended">{str tag="suspendedinstitution" section=admin}</span>{/if}</td>
<td class="controls">
<form action="{$WWWROOT}webservice/admin/connections.php" method="post">
<input type="hidden" name="i" value="{$institution->name}">
<button type="submit" name="connection" value="1" class="btn-link btn btn-xs pull-right" alt="{str(tag=editspecific arg1=$institution->displayname)|escape:html|safe}">
<span class="icon icon-cloud icon-lg text-default" role="presentation" aria-hidden="true"></span>
<span class="sr-only">
{str tag="edit"}
</span>
</button>
</form>
<a class="btn-link btn btn-xs pull-right" href="{$WWWROOT}webservice/admin/connections.php?i={$institution->name}">
<span class="icon icon-plug icon-lg text-default" role="presentation" aria-hidden="true"></span>
<span class="sr-only">
{str(tag=connectspecific arg1=$institution->displayname)|escape:html|safe}
</span>
</a>
<form action="" method="post">
<input type="hidden" name="i" value="{$institution->name}">
<button type="submit" name="edit" value="1" class="btn-link btn btn-xs pull-right" alt="{str(tag=editspecific arg1=$institution->displayname)|escape:html|safe}">
......
......@@ -35,7 +35,8 @@ $servicenotenabled = get_string('webservicesnotenabled', 'auth.webservice');
$institution = param_variable('i', '');
if (empty($institution)) {
redirect(get_config('wwwroot') .'/admin/users/institutions.php');
$SESSION->add_error_msg(get_string('chooseinstitution', 'auth.webservice'), false);
redirect(get_config('wwwroot') .'admin/users/institutions.php');
}
$ids = param_variable('ids', '');
$reorder = param_boolean('reorder', 0);
......
......@@ -12,7 +12,7 @@
define('INTERNAL', 1);
define('ADMIN', 1);
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('MENUITEM', 'webservices');
define('MENUITEM', 'webservices/config');
$path = get_config('docroot') . 'lib/zend';
set_include_path($path . PATH_SEPARATOR . get_include_path());
......
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