Commit da962736 authored by Liam Sharpe's avatar Liam Sharpe Committed by Robert Lyon
Browse files

Fixed styling in extensions->web services, iframe sources tidy-up - Bug #1465107

  behatnotneeded

Change-Id: I8347fafbb5c6fc6ec629534d56b388a7a332b1bc
parent 9c6c2bc2
......@@ -55,6 +55,7 @@ $form = call_static_method($classname, 'get_config_options');
$form['plugintype'] = $plugintype;
$form['pluginname'] = $pluginname;
$form['name'] = 'pluginconfig';
$form['class'] = 'panel panel-body';
$form['pluginconfigform'] = true;
$form['jsform'] = true;
$form['successcallback'] = 'pluginconfig_submit';
......@@ -73,6 +74,7 @@ $form['elements']['type'] = array(
);
$form['elements']['save'] = array(
'type' => 'submit',
'class' => 'btn-success',
'value' => get_string('save'),
);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -117,6 +117,9 @@ label,
.form-group {
padding: 0;
}
&.form-inline-align-bottom .form-group{
vertical-align: bottom;
}
&.form-short {
select, input:not(.submit) {
max-width:100%;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -123,6 +123,9 @@ label,
.form-group {
padding: 0;
}
&.form-inline-align-bottom .form-group{
vertical-align: bottom;
}
&.form-short {
select, input:not(.submit) {
max-width:100%;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -15,7 +15,7 @@
<tbody>
{foreach from=$editurls item=item name=urls}
<tr class="{cycle values='r0,r1' advance=false}">
<th><img src="{$item.icon}" alt="{$item.name}" title="{$item.name}">&nbsp;{$item.name}</th>
<td>{$item.url}</td>
<td class="right buttonscell control-buttons">
......@@ -26,12 +26,12 @@
<span class="icon icon-chevron-down icon-sm"></span>
<span class="sr-only">{str(tag=editspecific arg1=$item.name)|escape:html|safe}</span>
</a>
</div>
</td>
</tr>
<tr class="editrow {cycle} url-editform js-hidden active" id="edit-{$item.id}-form">
<td colspan=3>{$item.editform|safe}</td>
<td colspan=3 class="form-condensed">{$item.editform|safe}</td>
</tr>
{/foreach}
</tbody>
......
......@@ -532,7 +532,7 @@ function service_fg_edit_form() {
,
'type' => 'html',
'key' => $service->name,
'class' => 'webserviceconfigcontrols text-right btn-top-right btn-group btn-group-top',
'class' => 'webserviceconfigcontrols text-right btn-top-right btn-group',
);
}
}
......
......@@ -158,7 +158,6 @@ function webservice_server_edit_form($dbserver, $sopts, $iopts) {
'name' => 'webservice_oauth_server',
'successcallback' => 'webservice_oauth_server_submit',
'jsform' => false,
'renderer' => 'table',
'elements' => array(
'id' => array(
'type' => 'hidden',
......@@ -185,24 +184,28 @@ function webservice_server_edit_form($dbserver, $sopts, $iopts) {
'title' => get_string('application_title', 'auth.webservice'),
'defaultvalue' => $dbserver->application_title,
'type' => 'text',
'class' => 'mts',
);
$server_details['elements']['user'] = array(
'title' => get_string('serviceuser', 'auth.webservice'),
'value' => get_field('usr', 'username', 'id', $dbserver->userid),
'type' => 'html',
'class' => 'mts',
);
$server_details['elements']['application_uri'] = array(
'title' => get_string('application_uri', 'auth.webservice'),
'defaultvalue' => $dbserver->application_uri,
'type' => 'text',
'class' => 'mts',
);
$server_details['elements']['callback_uri'] = array(
'title' => get_string('callback', 'auth.webservice'),
'defaultvalue' => $dbserver->callback_uri,
'type' => 'text',
'class' => 'mts',
);
$server_details['elements']['institution'] = array(
......@@ -210,6 +213,7 @@ function webservice_server_edit_form($dbserver, $sopts, $iopts) {
'title' => get_string('institution'),
'options' => $iopts,
'defaultvalue' => trim($dbserver->institution),
'class' => 'mts',
);
$server_details['elements']['service'] = array(
......@@ -217,6 +221,7 @@ function webservice_server_edit_form($dbserver, $sopts, $iopts) {
'title' => get_string('servicename', 'auth.webservice'),
'options' => $sopts,
'defaultvalue' => $dbserver->externalserviceid,
'class' => 'mts',
);
$server_details['elements']['enabled'] = array(
......@@ -224,6 +229,7 @@ function webservice_server_edit_form($dbserver, $sopts, $iopts) {
'defaultvalue' => (($dbserver->enabled == 1) ? 'checked' : ''),
'type' => 'checkbox',
'disabled' => true,
'class' => 'mts',
);
$functions = get_records_array('external_services_functions', 'externalserviceid', $dbserver->externalserviceid);
......@@ -238,12 +244,14 @@ function webservice_server_edit_form($dbserver, $sopts, $iopts) {
'title' => get_string('functions', 'auth.webservice'),
'value' => implode(', ', $function_list),
'type' => 'html',
'class' => 'mts',
);
$server_details['elements']['submit'] = array(
'type' => 'submitcancel',
'value' => array(get_string('save'), get_string('back')),
'goto' => get_config('wwwroot') . 'webservice/admin/oauthv1sregister.php',
'class' => 'btn-success mts',
);
$elements = array(
......@@ -435,14 +443,12 @@ function webservice_server_list_form($sopts, $iopts) {
$form = $pieform->build(false);
}
$form = '<tr><td colspan="2">' .
$form . '</td></tr><tr><td colspan="2">' .
pieform(array(
$form = pieform(array(
'name' => 'webservices_token_generate',
'renderer' => 'div',
'validatecallback' => 'webservices_add_application_validate',
'successcallback' => 'webservices_add_application_submit',
'class' => 'form-inline',
'class' => 'form-inline form-inline-align-bottom',
'jsform' => false,
'action' => get_config('wwwroot') . 'webservice/admin/oauthv1sregister.php',
'elements' => array(
......@@ -452,25 +458,22 @@ function webservice_server_list_form($sopts, $iopts) {
),
'institution' => array(
'class' => 'no-label',
'type' => 'select',
'options' => $iopts,
),
'service' => array(
'class' => 'no-label',
'type' => 'select',
'options' => $sopts,
),
'action' => array('type' => 'hidden', 'value' => 'add'),
'submit' => array(
'type' => 'submit',
'class' => 'btn-primary no-label',
'class' => 'btn-primary',
'value' => get_string('add', 'auth.webservice'),
),
),
)) .
'</td></tr>';
));
$elements = array(
// fieldset for managing service function list
......
......@@ -194,7 +194,7 @@ if (!empty($dbservices)) {
,
'type' => 'html',
'key' => $service->id,
'class' => 'webserviceconfigcontrols text-right btn-top-right btn-group btn-group-top',
'class' => 'webserviceconfigcontrols text-right btn-top-right btn-group',
);
}
$pieform = new Pieform($userform);
......
......@@ -158,13 +158,13 @@ if (!empty($authtype)) {
$elements['submit'] = array(
'type' => 'submitcancel',
'value' => array($nextaction, get_string('cancel')),
'class' => 'btn-default',
'goto' => get_config('wwwroot') . 'webservice/testclient.php',
);
if (!empty($elements['protocol']['options'])) {
$form = pieform(array(
'name' => 'testclient',
'renderer' => 'table',
'type' => 'div',
'renderer' => 'div',
'successcallback' => 'testclient_submit',
'elements' => $elements,
));
......
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