Replaced `ElementWrapper' and `HelpText' with Zend's `HtmlTag' and `Label' respectively.
Instances of Zend_Form_Element returned by `Form::createElements()' now receive our desired default decorators.
refs #5525
`Form::getName()' auto-detects the form's name if it's not set and sets the form's name using `Zend_Form::setName()'.
`Zend_Form::setName()' then filters the form name stripping backslash '\' characters. The first call to `Form::getName()'
did not regard the filtering and thus returned the unfiltered name which led to `Form::wasSent()' returning `false'.
refs #5525
This allows us to write generic forms like the ConfirmRemoval form but to
utilize handleRequest() while providing a closure in the array that is passed
to a form's constructor.
refs #5525
We require forms to set autosubmit=true on elements which are supposed
to be submitted automatically now. The base form then ensures that this
works in JS environments and non-JS environments as well by applying the
right changes to the HTML.
refs #5525
This reverts commit 87a5967501.
At least 'modules/doc/run.php' issues a warning about "The use statement with non-compound name 'Zend_Controller_Router_Route' has no effect"
There is currently no usecase for onFailure() but for onShow() wherewith
the case is covered when a form needs to be prepared before showing it
to the user while the form was not submitted in any way.
refs #5525
This way concrete form implementations can also simply fetch form
dependent request values without referring to the form's submission
method.
refs #5525
Adding suffix "Hook" to every base class. This simplifies development
because you don't need to alias bases classes in your concrete
hook classes
refs #6928
How forms are being validated should not be a task that is part of the
controller action, but should be handled by the form base class as it is
most of the time the same procedure. Now a controller action just sets
up the form to use, calls handleRequest() and acts upon its return value.
(e.g. calling handleRequest() from another form or any redirection)
refs #5525
It is not sufficient to just check whether all required elements are being
submitted. We definetely need to check whether the submit button was
pressed. But doing this and providing a standard button with a static name
simultaneously will produce conflicts if forms are using the same action
urls. To fix this, we'll add an additional form-identification check by using
a form's name or class.
refs #5525
The redirectOnLogin function now doesn't have any predefined default.
This also leads to the behaviour that "Logout" will not redirect you
anywhere on a new login while "forcibly being logged out" (e.g. by
logging out in another browser tab) will bring you back to where you
came from.
...once you lost your session. That's the only way to do this in a
smooth way. When the server get's an unauthenticated request for a
single container, redirecting to auth/login?redir=<that-container>
was not what you expect.
Together with JS handling __SELF__ in redirection URLs this will
play fine.
refs #6935
One might not expect to get a URL with params separated by & while
this is the correct way of writing them to HTML attributes. So default
behaviour is right now that all functions return URL params separated
by &, but if you cast a URL (or it's params) to a string, & will be
used.
Additionally there are toString functions allowing you to choose the
separator "manually".
refs #6699
This function had an interesting history and seems to be a result of
missunderstanding of each others commits. Removed, as the fragment is
already there.
refs #6699
Setting an url with parameters named like form elements in a form with
method POST causes Zend to ignore any POST data because GET will be
processed with higher priority.
fixes#6806
Since we are using mainly createElement and addElement is only an alias for
createElement if no object is passed our changes to addElement can safely
be moved to createElement.
refs #5525
Form creation must not depend on specific function calls. If a forms' elements are required and missing, create them. Form::isValid() must be
able to determine whether a form can be processed or not without to rely
on a particular button value.
refs #5525
As the new auto-submission implementation does not depend on whether
a submit button was pressed or not we need another way to determine
whether a form should be processed.
refs #5525
We either demand the user to add a submit button or provide a implicit
function call to be implemented by him, adding additional elements once
the form gets rendered.
refs #5525
We eagerly waited badly for a new approach to build forms, so here it is.
Should be the best compromise between the Zend_Form functionality and
our requirements regarding automatic submits.
refs #5525
This reverts commit 88d4262e7c, reversing
changes made to 6fae333048.
Conflicts:
application/controllers/InstallController.php
library/Icinga/Web/Controller/ActionController.php
The menu was being rendered through recursive partials before. The
overhead this fact implicates is not as efficient as standard recursion
so there is now a special renderer for Icinga\Web\Menu utilizing
the RecursiveIteratorIterator
refs #6153
We do not need an additional class for the menu's root item just to
encapsulate our config handling, so these two classes were now merged
into a single one. Icinga\Web\Menu now also extends from
RecursiveIterator to be able to render the menu more efficient to html.
refs #6153
In case we pass limit=0 we show this, still unsure whether we should
provide a link for "showing all" - might really hurt with millions of
history rows.
Might have been a JS issue, but instead of messing with the URL just
POSTing is easier here - and works. Filters from the search box are
now added flawlessly to the filter tree.
Module configuration now takes place in module detail view and does no
longer pollute our config tabs. Modules are now able to provide a bunch
of own config tabs, we don't really care what they use them for.
There was an issue with custom vars as they made only partially part
of the column dropdown. Sorted columns and tried to beautify column
names.
fixes#6569
This widget is pretty useless as the error view script can to it's
job. Interestingly nobody missed it, even the render() call was wrong.
I guess we will remove this soon, but for now it's fixed. Looks ugly,
but works.
We have to live with some badly designed forms right now. Some have
submit buttons but don't know about, others don't have such but link
to foreign controllers fiddling with the form and adding different
button AFTER the form got submitted - it's a mess.
Relaxing the submission check to "just check whether btn_submit has
a value" fixes most of this. However I do not consider this being a
solution for the long run.
fixes#6423fixes#5967
refs #6540
Different changes have been applied:
* Allow integer unix timestamps as parameters for timestamp columns
* Remove alias-rewriting from Url class
* Remove all traces of raw_timestamp
* Use new filters
Showing less items right now. It would be great if we could steer
this by parameter. IMO we should also think about dropping ZF
pagination and use a custom tiny widget.
Implementation made wrong assumptions. A form is submitted when the
submit button has been pressed. It's value is then filled, it also
is when you're just pressing "RETURN". RETURN triggers the FIRST
submit button in a form. This way we are also able to find out which
form button has been pressed.
Current implementation is still poor, however isSubmitted works as
expected right now - and so does autosubmission.
fixes#5967
This adds quite a bunch of changes. Part of the filter-modifying
complexity has been moved to the filter, the editor widget itself
now makes use of new filter capabilities such as changing operator
or expression type.
Show current title, a well-formated value and a label for each area in a
tooltip and add the ability to customize tooltip labels of InlinePies
refs #6117
Every monitoring controller needs $backend, so why declaring it over
and over again. Created "moduleInit" dummy function in our base action
controller to allow such implementations without polluting init().
The URL query string parsing done by PHP/ZF doesn't suffice our needs.
This is an implementation preserving filter-related "strange" query
string components while still offering legacy behaviour.
Missing right now: support for [].
This patch makes IcingaWeb deliver a legacy jQuery version for IE8
as it is no longer supported in jQuery 2.x. JS for IE8 will not be
delivered minified to ease troubleshooting on that buggy platform.
fixes#5866
refs #6417
When no (default) configuration is available for dashboards
application dies not very gracefully. Display error message
and guid the user to the solution is a better way.
fixes#6412
This doesn't make it much better but allows to build a package
libicinga-vendor-php placing those files to /usr/share/php/IcingaVendor
or similar.
refs #4075
Instead of having two separate functions to get the prefix
and the formatted time interval the new functions return
both the prefix and the time interval.
refs #5981
PHP respects locales (LC_NUMERIC) when casting floats to string. That
affected the generated HTML for our inline pie charts. This patch is
not that beautiful - but fixes this.
fixes#6348
This is just a first step, trying to catch a few gotchas:
* it doesn't send notifications to the browser when issueing a redirect
as redirects can currently not be catched in jQuery response handlers
* it tries to find a better notification handling place in the response
handler (JS) - still imperfect
* it explicitely stores sessions once modified by notifications. Still
need to crosscheck whether this is really needed and how we can get
rid of this.
refs #6280