Commit Graph

2593 Commits

Author SHA1 Message Date
Johannes Meyer 9c434fe8bf Make isValid more compact and fix coding style
refs #5525
2014-07-24 09:05:10 +02:00
Johannes Meyer edf49d091e Rewrite addForceCreationCheckbox and move it downwards
We should not instantiate form elements directly without any specific
reason.

refs #5525
2014-07-24 08:57:49 +02:00
Johannes Meyer d8b468cf12 Add addSubmitButton to BaseBackendForm
refs #5525
2014-07-24 08:49:47 +02:00
Johannes Meyer 235c4a8c52 Remove getConfig and add get/setBackendConfig instead
As for every configuration form, backend forms need special population
mechanisms as well.

refs #5525
2014-07-24 08:47:58 +02:00
Johannes Meyer 4fe46a2c6e Remove unnecessary properties and their getters/setters
This kind of data is mainly prepared in the controller's action now or
directly fetched in a concrete form implementation.

refs #5525
2014-07-24 08:45:38 +02:00
Johannes Meyer fd912daa3d Adjust createresource-action to suit the updated resource form interface
refs #5525
2014-07-23 16:39:54 +02:00
Johannes Meyer 936f65eb27 Adjust resource form to suit the new form builder implementation
refs #5525
2014-07-23 16:39:15 +02:00
Johannes Meyer c8d61f78e7 Fix the config/resource-action's html markup 2014-07-23 12:55:43 +02:00
Johannes Meyer 9cdd891866 Drop ReorderForm and handle its logic in the controller and view instead
refs #5525
2014-07-23 12:35:39 +02:00
Johannes Meyer 8b2cc3a558 Do not consider <button type=submit> when checking form completion
refs #5525
2014-07-23 10:58:45 +02:00
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 25c9ee567d Add missing use statement for Zend_View_Abstract 2014-07-23 10:54:22 +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 a73e2ee654 Adjust general config form to suit the new form builder implementation
refs #5525
2014-07-21 14:33:52 +02:00
Johannes Meyer a9f0b95e51 Adjust preferences form to suit the new form builder implementation
refs #5525
2014-07-21 10:20:04 +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 6ed3d5fdbd Remove Icinga\Form\Install\LoggingPage 2014-07-18 10:40:37 +02:00
Johannes Meyer 7157b11f97 Adjust LoggingForm to suit the "final" form builder implementation
refs #5525
2014-07-18 10:29:23 +02:00
Johannes Meyer 5da14d3fc5 Adjust LoginForm to suit the "final" form builder implementation
refs #5525
2014-07-18 10:23:04 +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 4d199180b3 We do not want to access $_POST directly if it is possible to avoid it 2014-07-17 09:28:10 +02:00
Johannes Meyer b7f5c8a84d Fix that the default sort order of a view is not being applied
fixes #6644
2014-07-17 09:28:10 +02:00
Alexander Klimov b23e36aa1a Swap array keys and values
Non-hardcoded keys may be not unique
2014-07-16 17:54:06 +02:00
Alexander Klimov 62da942159 Don't close and re-open php tags, remove unneeded spaces
To close and re-open php tags makes no sense if there's nothing between them
2014-07-16 17:54:06 +02:00
Matthias Jentsch bfc54b7e32 Fix array conversion of the Dashboard and its Components
Do not omit the parameters when converting the dashboard components to
an array. Add an array conversion to the UrlParams class.

refs #6691
2014-07-16 17:31:01 +02:00
Johannes Meyer 5c507d5d91 Fix notice that the session has been already started after retrieving its id 2014-07-16 15:39:40 +02:00
Alexander Klimov 1ad263170e Revert "Small fixes"
This reverts commit 8086292b1b.

The commit included too many changes.
2014-07-16 15:30:20 +02:00
Johannes Meyer eb977b7a55 Fix wrong variable assignment causing preferred languages not being set 2014-07-16 15:17:14 +02:00
Johannes Meyer f1d7cd8b50 Remove forgotten coding standards annotation 2014-07-16 13:59:43 +02:00
Alexander Klimov cb04c42bab Use htmlspecialchars to prevent attacks 2014-07-16 13:10:28 +02:00
Johannes Meyer e5fdf78c98 Fix testing errors due to accessing the session id by using our container 2014-07-16 10:18:00 +02:00
Johannes Meyer e6dee9fe89 Protect login against CSRF
refs #5626
2014-07-16 09:55:23 +02:00
Johannes Meyer b40027b6c7 Purge session when logging out
fixes #6739
2014-07-16 09:55:22 +02:00
Johannes Meyer 19f05256a0 Only call session_start() when reading from session
fixes #6383
2014-07-16 09:55:22 +02:00
Alexander Klimov 8086292b1b Small fixes 2014-07-15 18:00:52 +02:00
Alexander Klimov 4c415aac5c Make contacts' view look more like contactgroups' view 2014-07-15 16:17:02 +02:00
Johannes Meyer c7c2ad3790 Improve preference changeset calculation
The calculation is still subject to the concrete writer implementation as its
parent Icinga\User\Preferences\PreferencesStore is only an abstraction
layer without any knowledge how the data is actually stored so it is not able
to determine how to handle differences.

fixes #6220
2014-07-15 14:54:57 +02:00
Johannes Meyer 333c95ef6d Merge branch 'bugfix/light-file-header-6309'
fixes #6309
2014-07-15 13:44:56 +02:00
Johannes Meyer 3105c2059e Remove license headers from all files
refs #6309
2014-07-15 13:43:52 +02:00
Johannes Meyer 861f9e03c5 Drop public/css/icinga/actiontable.less as its not in use anywhere 2014-07-15 13:43:52 +02:00
Johannes Meyer 39cd4a436b Allow empty license headers being applied to files
refs #6309
2014-07-15 13:43:51 +02:00