Johannes Meyer
0bf0213547
Rename Form::addElement to Form::createElement
...
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
2014-07-23 10:57:46 +02:00
Johannes Meyer
75e09f2c69
Do not consider submit buttons when checking form completion
...
refs #5525
2014-07-21 15:25:00 +02:00
Johannes Meyer
f5ac592645
Do not consider disabled elements when checking form completion
...
Values of disabled inputs are not sent by browsers.
refs #5525
2014-07-21 08:57:41 +02:00
Johannes Meyer
f4ff2c90f2
It's a form's responsibility how its submit button should look like
...
refs #5525
2014-07-18 09:54:36 +02:00
Johannes Meyer
6ac471c598
Also mention the viewscript functionality of Form::loadDefaultDecorators()
...
refs #5525
2014-07-18 09:52:50 +02:00
Johannes Meyer
8f0b9899a3
We cannot know what kind of data is passed to Form::isValid()
...
refs #5525
2014-07-18 09:52:05 +02:00
Johannes Meyer
78a6175acc
Make form creation lazy and implement the new validation mechanism
...
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
2014-07-18 09:51:15 +02:00
Johannes Meyer
37fd3deb67
Rename initCsrfToken to addCsrfToken and move it upwards
...
Form::addCsrfToken() should be public and fluent to ensure more
flexibility.
refs #5525
2014-07-18 09:43:03 +02:00
Johannes Meyer
58188c5cc1
We only want to rely on Form::isValid() when about to process forms
...
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
2014-07-18 09:33:09 +02:00
Johannes Meyer
802c095bf8
Configuration values need to be inserted to forms explicitly
...
It's the controllers' responsibility to ensure that forms are populated with
configuration values on GET requests.
refs #5525
2014-07-18 09:27:10 +02:00
Johannes Meyer
21cd503ee7
Form buttons need to be added explicitly
...
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
2014-07-18 09:24:49 +02:00
Johannes Meyer
47ae4d79dc
Forms do not need a special title property
...
As our upcoming wizard has no menu and our tabs are hardcoded we do not
need a special "title" property anymore.
refs #5525
2014-07-18 09:21:11 +02:00
Johannes Meyer
1de2d0c14f
Merge branch 'master' into bugfix/rebuild-form-builder-5525
...
Conflicts:
application/forms/Authentication/LoginForm.php
library/Icinga/Test/BaseTestCase.php
library/Icinga/Web/Form.php
library/Icinga/Web/Form/Decorator/BootstrapForm.php
2014-07-17 13:15:42 +02:00
Johannes Meyer
e6dee9fe89
Protect login against CSRF
...
refs #5626
2014-07-16 09:55:23 +02:00
Johannes Meyer
3105c2059e
Remove license headers from all files
...
refs #6309
2014-07-15 13:43:52 +02:00
Johannes Meyer
0dce204651
Refactor Icinga\Web\Form
...
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
2014-07-10 11:13:45 +02:00
Johannes Meyer
82d2f5ac9b
Revert "Merge branch 'feature/install-wizard-6136'"
...
This reverts commit 88d4262e7c
, reversing
changes made to 6fae333048
.
Conflicts:
application/controllers/InstallController.php
library/Icinga/Web/Controller/ActionController.php
2014-07-07 15:09:03 +02:00
Thomas Gelf
ba9a633b73
Web\Form: relax form submission check
...
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 #6423
fixes #5967
refs #6540
2014-06-23 13:31:34 +02:00
Thomas Gelf
916c9c027e
forms: fix isSubmitted
...
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
2014-06-20 14:32:22 +02:00
Thomas Gelf
b447225512
Web\Form: Revert "Fix subForm functionality"
...
This reverts commit 51bac035ac
.
The div element introduced by this commit breaks inline form layout
2014-05-20 13:10:18 +00:00
Johannes Meyer
33d4142664
Make it possible to recreate a form
2014-05-14 12:53:44 +02:00
Johannes Meyer
51bac035ac
Fix subForm functionality
2014-05-14 12:53:44 +02:00
Johannes Meyer
de169c7bf5
Make it possible to disable form submit buttons forcefully
2014-05-14 12:53:44 +02:00
Johannes Meyer
2b15d35dec
Rewrite test for Icinga\Web\Form
...
refs #6011
2014-04-28 14:06:40 +02:00
Johannes Meyer
d109046bc0
Fix that the general and logging form cannot write configuration changes
...
fixes #5952
2014-04-07 09:27:37 +02:00
Thomas Gelf
e480ed7aad
We have no data-icinga-component
2014-03-09 01:59:27 +01:00
Thomas Gelf
57caacb93f
Merge branch 'feature/fanzzzy-5481' into feature/master-1
...
Conflicts:
application/controllers/AuthenticationController.php
application/controllers/ErrorController.php
application/views/scripts/authentication/login.phtml
library/Icinga/Application/ApplicationBootstrap.php
library/Icinga/Web/Controller/ActionController.php
library/Icinga/Web/Hook.php
library/Icinga/Web/Widget/Dashboard.php
2014-03-04 09:42:25 +00:00
Thomas Gelf
912b3a6478
Remove obsolete form classes
2014-02-25 10:05:14 +00:00
Eric Lippmann
35fc451115
Rework save preferences
2014-02-17 14:11:55 +01:00
Eric Lippmann
ca1d50ae53
Rename Icinga 2 Web to Icinga Web 2
2013-10-23 15:11:06 +02:00
Jannis Moßhammer
f7c0eaa7c4
Fix/Reimplement dashboard
...
refs #4532
2013-10-22 12:10:12 +02:00
Marius Hein
53ab6dbbf1
Implement global command toggle form in process view
...
refs #4918
2013-10-19 15:28:51 +02:00
Marius Hein
73e8d60060
Implement global commands
...
resolves #4142
2013-10-19 13:25:18 +02:00
Marius Hein
7a406b313f
Adjusted buttons and a tags
...
refs #4869
2013-10-15 18:10:36 +02:00
Jannis Moßhammer
b4000d34fb
CS: Fixed styles, add codingStandardsIgnore for helper
...
refs #4611
2013-09-23 13:56:59 +02:00
Jannis Moßhammer
6d26240d6d
Add Main detail state to url, renderhelper, container tests
...
- The ActionController is now able to render a seperate detail view
- All list scripts select the currently active row from the detail view with
the 'active' class
- Autosubmit is now again attached to the onchange attribute (to prevent issues
when js can't load correctly)
- Logout is now recognized and causes a page refresh (will be made more generic)
- Add history mock for testing url changes
- Update all grids to implement the app/mainDetailGrid component
refs #4611
2013-09-23 13:56:57 +02:00
Eric Lippmann
a5908c9553
CS: Replace multiple empty lines with one
...
find application/ library/Icinga/ test/ modules/ -name *.php | xargs sed -i '/^$/N;/^\n$/D'
2013-09-04 18:36:10 +02:00
Eric Lippmann
05d08fb0b8
Fix Bootstrap typed wrong
...
refs #4601
2013-09-04 17:12:44 +02:00
Jannis Moßhammer
d27e34cef8
Codestyle and Test fixes for SortBox
...
refs #4601
2013-09-04 15:22:00 +02:00
Jannis Moßhammer
57e66c247a
Add sort widget, change js path from module to app, small style fixes
...
refs #4601
2013-09-04 15:22:00 +02:00
Johannes Meyer
1a003f8c8b
Move configuration and preference handling to Form base class
...
Moved setConfiguration, setUserPreferences and getUserPreferences
to our Form base class due to some redundancies.
refs #4581
2013-09-03 09:27:02 +02:00
Jannis Moßhammer
c5fde2324e
Generalize form handling in Icinga\Web Form & Tests
...
configForm.js is now form.js and applied on all forms,
the autosubmit is now a special attribute for input fields,
so the PHP code doesn't create JS snippets anymore
refs #4622
2013-09-02 10:59:05 +02:00
Jannis Moßhammer
978b3519f6
Add configform js component (will be renamed later)
...
refs #4622
2013-09-02 10:59:05 +02:00
Jannis Moßhammer
d0ac97f335
Configure fixes, regression test for 4606
...
The configure routine still has to be improved, right now unused
authentication backends are commented out
refs #4491
refs #4606
refs #4640
2013-08-29 11:48:32 +02:00
Jannis Moßhammer
17e6402aa9
Split up authentication form, logic connectivity check
...
refs #4606
refs #4622
refs #4602
refs #4546
2013-08-29 11:48:29 +02:00
Jannis Moßhammer
4527aaf57a
Smaller fixes in phpdoc style
...
refs #4566
2013-08-28 14:42:31 +02:00
Johannes Meyer
7fab739efd
Fix styles in Form.php
...
refs #4566
2013-08-28 09:08:37 +02:00
Johannes Meyer
13e4efa221
Make use of the helptext decorator if suitable
...
Refactored some uses of the form element Note so that
each one is properly attached to its input element.
refs #4566
2013-08-28 08:57:46 +02:00
Eric Lippmann
edb06ea8ea
CS: Fix viloations for touched files in branch feature/backend-configuration-ui-3776
...
refs #3776
2013-08-21 14:22:31 +02:00
Jannis Moßhammer
972bc9853e
Configuration interfaces for logging, authentication and general configuration
...
- Added HelpText decorator
- Added Time and DateFormatValidator
- Added tests
refs #3777
2013-08-21 14:22:30 +02:00
Jannis Moßhammer
c705f5d475
Implement Authentication form
...
- Allow creation of authentication providers
- Allow modification of authentication providers
- Allow reordering of authentication providers
refs #3777
2013-08-21 14:18:54 +02:00
Jannis Moßhammer
9ddc03d571
Implement General configuration form
...
Missing:
- Logical validation (check for writable paths)
- DB Resource selection (see #4503 )
refs #3777
2013-08-21 14:18:53 +02:00
Eric Lippmann
5cb9c67443
Framework: Fix Form's docstrings
...
refs #4440
2013-08-12 16:43:09 +02:00
Jannis Moßhammer
ff62a82895
Fix dynamic form validation behaviour, fix documentaion, fix correct isValid() call
...
- When a dynamic form is modified, no validation is performed, but
the form is being populated with $this->populate.
- changed parent::isValid to $this->isValid, otherwise no custom validation
logic could be implemented
- Updated documentation
- Fix CSRF protection by removing the time
refs #4439
2013-08-06 15:08:54 +02:00
Johannes Meyer
66592ecabf
Enable dynamic form elements
...
Expire time of the AcknowledgeForm and hours as well as
minutes of the ScheduleDowntimeForm are now dynamic.
refs #4439
2013-08-06 15:06:20 +02:00
Johannes Meyer
f5162189dd
Implement dynamic form elements
...
Rename "isPostAndValid" to "isSubmittedAndValid" and refactor it.
Add possibility for specific form elements to auto-submit their form.
refs #4439
2013-08-06 15:03:25 +02:00
Johannes Meyer
5533b632ed
Fix code style and make form name non mandatory
...
refs #4439
2013-08-06 11:11:29 +02:00
Johannes Meyer
f26af0eb12
Update command form tests
...
Update command form tests so that they reflect the new dynamic
functionality and the correct purpose of "isSubmittedAndValid".
refs #4439
2013-08-06 11:11:28 +02:00
Johannes Meyer
8efbe6f613
Move submit and cancel handling
...
Move submit and cancel handling from ConfirmationForm to Form.
refs #4439
2013-08-06 11:11:28 +02:00
Johannes Meyer
fa7379adc7
Enable dynamic form elements
...
Expire time of the AcknowledgeForm and hours as well as
minutes of the ScheduleDowntimeForm are now dynamic.
refs #4439
2013-08-06 11:09:42 +02:00
Johannes Meyer
98e7ab02db
Implement dynamic form elements
...
Rename "isPostAndValid" to "isSubmittedAndValid" and refactor it.
Add possibility for specific form elements to auto-submit their form.
refs #4439
2013-08-06 11:09:42 +02:00
Marius Hein
2b3bef457d
Command masks: Small PSR fix, drop unused core, fix lazy render
...
refs #4355
2013-07-24 12:43:26 +02:00
Jannis Moßhammer
ddfbf915ed
Implement isPostAndValid, fix CSRF in forms, update tests
...
Form provides isPostAndValid for validation, using the
request for fetching POST data.
The tests are now updated to use the CSRF protection and
are cleaner now
refs #4355
2013-07-24 10:56:41 +02:00
Marius Hein
849eee2cf2
Command masks: Review changes [WIP]
...
refs #4355
2013-07-23 17:09:06 +02:00
Marius Hein
89e7fa6b2d
Command masks: Add validator and change validation flow
...
refs #4355
2013-07-23 14:47:40 +02:00
Marius Hein
e9c9c9de87
Command masks: Fix lazy initialization of forms
...
refs #4355
2013-07-23 14:47:40 +02:00
Marius Hein
03f4a8eceb
Command masks: Implement missing forms [WIP]
...
Fixes phpcs issues, missing features, fix controller using
new config interface.
refs #4355
2013-07-23 14:47:40 +02:00
Marius Hein
0de38c25eb
Command masks: Refactor and implement masks
...
refs #4355
2013-07-23 14:47:40 +02:00
Marius Hein
d5b8a850ea
Forms: New form system
...
Move new form parts arround and add new LoginForm.
refs #4355
2013-07-23 14:46:26 +02:00
Marius Hein
dc878de275
Forms: Move class to the right place
...
Drop some methods we do not need anymore (all model related).
refs #4355
2013-07-23 14:46:25 +02:00
Marius Hein
2469e3652c
Forms: Drop old form class
2013-07-23 14:46:25 +02:00
Marius Hein
5489c2fa2e
Update license header
...
refs #4407
2013-07-15 12:26:10 +02:00
Marius Hein
6be510b05e
License writer
...
Update license headers
refs #4262
2013-07-03 14:17:49 +02:00
Marius Hein
5e14f828ba
Evaluate, Test and Move the items und library/Icinga/Web to the source tree
...
Fix PSR compliance.
refs #4256
2013-06-13 11:59:48 +02:00
Jannis Moßhammer
54ccb9b12a
Move libraries from incubator to working tree for evaluation
...
Add all untested files from incubator's library/Icinga to working
tree library/Icinga
refs #4257
2013-06-07 15:46:33 +02:00