Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
edf36355
Commit
edf36355
authored
Sep 29, 2015
by
Robert Lyon
Committed by
Gerrit Code Review
Sep 29, 2015
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Fix webservices result table (bug: 1465107)"
parents
231987a3
76e27567
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
86 additions
and
61 deletions
+86
-61
htdocs/admin/users/institutionusers.php
htdocs/admin/users/institutionusers.php
+1
-1
htdocs/admin/users/pendingregistrations.php
htdocs/admin/users/pendingregistrations.php
+1
-1
htdocs/admin/users/progressbar.php
htdocs/admin/users/progressbar.php
+1
-1
htdocs/admin/users/statistics.php
htdocs/admin/users/statistics.php
+1
-1
htdocs/lib/institution.php
htdocs/lib/institution.php
+1
-1
htdocs/theme/default/templates/header.tpl
htdocs/theme/default/templates/header.tpl
+1
-1
htdocs/theme/raw/sass/_custom.scss
htdocs/theme/raw/sass/_custom.scss
+18
-3
htdocs/theme/raw/sass/form/_dropdown.scss
htdocs/theme/raw/sass/form/_dropdown.scss
+1
-1
htdocs/theme/raw/sass/form/_form-group.scss
htdocs/theme/raw/sass/form/_form-group.scss
+6
-0
htdocs/theme/raw/sass/typography/_tables.scss
htdocs/theme/raw/sass/typography/_tables.scss
+1
-1
htdocs/theme/raw/templates/form.tpl
htdocs/theme/raw/templates/form.tpl
+1
-1
htdocs/theme/raw/templates/header.tpl
htdocs/theme/raw/templates/header.tpl
+1
-1
htdocs/webservice/admin/oauthv1sregister.php
htdocs/webservice/admin/oauthv1sregister.php
+51
-47
htdocs/webservice/apptokens.php
htdocs/webservice/apptokens.php
+1
-1
No files found.
htdocs/admin/users/institutionusers.php
View file @
edf36355
...
...
@@ -296,7 +296,7 @@ EOF;
$institutionselector
=
pieform
(
array
(
'name'
=>
'institutionselect'
,
'class'
=>
'
pull-right
form-inline'
,
'class'
=>
'form-inline'
,
'elements'
=>
array
(
'institution'
=>
$institutionelement
,
)
...
...
htdocs/admin/users/pendingregistrations.php
View file @
edf36355
...
...
@@ -41,7 +41,7 @@ else if (!empty($institution)) {
}
$institutionselector
=
pieform
(
array
(
'name'
=>
'usertypeselect'
,
'class'
=>
'form-inline
pull-right
'
,
'class'
=>
'form-inline'
,
'elements'
=>
array
(
'institution'
=>
$institutionelement
,
)
...
...
htdocs/admin/users/progressbar.php
View file @
edf36355
...
...
@@ -44,7 +44,7 @@ else if (!empty($institution)) {
}
$institutionselector
=
pieform
(
array
(
'name'
=>
'progressbarselect'
,
'class'
=>
'form-inline
pull-right
'
,
'class'
=>
'form-inline'
,
'elements'
=>
array
(
'institution'
=>
$institutionelement
,
)
...
...
htdocs/admin/users/statistics.php
View file @
edf36355
...
...
@@ -49,7 +49,7 @@ else if (!empty($institution)) {
}
$institutionselector
=
pieform
(
array
(
'name'
=>
'usertypeselect'
,
'class'
=>
'
pull-right
form-inline'
,
'class'
=>
'form-inline'
,
'elements'
=>
array
(
'institution'
=>
$institutionelement
,
)
...
...
htdocs/lib/institution.php
View file @
edf36355
...
...
@@ -917,7 +917,7 @@ function institution_selector_for_page($institution, $page) {
$institutionselector
=
pieform
(
array
(
'name'
=>
'institutionselect'
,
'class'
=>
'
last
form-inline
pull-right
'
,
'class'
=>
'form-inline'
,
'checkdirtychange'
=>
false
,
'elements'
=>
array
(
'institution'
=>
$institutionelement
,
...
...
htdocs/theme/default/templates/header.tpl
View file @
edf36355
...
...
@@ -92,7 +92,7 @@
{
dynamic
}{
insert_messages
}{/
dynamic
}
{
if
$institutionselector
}
<div
class=
"
pull-right
institutionselector"
>
<div
class=
"institutionselector"
>
{
$institutionselector
|
safe
}
</div>
{/
if
}
...
...
htdocs/theme/raw/sass/_custom.scss
View file @
edf36355
...
...
@@ -155,10 +155,25 @@
// Style label institution selection
.institutionselector
{
.form-group
{
.select
{
margin-bottom
:
15px
;
}
label
{
font-weight
:
bold
;
}
@media
(
min-width
:
$screen-sm-min
)
{
float
:
right
;
width
:
50%
;
.form-group
{
float
:
right
;
}
label
{
display
:
inline
;
font-weight
:
bold
;
display
:
table-cell
;
width
:
auto
;
}
.picker
{
width
:
auto
;
display
:
table-cell
;
}
}
}
...
...
htdocs/theme/raw/sass/form/_dropdown.scss
View file @
edf36355
...
...
@@ -62,7 +62,7 @@
&
.form-condensed
{
.picker
{
max-width
:
67%
;
max-width
:
67%
;
}
}
...
...
htdocs/theme/raw/sass/form/_form-group.scss
View file @
edf36355
...
...
@@ -185,6 +185,12 @@
padding
:
0
;
}
&
.with-padding
{
.form-group
{
padding
:
20px
0
;
}
}
&
.checkboxes
{
.btn-group
{
margin
:
10px
0
;
...
...
htdocs/theme/raw/sass/typography/_tables.scss
View file @
edf36355
...
...
@@ -26,7 +26,7 @@ td.tiny {
text-transform
:
uppercase
;
color
:
$gray
;
font-size
:
$font-size-base
;
th
{
th
,
td
{
font-weight
:
300
;
}
.allnone-toggles
{
...
...
htdocs/theme/raw/templates/form.tpl
View file @
edf36355
...
...
@@ -6,7 +6,7 @@
{/
if
}
{
if
$ADMIN
||
$INSTITUTIONALADMIN
}
<div
class=
"row"
>
<div
class=
"col-md-
9
"
>
<div
class=
"col-md-
12
"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-body"
>
{
$form
|
safe
}
...
...
htdocs/theme/raw/templates/header.tpl
View file @
edf36355
...
...
@@ -95,7 +95,7 @@
{
dynamic
}{
insert_messages
}{/
dynamic
}
{
if
$institutionselector
}
<div
class=
"
pull-right
institutionselector"
>
<div
class=
"institutionselector"
>
{
$institutionselector
|
safe
}
</div>
{/
if
}
...
...
htdocs/webservice/admin/oauthv1sregister.php
View file @
edf36355
...
...
@@ -159,53 +159,48 @@ function webservice_server_edit_form($dbserver, $sopts, $iopts) {
'successcallback'
=>
'webservice_oauth_server_submit'
,
'jsform'
=>
false
,
'elements'
=>
array
(
'id'
=>
array
(
'type'
=>
'hidden'
,
'value'
=>
$dbserver
->
id
,
),
'userid'
=>
array
(
'type'
=>
'hidden'
,
'value'
=>
$dbserver
->
userid
,
),
'consumer_key'
=>
array
(
'type'
=>
'hidden'
,
'value'
=>
$dbserver
->
consumer_key
,
),
'id'
=>
array
(
'type'
=>
'hidden'
,
'value'
=>
$dbserver
->
id
,
),
'userid'
=>
array
(
'type'
=>
'hidden'
,
'value'
=>
$dbserver
->
userid
,
),
'consumer_key'
=>
array
(
'type'
=>
'hidden'
,
'value'
=>
$dbserver
->
consumer_key
,
),
),
);
$server_details
[
'elements'
][
'consumer_secret'
]
=
array
(
'title'
=>
get_string
(
'consumer_secret'
,
'auth.webservice'
),
'value'
=>
$dbserver
->
consumer_secret
,
'type'
=>
'html'
,
);
$server_details
[
'elements'
][
'application_title'
]
=
array
(
'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
(
...
...
@@ -213,7 +208,6 @@ 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
(
...
...
@@ -221,7 +215,6 @@ 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
(
...
...
@@ -229,7 +222,6 @@ 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
);
...
...
@@ -242,36 +234,34 @@ function webservice_server_edit_form($dbserver, $sopts, $iopts) {
}
$server_details
[
'elements'
][
'functions'
]
=
array
(
'title'
=>
get_string
(
'functions'
,
'auth.webservice'
),
'value'
=>
implode
(
', '
,
$function_list
),
'value'
=>
'<div class="align-with-input">'
.
implode
(
', '
,
$function_list
)
.
'</div>'
,
'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-primary
mts
'
,
'class'
=>
'btn-primary'
,
);
$elements
=
array
(
// fieldset for managing service function list
'token_details'
=>
array
(
'type'
=>
'fieldset'
,
'legend'
=>
get_string
(
'serverkey'
,
'auth.webservice'
,
$dbserver
->
consumer_key
)
,
'e
le
m
en
ts
'
=>
array
(
'sflist
'
=>
array
(
'type'
=>
'html'
,
'value'
=>
pieform
(
$server_details
),
)
),
'collapsible'
=>
false
,
),
'type'
=>
'fieldset'
,
'class'
=>
'with-padding'
,
'
le
g
en
d
'
=>
get_string
(
'serverkey'
,
'auth.webservice'
,
$dbserver
->
consumer_key
),
'elements
'
=>
array
(
'sflist'
=>
array
(
'value'
=>
pieform
(
$server_details
),
)
),
'collapsible'
=>
false
,
),
);
$form
=
array
(
'renderer'
=>
'div'
,
'type'
=>
'div'
,
'id'
=>
'maintable'
,
'name'
=>
'tokenconfig'
,
'jsform'
=>
false
,
...
...
@@ -318,40 +308,52 @@ function webservice_server_list_form($sopts, $iopts) {
'elements'
=>
array
(
'application'
=>
array
(
'title'
=>
' '
,
'
class'
=>
'heading'
,
'
datatable'
=>
true
,
'type'
=>
'html'
,
'value'
=>
get_string
(
'application'
,
'auth.webservice'
),
),
'username'
=>
array
(
'title'
=>
' '
,
'datatable'
=>
true
,
'type'
=>
'html'
,
'value'
=>
get_string
(
'owner'
,
'auth.webservice'
),
),
'consumer_key'
=>
array
(
'title'
=>
' '
,
'datatable'
=>
true
,
'type'
=>
'html'
,
'value'
=>
get_string
(
'consumer_key'
,
'auth.webservice'
),
),
'consumer_secret'
=>
array
(
'title'
=>
' '
,
'datatable'
=>
true
,
'type'
=>
'html'
,
'value'
=>
get_string
(
'consumer_secret'
,
'auth.webservice'
),
),
'enabled'
=>
array
(
'title'
=>
' '
,
'datatable'
=>
true
,
'type'
=>
'html'
,
'value'
=>
get_string
(
'enabled'
),
),
'calback_uri'
=>
array
(
'title'
=>
' '
,
'datatable'
=>
true
,
'type'
=>
'html'
,
'value'
=>
get_string
(
'callback'
,
'auth.webservice'
),
),
'consumer_secret'
=>
array
(
'title'
=>
' '
,
'datatable'
=>
true
,
'type'
=>
'html'
,
'value'
=>
get_string
(
'consumer_secret'
,
'auth.webservice'
),
),
'actions'
=>
array
(
'title'
=>
' '
,
'datatable'
=>
true
,
'type'
=>
'html'
,
'value'
=>
''
,
),
),
);
foreach
(
$dbconsumers
as
$consumer
)
{
...
...
@@ -385,11 +387,11 @@ function webservice_server_list_form($sopts, $iopts) {
$form
[
'elements'
][
'id'
.
$consumer
->
id
.
'_enabled'
]
=
array
(
'value'
=>
((
$consumer
->
enabled
==
1
)
?
display_icon
(
'enabled'
)
:
display_icon
(
'disabled'
)),
'type'
=>
'html'
,
'class'
=>
'center'
,
'class'
=>
'
text-
center'
,
'key'
=>
$consumer
->
consumer_key
,
);
$form
[
'elements'
][
'id'
.
$consumer
->
id
.
'_calback_uri'
]
=
array
(
'value'
=>
$consumer
->
callback_uri
,
'value'
=>
$consumer
->
callback_uri
,
'type'
=>
'html'
,
'key'
=>
$consumer
->
consumer_key
,
);
...
...
@@ -399,6 +401,7 @@ function webservice_server_list_form($sopts, $iopts) {
'value'
=>
pieform
(
array
(
'name'
=>
'webservices_server_edit_'
.
$consumer
->
id
,
'renderer'
=>
'div'
,
'class'
=>
'form-as-button pull-left'
,
'elementclasses'
=>
false
,
'successcallback'
=>
'webservices_server_submit'
,
'jsform'
=>
false
,
...
...
@@ -408,8 +411,8 @@ function webservice_server_list_form($sopts, $iopts) {
'submit'
=>
array
(
'type'
=>
'button'
,
'usebuttontag'
=>
true
,
'class'
=>
'btn-default'
,
'value'
=>
get_string
(
'editspecific'
,
'mahara'
,
$consumer
->
id
),
'class'
=>
'btn-default
btn-xs
'
,
'value'
=>
'<span class="icon icon-pencil icon-lg"></span><span class="sr-only">'
.
get_string
(
'editspecific'
,
'mahara'
,
$consumer
->
id
)
.
'</span>'
,
'elementtitle'
=>
get_string
(
'edit'
),
),
),
...
...
@@ -418,6 +421,7 @@ function webservice_server_list_form($sopts, $iopts) {
pieform
(
array
(
'name'
=>
'webservices_server_delete_'
.
$consumer
->
id
,
'renderer'
=>
'div'
,
'class'
=>
'form-as-button pull-left'
,
'elementclasses'
=>
false
,
'successcallback'
=>
'webservices_server_submit'
,
'jsform'
=>
false
,
...
...
@@ -427,22 +431,23 @@ function webservice_server_list_form($sopts, $iopts) {
'submit'
=>
array
(
'type'
=>
'button'
,
'usebuttontag'
=>
true
,
'class'
=>
'btn-default'
,
'value'
=>
get_string
(
'deletespecific'
,
'mahara'
,
$consumer
->
id
),
'elementtitle'
=>
get_string
(
'delete
'
),
'class'
=>
'btn-default
btn-xs
'
,
'value'
=>
'<span class="icon icon-trash icon-lg text-danger"></span><span class="sr-only">'
.
get_string
(
'deletespecific'
,
'mahara'
,
$consumer
->
id
)
.
'</span>'
,
'elementtitle'
=>
get_string
(
'delete
specific'
,
'mahara'
,
$consumer
->
id
),
),
),
)),
'type'
=>
'html'
,
'key'
=>
$consumer
->
consumer_key
,
'class'
=>
'webserviceconfigcontrols btn-group'
,
'class'
=>
'webserviceconfigcontrols btn-group
icon-cell
'
,
);
}
$pieform
=
new
Pieform
(
$form
);
$form
=
$pieform
->
build
(
false
);
}
$form
=
pieform
(
array
(
$form
=
'<div class="table-responsive">'
.
$form
.
'</div><div>'
.
pieform
(
array
(
'name'
=>
'webservices_token_generate'
,
'renderer'
=>
'div'
,
'validatecallback'
=>
'webservices_add_application_validate'
,
...
...
@@ -455,12 +460,11 @@ function webservice_server_list_form($sopts, $iopts) {
'type'
=>
'text'
,
'title'
=>
get_string
(
'application'
,
'auth.webservice'
)
.
': '
,
),
'institution'
=>
array
(
'type'
=>
'select'
,
'class'
=>
'institution input-small'
,
'options'
=>
$iopts
,
),
'service'
=>
array
(
'type'
=>
'select'
,
'options'
=>
$sopts
,
...
...
@@ -472,7 +476,7 @@ function webservice_server_list_form($sopts, $iopts) {
'value'
=>
get_string
(
'add'
,
'auth.webservice'
),
),
),
));
))
.
'</div>'
;
$elements
=
array
(
// fieldset for managing service function list
...
...
htdocs/webservice/apptokens.php
View file @
edf36355
...
...
@@ -115,7 +115,7 @@ if (!empty($dbservices)) {
$userform
[
'elements'
][
'id'
.
$service
->
id
.
'_enabled'
]
=
array
(
'value'
=>
((
$service
->
enabled
==
1
)
?
display_icon
(
'enabled'
)
:
display_icon
(
'disabled'
)),
'type'
=>
'html'
,
'class'
=>
'center'
,
'class'
=>
'
text-
center'
,
'key'
=>
$service
->
id
,
);
// token for the service if it exists
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment