Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marcus Eibrink-Lunzenauer
Stud.IP
Commits
647f8332
Commit
647f8332
authored
9 months ago
by
Rasmus Fuhse
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "TIC: Einfacheres Arbeiten mit dem Formbuilder"
Closes #4117 Merge request
studip/studip!2960
parent
555475cd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/classes/forms/Form.php
+2
-0
2 additions, 0 deletions
lib/classes/forms/Form.php
lib/classes/forms/Input.php
+8
-3
8 additions, 3 deletions
lib/classes/forms/Input.php
resources/assets/javascripts/bootstrap/forms.js
+7
-3
7 additions, 3 deletions
resources/assets/javascripts/bootstrap/forms.js
with
17 additions
and
6 deletions
lib/classes/forms/Form.php
+
2
−
0
View file @
647f8332
...
...
@@ -297,6 +297,8 @@ class Form extends Part
\PageLayout
::
postSuccess
(
$this
->
success_message
);
}
page_close
();
//This indicates that the form has been stored successfully.
echo
"STUDIPFORM_STORE_SUCCESS"
;
die
();
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/classes/forms/Input.php
+
8
−
3
View file @
647f8332
...
...
@@ -150,12 +150,17 @@ abstract class Input
}
/**
* Returns the value of this input.
* @return
null
* Returns the value of this input.
If $this->value is a callable this->getValue() returns the computed result.
* @return
mixed
*/
public
function
getValue
()
{
return
$this
->
value
;
if
(
is_callable
(
$this
->
value
))
{
$callable
=
$this
->
value
;
return
$callable
();
}
else
{
return
$this
->
value
;
}
}
/**
...
...
This diff is collapsed.
Click to expand it.
resources/assets/javascripts/bootstrap/forms.js
+
7
−
3
View file @
647f8332
import
{
$gettext
,
$gettextInterpolate
}
from
'
../lib/gettext
'
;
import
Report
from
'
../lib/report.js
'
;
// Allow fieldsets to collapse
$
(
document
).
on
(
...
...
@@ -291,9 +292,12 @@ STUDIP.ready(function () {
url
:
v
.
STUDIPFORM_AUTOSAVEURL
,
data
:
params
,
type
:
'
post
'
,
success
()
{
if
(
v
.
STUDIPFORM_REDIRECTURL
)
{
window
.
location
.
href
=
v
.
STUDIPFORM_REDIRECTURL
success
(
output
)
{
if
(
output
===
'
STUDIPFORM_STORE_SUCCESS
'
&&
v
.
STUDIPFORM_REDIRECTURL
)
{
//The form has been stored successfully:
window
.
location
.
href
=
v
.
STUDIPFORM_REDIRECTURL
;
}
else
if
(
output
!==
'
STUDIPFORM_STORE_SUCCESS
'
)
{
Report
.
error
(
$gettext
(
'
Es ist ein Fehler aufgetreten
'
),
output
);
}
}
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment