Commit Graph

210 Commits

Author SHA1 Message Date
Eric Lippmann 4593c78d16 lib: Fix JSON response exception on form failure 2015-10-26 12:30:50 +01:00
Johannes Meyer 209c084f51 Form: Only add the ViewHelper decorator for hidden form fields
refs #5543
2015-10-01 18:31:05 +02:00
Eric Lippmann 274910a611 CSS: Use class form-controls for form buttons by default
refs #5543
2015-09-30 09:53:36 +02:00
Eric Lippmann d3ac1b16ee Merge branch 'master' into feature/dope-layout-5543 2015-09-27 13:11:11 +02:00
Eric Lippmann 46ab8d847d Forms: Wrap the label and the help icon in a div
refs #5543
2015-09-19 21:58:02 +02:00
Johannes Meyer 83bde3aa81 Form: Rename property $parent to $_parent
Zend.. I love you..
2015-09-17 11:23:47 +02:00
Johannes Meyer d0eb61dc2e Form: Add property $parent
refs #5600
2015-09-15 16:09:33 +02:00
Eric Lippmann b897813e71 lib: Add Form::setRequest() 2015-09-07 13:55:52 +02:00
Eric Lippmann 1fb613e811 api/forms: Fix array access of a notification
refs #9606
2015-09-07 13:49:53 +02:00
Eric Lippmann b20eb681c0 api/forms: Use the first success notification as success message
refs #9606
2015-09-07 13:44:46 +02:00
Eric Lippmann f467d085b0 api: Use JsonResponse in form
refs #9606
2015-09-07 13:36:12 +02:00
Eric Lippmann 96fb3b5d4b Merge branch 'master' into feature/api-9606 2015-08-25 09:25:59 +02:00
Johannes Meyer d31b60102e Form: Fix that form titles are missing
The description may not be set at the time
loadDefaultDecorators() is called.
2015-08-21 14:20:09 +02:00
Johannes Meyer fbca28c024 Form: Only add a form header if a description is set
refs #8369
2015-08-21 13:34:17 +02:00
Johannes Meyer 747f6dcf77 Form: Show the form autosubmit warning in the header tag...
...and use a unique id for the progress element.

refs #8369
2015-08-21 11:40:38 +02:00
Johannes Meyer 46cd47b73c Form: Automatically set data-progress-element...
..for forms with form based autosubmit warnings.

refs #8369
2015-08-20 16:54:20 +02:00
Eric Lippmann 1c5a784022 lib: Move Request::sendJson() to Response::sendJson()
refs #9606
2015-08-20 16:05:45 +02:00
Eric Lippmann 870b73ae09 lib: Rename Request::getIsApiRequest() to ::isApiRequest()
There's no setter involved.

refs #9606
2015-08-20 16:02:25 +02:00
Eric Lippmann 1130e453f6 lib: Fix typos in the Form's PHPDoc 2015-08-20 15:57:52 +02:00
Eric Lippmann f9f813e50b lib: Fix PHPDoc of Form::populate() 2015-08-20 15:56:45 +02:00
Eric Lippmann 0ce4e12db8 lib: Fix type hints for Form::getElements() 2015-08-20 15:55:18 +02:00
Eric Lippmann dd23bd9397 Form: Respond w/ JSON-encoded messages if API requests fail
refs #9606
2015-08-20 15:48:42 +02:00
Johannes Meyer a77dc3665c Form: Show a spinner for ongoing form submits
This will only be shown if there's no progress label set.

refs #8369
2015-08-20 15:05:02 +02:00
Johannes Meyer 275b57cb69 Form: Allow to set a progress label
refs #8369
2015-08-20 15:04:15 +02:00
Johannes Meyer 690d60672c Introduce form element decorator Spinner
refs #8369
2015-08-20 14:34:43 +02:00
Eric Lippmann 71ff4512c3 lib/form: Bypass sent and submit handling if the form is an API target
refs #9606
2015-08-20 13:11:36 +02:00
Johannes Meyer 6c105b867e Form: Be less error-prone while calling array_search 2015-07-31 11:05:09 +02:00
Eric Lippmann 9060e8a034 lib: Only call Icinga::app()->getRequest() for getting the request outside of a controller
Saves a call to getFrontController().

refs #9660
2015-07-30 14:02:44 +02:00
Eric Lippmann 9aa1599a18 Form: Disable CSRF counter measure only on API requests
refs #9660
2015-07-30 12:04:22 +02:00
Eric Lippmann db505281ee lib: Disable CSRF token on HTTP authenticated users and not XHR
refs #9660
2015-07-30 09:33:04 +02:00
Eric Lippmann 07849e0fea lib: Rename Authentication/Manager to Authentication/Auth
refs #9660
2015-07-28 17:08:55 +02:00
Johannes Meyer 86ad6c48ff Form: Automatically remove query parameters only for GET forms
refs #9421
2015-07-27 08:52:33 +02:00
Johannes Meyer cecd94be50 Merge branch 'master' into feature/support-for-file-uploads-8758 2015-07-22 08:47:24 +02:00
Johannes Meyer c0de2e6ee3 Form: Add missing use statement for the ProgrammingError exception 2015-07-22 08:39:24 +02:00
Johannes Meyer 8f2849f32a Form: Improve code readability..
..and avoid the necessity to provide another mock when testing
Form::handleRequest().

refs #8758
2015-07-21 16:48:56 +02:00
Johannes Meyer 7c89887773 Form: Provide an absolute url as redirect url for successful frame uploads
refs #8758
2015-07-21 16:35:56 +02:00
Johannes Meyer 6c9819204d Form: Only work with a single type when handling redirect urls
$form->setRedirectUrl('some/url') still works, but $form->getRedirectUrl()
will only return instances of Icinga\Web\Url now.
2015-07-21 16:33:24 +02:00
Johannes Meyer fc481e527b Form: Process request parameter _frameUpload
This parameter is being used to flag a request as form submission issued
by utilizing an iframe. Appending it to a form's action causes no redirection
to take place in case of successful submission and a reduced but still valid
layout to be printed in any way. Redirection must be handled by the client
regarding the meta tag "redirectUrl".

refs #8758
2015-07-21 15:22:24 +02:00
Johannes Meyer 0a9a066749 Form: Do not create a new instance of Url when returning the redirect url
We're shifting parameters and by creating a new instance we'll lose
such changes.

refs #8758
2015-07-21 15:13:56 +02:00
Johannes Meyer 549f36f82c Form: Do not create a new instance of Url when setting the action
We're shifting parameters and by creating a new instance we'll lose
such changes.

refs #8758
2015-07-16 11:27:02 +02:00
Johannes Meyer 5b908d85bb Form: Fix notifications
* Coding style issues
* Notifications were not grouped by type
* Notifications of sub-forms were overwriting existing ones
(cherry picked from commit 147f6be714)
2015-07-01 14:26:03 +02:00
Johannes Meyer d5ba40ac19 Form: Add hint support
Hints are short messages displayed at the bottom of a form
used to describe specific aspects on how to interact with
the form.

refs #8983
2015-06-30 15:02:58 +02:00
Johannes Meyer 147f6be714 Form: Fix notifications
* Coding style issues
* Notifications were not grouped by type
* Notifications of sub-forms were overwriting existing ones
2015-06-30 14:25:33 +02:00
Johannes Meyer 702a9c9523 Form: Show notifications and errors below any descriptions
They might be textually related to one or more descriptions.

refs #8983
2015-06-30 13:22:54 +02:00
Johannes Meyer ebe144c16a Form: Do not encode actions twice 2015-06-24 16:15:45 +02:00
Johannes Meyer 24cb6bfc6e Form: Preserve defaults for subforms as well 2015-06-05 16:01:52 +02:00
Alexander Fuhr 9f35db71bf Form: Add typed notifications to the form
refs #9203
2015-05-15 13:04:01 +02:00
Johannes Meyer 9596b4fdf7 Form: Make it possible to preserve default values during (auto)submission 2015-04-07 15:07:36 +02:00
Alexander Klimov 967a2e82dc Use (only) "@return $this" in fluent interfaces' documentation 2015-04-07 14:24:11 +02:00
Eric Lippmann 200982e4f5 Set form action automatically only if Form::setAction() has not been called
refs #8605
2015-03-13 03:59:43 +01:00