Commit 7ad82852 authored by Pat Kira's avatar Pat Kira Committed by Robert Lyon

Style web services manage access token (BUG 1465107)

Task no. 23600 - include style table on the webservices config page

behatnotneeded: styling only

Change-Id: I78f0ec9c20c34d0c5edb37f5db6bba5aab8aa195
parent db546b79
......@@ -13,7 +13,7 @@ td.tiny {
.table {
max-width:100%;
border-collapse: separate;
.icon-cell {
min-width: 50px; //width of two icons
}
......@@ -174,3 +174,8 @@ table.table tr {
font-size: 16px;
font-weight: 100;
}
// Unset border top on the first row of the table
.table>tbody>tr:first-child>td {
border-top-width: 0;
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -18,7 +18,7 @@
<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">
<td class="buttonscell">
<div class="btn-group">
{$item.deleteform|safe}
<a id="edit-{$item.id}" class="url-open-editform btn btn-default btn-sm pull-left prs" title="{str tag=edit}" href="">
......
......@@ -389,8 +389,8 @@ function webservices_protocol_switch_form() {
function service_fg_edit_form() {
global $THEME;
$editicon = 'icon icon-pencil prm';
$deleteicon = 'icon icon-trash prm text-danger';
$editicon = 'icon icon-pencil left';
$deleteicon = 'icon icon-trash left text-danger';
$form = array(
'name' => 'webservices_function_groups',
......@@ -532,7 +532,7 @@ function service_fg_edit_form() {
,
'type' => 'html',
'key' => $service->name,
'class' => 'webserviceconfigcontrols text-right btn-top-right btn-group',
'class' => 'webserviceconfigcontrols btn-group',
);
}
}
......@@ -577,7 +577,7 @@ function service_tokens_edit_form() {
'name' => 'webservices_tokens',
'elementclasses' => false,
'successcallback' => 'webservices_tokens_submit',
'renderer' => 'div',
'renderer' => 'multicolumntable',
'elements' => array(
'token' => array(
'title' => ' ',
......@@ -689,13 +689,12 @@ function service_tokens_edit_form() {
// edit and delete buttons
$form['elements']['id'. $token->tokenid . '_actions'] = array(
'value' => '<span class="actions text-inline">' .
pieform(array(
'value' => pieform(array(
'name' => 'webservices_token_edit_' . $token->tokenid,
'renderer' => 'div',
'elementclasses' => false,
'successcallback' => 'webservices_token_submit',
'class' => 'form-as-button',
'class' => 'form-as-button pull-left',
'jsform' => false,
'elements' => array(
'token' => array('type' => 'hidden', 'value' => $token->tokenid),
......@@ -704,8 +703,8 @@ function service_tokens_edit_form() {
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-default btn-sm',
'value' => '<span class="'.$editicon.'"></span>' . get_string('editspecific', 'mahara', $token->tokenid),
'elementtitle' => get_string('edit'),
'value' => '<span class="'.$editicon.'"></span>' . get_string('edit'),
'elementtitle' => get_string('editspecific', 'mahara', $token->tokenid),
),
),
))
......@@ -715,7 +714,7 @@ function service_tokens_edit_form() {
'renderer' => 'div',
'elementclasses' => false,
'successcallback' => 'webservices_token_submit',
'class' => 'form-as-button',
'class' => 'form-as-button pull-left',
'jsform' => false,
'elements' => array(
'token' => array('type' => 'hidden', 'value' => $token->tokenid),
......@@ -724,15 +723,14 @@ function service_tokens_edit_form() {
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-default btn-sm',
'value' => '<span class="'.$deleteicon.'"></span>' . get_string('deletespecific', 'mahara', $token->tokenid),
'elementtitle' => get_string('delete'),
'value' => '<span class="'.$deleteicon.'"></span>' . get_string('delete'),
'elementtitle' => get_string('deletespecific', 'mahara', $token->tokenid),
),
),
)) . '</span>'
,
)),
'type' => 'html',
'key' => $token->token,
'class' => 'webserviceconfigcontrols text-right btn-top-right btn-group',
'class' => 'webserviceconfigcontrols btn-group',
);
}
}
......@@ -900,13 +898,12 @@ function service_users_edit_form() {
// edit and delete buttons
$form['elements']['id'. $user->id . '_actions'] = array(
'value' => '<span class="actions text-inline">' .
pieform(array(
'value' => pieform(array(
'name' => 'webservices_user_edit_' . $user->id,
'renderer' => 'div',
'elementclasses' => false,
'successcallback' => 'webservices_user_submit',
'class' => 'form-as-button',
'class' => 'form-as-button pull-left',
'jsform' => false,
'elements' => array(
'suid' => array('type' => 'hidden', 'value' => $user->id),
......@@ -915,8 +912,8 @@ function service_users_edit_form() {
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-default btn-sm',
'value' => get_string('editspecific', 'mahara', $user->username),
'elementtitle' => get_string('edit'),
'value' => '<span class="'. $editicon.'"></span>' . get_string('edit'),
'elementtitle' => get_string('editspecific', 'mahara', $user->username),
),
),
))
......@@ -926,7 +923,7 @@ function service_users_edit_form() {
'renderer' => 'div',
'elementclasses' => false,
'successcallback' => 'webservices_user_submit',
'class' => 'form-as-button',
'class' => 'form-as-button pull-left',
'jsform' => false,
'elements' => array(
'suid' => array('type' => 'hidden', 'value' => $user->id),
......@@ -935,15 +932,14 @@ function service_users_edit_form() {
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-default btn-sm',
'value' => '<span class="'.$deleteicon.'"></span>' . get_string('deletespecific', 'mahara', $user->username),
'elementtitle' => get_string('delete'),
'value' => '<span class="'.$deleteicon.'"></span>' . get_string('delete'),
'elementtitle' => get_string('deletespecific', 'mahara', $user->username),
),
),
)) . '</span>'
,
)),
'type' => 'html',
'key' => $user->id,
'class' => 'actions',
'class' => 'webserviceconfigcontrols btn-group',
);
}
}
......
......@@ -396,8 +396,7 @@ function webservice_server_list_form($sopts, $iopts) {
// edit and delete buttons
$form['elements']['id' . $consumer->id . '_actions'] = array(
'value' => '<span class="actions text-inline">' .
pieform(array(
'value' => pieform(array(
'name' => 'webservices_server_edit_' . $consumer->id,
'renderer' => 'div',
'elementclasses' => false,
......@@ -433,10 +432,10 @@ function webservice_server_list_form($sopts, $iopts) {
'elementtitle' => get_string('delete'),
),
),
)) . '</span>',
)),
'type' => 'html',
'key' => $consumer->consumer_key,
'class' => 'webserviceconfigcontrols',
'class' => 'webserviceconfigcontrols btn-group',
);
}
$pieform = new Pieform($form);
......
......@@ -74,7 +74,7 @@ foreach ($dbfunctions as $function) {
$functions['elements']['submit'] = array(
'type' => 'submitcancel',
'class' => 'btn-primary',
'class' => 'btn-primary submitcancel',
'value' => array(get_string('save'), get_string('back')),
'goto' => get_config('wwwroot') . 'webservice/admin/index.php?open=webservices_function_groups',
);
......
......@@ -38,7 +38,7 @@ $token_details =
'successcallback' => 'allocate_webservice_tokens_submit',
'validatecallback' => 'allocate_webservice_tokens_validate',
'jsform' => true,
'renderer' => 'multicolumntable',
'renderer' => 'div',
'elements' => array(
'tokenid' => array(
'type' => 'hidden',
......@@ -143,29 +143,29 @@ $token_details['elements']['publickeyexpires']= array(
$token_details['elements']['submit'] = array(
'type' => 'submitcancel',
'class' => 'btn-primary',
'value' => array(get_string('save'), get_string('back')),
'goto' => get_config('wwwroot') . 'webservice/admin/index.php?open=webservices_token',
);
$elements = array(
// fieldset for managing service function list
'token_details' => array(
'type' => 'fieldset',
'legend' => get_string('tokenid', 'auth.webservice', $dbtoken->token),
'elements' => array(
'sflist' => array(
'type' => 'html',
'value' => pieform($token_details),
)
),
'collapsible' => false,
),
// fieldset for managing service function list
'token_details' => array(
'type' => 'fieldset',
'legend' => get_string('tokenid', 'auth.webservice', $dbtoken->token),
'elements' => array(
'sflist' => array(
'type' => 'html',
'value' => pieform($token_details),
)
),
),
);
$form = array(
'renderer' => 'div',
'type' => 'div',
'id' => 'maintable',
'class' => 'form-group-nested',
'name' => 'tokenconfig',
'jsform' => true,
'successcallback' => 'allocate_webservice_tokens_submit',
......
......@@ -61,7 +61,7 @@ $serviceuser_details =
'successcallback' => 'allocate_webservice_users_submit',
'validatecallback' => 'allocate_webservice_users_validate',
'jsform' => true,
'renderer' => 'multicolumntable',
'renderer' => 'div',
'elements' => array(
'suid' => array(
'type' => 'hidden',
......@@ -150,6 +150,7 @@ $serviceuser_details['elements']['publickeyexpires']= array(
$serviceuser_details['elements']['submit'] = array(
'type' => 'submitcancel',
'class' => 'btn-primary',
'value' => array(get_string('save'), get_string('back')),
'goto' => get_config('wwwroot') . 'webservice/admin/index.php?open=webservices_user',
);
......@@ -172,6 +173,7 @@ $elements = array(
$form = array(
'renderer' => 'div',
'type' => 'div',
'class' => 'form-group-nested',
'id' => 'maintable',
'name' => 'tokenconfig',
'jsform' => true,
......
......@@ -158,6 +158,7 @@ if (!empty($dbservices)) {
'renderer' => 'div',
'elementclasses' => false,
'successcallback' => 'webservices_user_token_submit',
'class' => 'form-as-button pull-left',
'jsform' => false,
'elements' => array(
'service' => array('type' => 'hidden', 'value' => $service->id),
......@@ -165,7 +166,7 @@ if (!empty($dbservices)) {
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-default',
'class' => 'btn-default btn-sm',
'value' => get_string('gen', 'auth.webservice'),
'elementtitle' => get_string('gen', 'auth.webservice')
),
......@@ -178,6 +179,7 @@ if (!empty($dbservices)) {
'renderer' => 'div',
'elementclasses' => false,
'successcallback' => 'webservices_user_token_submit',
'class' => 'form-as-button pull-left',
'jsform' => false,
'elements' => array(
'service' => array('type' => 'hidden', 'value' => $service->id),
......@@ -185,16 +187,16 @@ if (!empty($dbservices)) {
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-default',
'value' => get_string('deletespecific', 'mahara', $service->id),
'elementtitle' => get_string('delete'),
'class' => 'btn-default btn-sm',
'value' => '<span class="icon icon-trash icon-lg text-danger left"></span>' . get_string('delete'),
'elementtitle' => get_string('deletespecific', 'mahara', $service->id),
),
),
)))
,
'type' => 'html',
'key' => $service->id,
'class' => 'webserviceconfigcontrols text-right btn-top-right btn-group',
'class' => 'webserviceconfigcontrols btn-group',
);
}
$pieform = new Pieform($userform);
......
......@@ -158,7 +158,7 @@ if (!empty($authtype)) {
$elements['submit'] = array(
'type' => 'submitcancel',
'value' => array($nextaction, get_string('cancel')),
'class' => 'btn-default',
'class' => 'btn-primary',
'goto' => get_config('wwwroot') . 'webservice/testclient.php',
);
if (!empty($elements['protocol']['options'])) {
......
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