Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
4810eda8
Commit
4810eda8
authored
Oct 27, 2017
by
Robert Lyon
Committed by
Gerrit Code Review
Oct 27, 2017
Browse files
Merge "Bug 1724704: The webservice connection manager 'Add' field missing"
parents
2c3cff8d
6aa41223
Changes
8
Hide whitespace changes
Inline
Side-by-side
htdocs/auth/webservice/lang/en.utf8/auth.webservice.php
View file @
4810eda8
...
...
@@ -54,7 +54,7 @@ $string['youmaynotregisterwithouttandc'] = 'You may not register unless you agre
$string
[
'pluginconnections'
]
=
'Connection objects'
;
$string
[
'
pcdescrip
tion'
]
=
'
Select
a connection'
;
$string
[
'
nodefinedconnec
tion
s
'
]
=
'
No webservice connections defined in any plugins. Please define
a connection
first.
'
;
$string
[
'instancelistempty'
]
=
'No connection objects for this institution.'
;
$string
[
'addconnection'
]
=
'Add client connection'
;
...
...
htdocs/theme/raw/plugintype/auth/webservice/templates/addconnectionform.tpl
0 → 100644
View file @
4810eda8
{{
if
$connections
}}
<script
type=
"application/javascript"
>
function
addinstance
()
{
var
selectedPlugin
=
document
.
getElementById
(
'
dummySelect
'
).
value
;
var
institution
=
'
{
{
$institution
}
}
'
;
window
.
location
=
'
{
{
$WWWROOT
}
}webservice/admin/addconnection.php?add=1&i={
{
$institution
}
}&p=
'
+
selectedPlugin
;
return
;
}
</script>
<div
class=
"select connections lead"
>
<span
class=
"picker"
>
<select
class=
"select form-control"
name=
"dummy"
id=
"dummySelect"
>
{
{
foreach
$connections
connection
}
}
<option
value=
"{
{
$connection
->
id
}
}"
>
{
{
$connection
->
shortname
}
} - {
{
$connection
->
name
}
}
</option>
{
{/
foreach
}
}
</select>
</span>
<div>
<button
class=
"btn btn-primary"
type=
"button"
onclick=
"addinstance(); return false;"
name=
"button"
value=
"foo"
>
{
{
str
tag
=
Add
section
=
admin
}
}
</button>
</div>
</div>
{
{
else
}
}
<div
class=
"alert alert-info"
>
{
{
str
tag
=
"nodefinedconnections"
section
=
"auth.webservice"
}
}
</div>
{
{/
if
}
}
\ No newline at end of file
htdocs/theme/raw/plugintype/auth/webservice/templates/configform.tpl
View file @
4810eda8
...
...
@@ -3,19 +3,23 @@
<div
class=
"collapsible-group"
id=
"accordion"
aria-multiselectable=
"true"
role=
"tablist"
>
{
foreach
from
=
$form.elements
item
=
element
name
=
elements
}
{
if
$element.type
==
'fieldset'
}
<div
class=
"pseudofieldset panel panel-default collapsible collapsible-group
{
if
$
.
foreach
.
elements
.
last
}
last
{/
if
}
"
>
<h2
class=
"pseudolegend panel-heading has-link"
>
<h2
class=
"pseudolegend panel-heading has-link"
>
<a
class=
"
{
if
!
$
.
foreach
.
elements
.
first
}
collapsed
{/
if
}
"
href=
"#
{
$element.name
}
_pseudofieldset"
data-toggle=
"collapse"
aria-expanded=
"
{
if
$
.
foreach
.
elements
.
first
}
true
{
else
}
false
{/
if
}
"
aria-controls=
"
{
$element.name
}
_pseudofieldset"
data-parent=
"#accordion"
>
{
$element.legend
}
<span
class=
"icon icon-chevron-down right collapse-indicator pull-right"
role=
"presentation"
aria-hidden=
"true"
></span>
</a>
</h2>
<div
class=
"panel-body table-responsive collapse
{
if
$
.
foreach
.
elements
.
first
}
in
{/
if
}
"
id=
"
{
$element.name
}
_pseudofieldset"
>
{
foreach
from
=
$element.elements
item
=
item
}
{
$item.value
|
safe
}
{/
foreach
}
</div>
</h2>
<div
class=
"panel-body table-responsive collapse
{
if
$
.
foreach
.
elements
.
first
}
in
{/
if
}
{
if
$
.
foreach
.
elements
.
last
}
no-footer
{/
if
}
"
id=
"
{
$element.name
}
_pseudofieldset"
>
{
foreach
from
=
$element.elements
item
=
item
}
{
$item.value
|
safe
}
{/
foreach
}
</div>
</div>
{
else
}
{
$element.value
|
safe
}
{/
if
}
{/
foreach
}
</div>
<script
type=
"application/javascript"
>
...
...
htdocs/theme/raw/plugintype/auth/webservice/templates/connections.tpl
View file @
4810eda8
...
...
@@ -104,13 +104,6 @@
return
false
;
}
function
addinstance
()
{
var
selectedPlugin
=
document
.
getElementById
(
'
dummySelect
'
).
value
;
var
institution
=
'
{
{
$institution
}
}
'
;
window
.
location
=
'
{
{
$WWWROOT
}
}webservice/admin/addconnection.php?add=1&i={
{
$institution
}
}&p=
'
+
selectedPlugin
;
return
;
}
function
editinstance
(
id
,
plugin
)
{
window
.
location
=
'
{
{
$WWWROOT
}
}webservice/admin/addconnection.php?id=
'
+
id
+
'
&edit=1&i={
{
$institution
}
}&p=
'
+
plugin
;
return
;
...
...
@@ -160,19 +153,6 @@ IMPORTANT: do not introduce any new whitespace into the instanceList div.
</div>
{
{/
foreach
}
}
</div>
<div
class=
"postlist"
>
{
{
str
tag
=
'pcdescription'
section
=
'auth.webservice'
}
}
</div>
<div
class=
"select connections"
>
<span
class=
"picker"
>
<select
class=
"select form-control"
name=
"dummy"
id=
"dummySelect"
>
{
{
foreach
$connections
connection
}
}
<option
value=
"{
{
$connection
->
id
}
}"
>
{
{
$connection
->
shortname
}
} - {
{
$connection
->
name
}
}
</option>
{
{/
foreach
}
}
</select>
</span>
<div>
<button
class=
"btn btn-primary"
type=
"button"
onclick=
"addinstance(); return false;"
name=
"button"
value=
"foo"
>
{
{
str
tag
=
Add
section
=
admin
}
}
</button>
</div>
</div>
{
{
else
}
}
<div>
{
{
str
tag
=
'instancelistempty'
section
=
'auth.webservice'
}
}
</div>
{
{/
if
}
}
...
...
htdocs/theme/raw_old/plugintype/auth/webservice/templates/addconnectionform.tpl
0 → 100644
View file @
4810eda8
{{
if
$connections
}}
<script
type=
"application/javascript"
>
function
addinstance
()
{
var
selectedPlugin
=
document
.
getElementById
(
'
dummySelect
'
).
value
;
var
institution
=
'
{
{
$institution
}
}
'
;
window
.
location
=
'
{
{
$WWWROOT
}
}webservice/admin/addconnection.php?add=1&i={
{
$institution
}
}&p=
'
+
selectedPlugin
;
return
;
}
</script>
<div
class=
"select connections lead"
>
<span
class=
"picker"
>
<select
class=
"select form-control"
name=
"dummy"
id=
"dummySelect"
>
{
{
foreach
$connections
connection
}
}
<option
value=
"{
{
$connection
->
id
}
}"
>
{
{
$connection
->
shortname
}
} - {
{
$connection
->
name
}
}
</option>
{
{/
foreach
}
}
</select>
</span>
<div>
<button
class=
"btn btn-primary"
type=
"button"
onclick=
"addinstance(); return false;"
name=
"button"
value=
"foo"
>
{
{
str
tag
=
Add
section
=
admin
}
}
</button>
</div>
</div>
{
{
else
}
}
<div
class=
"alert alert-info"
>
{
{
str
tag
=
"nodefinedconnections"
section
=
"auth.webservice"
}
}
</div>
{
{/
if
}
}
\ No newline at end of file
htdocs/theme/raw_old/plugintype/auth/webservice/templates/configform.tpl
View file @
4810eda8
...
...
@@ -3,19 +3,23 @@
<div
class=
"collapsible-group"
id=
"accordion"
aria-multiselectable=
"true"
role=
"tablist"
>
{
foreach
from
=
$form.elements
item
=
element
name
=
elements
}
{
if
$element.type
==
'fieldset'
}
<div
class=
"pseudofieldset panel panel-default collapsible collapsible-group
{
if
$
.
foreach
.
elements
.
last
}
last
{/
if
}
"
>
<h2
class=
"pseudolegend panel-heading has-link"
>
<h2
class=
"pseudolegend panel-heading has-link"
>
<a
class=
"
{
if
!
$
.
foreach
.
elements
.
first
}
collapsed
{/
if
}
"
href=
"#
{
$element.name
}
_pseudofieldset"
data-toggle=
"collapse"
aria-expanded=
"
{
if
$
.
foreach
.
elements
.
first
}
true
{
else
}
false
{/
if
}
"
aria-controls=
"
{
$element.name
}
_pseudofieldset"
data-parent=
"#accordion"
>
{
$element.legend
}
<span
class=
"icon icon-chevron-down right collapse-indicator pull-right"
role=
"presentation"
aria-hidden=
"true"
></span>
</a>
</h2>
<div
class=
"panel-body table-responsive collapse
{
if
$
.
foreach
.
elements
.
first
}
in
{/
if
}
"
id=
"
{
$element.name
}
_pseudofieldset"
>
{
foreach
from
=
$element.elements
item
=
item
}
{
$item.value
|
safe
}
{/
foreach
}
</div>
</h2>
<div
class=
"panel-body table-responsive collapse
{
if
$
.
foreach
.
elements
.
first
}
in
{/
if
}
{
if
$
.
foreach
.
elements
.
last
}
no-footer
{/
if
}
"
id=
"
{
$element.name
}
_pseudofieldset"
>
{
foreach
from
=
$element.elements
item
=
item
}
{
$item.value
|
safe
}
{/
foreach
}
</div>
</div>
{
else
}
{
$element.value
|
safe
}
{/
if
}
{/
foreach
}
</div>
<script
type=
"application/javascript"
>
...
...
htdocs/theme/raw_old/plugintype/auth/webservice/templates/connections.tpl
View file @
4810eda8
...
...
@@ -104,13 +104,6 @@
return
false
;
}
function
addinstance
()
{
var
selectedPlugin
=
document
.
getElementById
(
'
dummySelect
'
).
value
;
var
institution
=
'
{
{
$institution
}
}
'
;
window
.
location
=
'
{
{
$WWWROOT
}
}webservice/admin/addconnection.php?add=1&i={
{
$institution
}
}&p=
'
+
selectedPlugin
;
return
;
}
function
editinstance
(
id
,
plugin
)
{
window
.
location
=
'
{
{
$WWWROOT
}
}webservice/admin/addconnection.php?id=
'
+
id
+
'
&edit=1&i={
{
$institution
}
}&p=
'
+
plugin
;
return
;
...
...
@@ -160,19 +153,6 @@ IMPORTANT: do not introduce any new whitespace into the instanceList div.
</div>
{
{/
foreach
}
}
</div>
<div
class=
"postlist"
>
{
{
str
tag
=
'pcdescription'
section
=
'auth.webservice'
}
}
</div>
<div
class=
"select connections"
>
<span
class=
"picker"
>
<select
class=
"select form-control"
name=
"dummy"
id=
"dummySelect"
>
{
{
foreach
$connections
connection
}
}
<option
value=
"{
{
$connection
->
id
}
}"
>
{
{
$connection
->
shortname
}
} - {
{
$connection
->
name
}
}
</option>
{
{/
foreach
}
}
</select>
</span>
<div>
<button
class=
"btn btn-primary"
type=
"button"
onclick=
"addinstance(); return false;"
name=
"button"
value=
"foo"
>
{
{
str
tag
=
Add
section
=
admin
}
}
</button>
</div>
</div>
{
{
else
}
}
<div>
{
{
str
tag
=
'instancelistempty'
section
=
'auth.webservice'
}
}
</div>
{
{/
if
}
}
...
...
htdocs/webservice/admin/connections.php
View file @
4810eda8
...
...
@@ -103,8 +103,12 @@ if ($reorder && $json) {
* @return pieforms $element array
*/
function
webservice_client_connections
(
$institution
)
{
$wcc
=
webservice_connection_classes
(
$institution
);
$elements
=
array
(
'addconnection'
=>
array
(
'type'
=>
'html'
,
'value'
=>
$wcc
[
'addconnection'
],
),
// fieldset for managing service function groups
'pluginconnections'
=>
array
(
'type'
=>
'fieldset'
,
...
...
@@ -112,7 +116,7 @@ function webservice_client_connections($institution) {
'elements'
=>
array
(
'webservicesservicecontainer'
=>
array
(
'type'
=>
'html'
,
'value'
=>
webservice_connection_classes
(
$institution
)
,
'value'
=>
$wcc
[
'instances'
]
,
)
),
'collapsible'
=>
true
,
...
...
@@ -174,9 +178,11 @@ function webservice_connection_classes($institution) {
$smarty
->
assign
(
'instancelist'
,
$connection_instances
);
$smarty
->
assign
(
'connections'
,
$connections
);
$smarty
->
assign
(
'institution'
,
$institution
);
$addhtml
=
$smarty
->
fetch
(
'auth:webservice:addconnectionform.tpl'
);
$smarty
->
assign
(
'instancestring'
,
$instancestring
);
$smarty
->
assign
(
'sesskey'
,
$USER
->
get
(
'sesskey'
));
return
$smarty
->
fetch
(
'auth:webservice:connections.tpl'
);
$html
=
$smarty
->
fetch
(
'auth:webservice:connections.tpl'
);
return
array
(
'instances'
=>
$html
,
'addconnection'
=>
$addhtml
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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