@@ -21,7 +21,7 @@ |
||
| 21 | 21 | <div id="content" class="no-header"> |
| 22 | 22 | <div class="midcom-view-toolbar"> |
| 23 | 23 | <?php |
| 24 | - midcom::get()->toolbars->show_view_toolbar(); |
|
| 24 | + midcom::get()->toolbars->show_view_toolbar(); |
|
| 25 | 25 | ?> |
| 26 | 26 | </div> |
| 27 | 27 | <(content)> |
@@ -58,18 +58,18 @@ |
||
| 58 | 58 | </noscript> |
| 59 | 59 | |
| 60 | 60 | <?php |
| 61 | - if ($login_warning) |
|
| 62 | - { |
|
| 63 | - echo '<p class="login_warning">' . $login_warning . "</p>\n"; |
|
| 64 | - } ?> |
|
| 61 | + if ($login_warning) |
|
| 62 | + { |
|
| 63 | + echo '<p class="login_warning">' . $login_warning . "</p>\n"; |
|
| 64 | + } ?> |
|
| 65 | 65 | </div> |
| 66 | 66 | <script type="text/javascript"> |
| 67 | 67 | document.getElementById('username').focus(); |
| 68 | 68 | </script> |
| 69 | 69 | <div class="org_openpsa_softwareinfo"> |
| 70 | 70 | <a href="http://www.openpsa.org/">OpenPSA <?php |
| 71 | - echo org_openpsa_core_version::get_version_both(); |
|
| 72 | - ?></a>, |
|
| 71 | + echo org_openpsa_core_version::get_version_both(); |
|
| 72 | + ?></a>, |
|
| 73 | 73 | <a href="http://www.midgard-project.org/">Midgard <?php echo mgd_version(); ?></a> |
| 74 | 74 | </div> |
| 75 | 75 | </div> |
@@ -9,8 +9,7 @@ |
||
| 9 | 9 | $message = $this->data['midcom_services_auth_access_denied_message']; |
| 10 | 10 | $title = $this->data['midcom_services_auth_access_denied_title']; |
| 11 | 11 | $login_warning = $this->data['midcom_services_auth_access_denied_login_warning']; |
| 12 | -} |
|
| 13 | -else |
|
| 12 | +} else |
|
| 14 | 13 | { |
| 15 | 14 | $login_warning = $this->data['midcom_services_auth_show_login_page_login_warning']; |
| 16 | 15 | } |
@@ -33,8 +33,7 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public function configureOptions(OptionsResolver $resolver) |
| 35 | 35 | { |
| 36 | - $resolver->setDefaults(array |
|
| 37 | - ( |
|
| 36 | + $resolver->setDefaults(array( |
|
| 38 | 37 | 'operations' => array(), |
| 39 | 38 | 'mapped' => false |
| 40 | 39 | )); |
@@ -54,8 +53,7 @@ discard block |
||
| 54 | 53 | { |
| 55 | 54 | $label = "form submit: {$operation}"; |
| 56 | 55 | } |
| 57 | - $attributes = array |
|
| 58 | - ( |
|
| 56 | + $attributes = array( |
|
| 59 | 57 | 'operation' => $operation, |
| 60 | 58 | 'label' => $l10n->get($label), |
| 61 | 59 | 'attr' => array('class' => 'submit ' . $operation) |
@@ -65,8 +65,7 @@ |
||
| 65 | 65 | //@todo Move to template? |
| 66 | 66 | $attributes['attr']['accesskey'] = 's'; |
| 67 | 67 | $attributes['attr']['class'] .= ' save_' . $key; |
| 68 | - } |
|
| 69 | - else if ($operation == controller::CANCEL) |
|
| 68 | + } else if ($operation == controller::CANCEL) |
|
| 70 | 69 | { |
| 71 | 70 | //@todo Move to template? |
| 72 | 71 | $attributes['attr']['accesskey'] = 'd'; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | { |
| 44 | 44 | parent::configureOptions($resolver); |
| 45 | 45 | |
| 46 | - $map_attr = function (Options $options, $value) |
|
| 46 | + $map_attr = function(Options $options, $value) |
|
| 47 | 47 | { |
| 48 | 48 | if ($value === null) |
| 49 | 49 | { |
@@ -55,30 +55,27 @@ discard block |
||
| 55 | 55 | return $value; |
| 56 | 56 | }; |
| 57 | 57 | |
| 58 | - $get_config = function (Options $options, $value) |
|
| 58 | + $get_config = function(Options $options, $value) |
|
| 59 | 59 | { |
| 60 | 60 | return \midcom_baseclasses_components_configuration::get('midcom.helper.datamanager2', 'config'); |
| 61 | 61 | }; |
| 62 | 62 | |
| 63 | - $resolver->setDefaults(array |
|
| 64 | - ( |
|
| 63 | + $resolver->setDefaults(array( |
|
| 65 | 64 | 'attr' => $map_attr, |
| 66 | 65 | 'config' => $get_config |
| 67 | 66 | )); |
| 68 | 67 | |
| 69 | - $resolver->setNormalizer('widget_config', function (Options $options, $value) |
|
| 68 | + $resolver->setNormalizer('widget_config', function(Options $options, $value) |
|
| 70 | 69 | { |
| 71 | - $widget_defaults = array |
|
| 72 | - ( |
|
| 70 | + $widget_defaults = array( |
|
| 73 | 71 | 'enabled' => true, |
| 74 | 72 | 'language' => 'php', |
| 75 | 73 | ); |
| 76 | 74 | return helper::resolve_options($widget_defaults, $value); |
| 77 | 75 | }); |
| 78 | - $resolver->setNormalizer('type_config', function (Options $options, $value) |
|
| 76 | + $resolver->setNormalizer('type_config', function(Options $options, $value) |
|
| 79 | 77 | { |
| 80 | - $type_defaults = array |
|
| 81 | - ( |
|
| 78 | + $type_defaults = array( |
|
| 82 | 79 | 'modes' => array('xml', 'javascript', 'css', 'clike', 'php'), |
| 83 | 80 | ); |
| 84 | 81 | return helper::resolve_options($type_defaults, $value); |
@@ -39,8 +39,7 @@ discard block |
||
| 39 | 39 | public function configureOptions(OptionsResolver $resolver) |
| 40 | 40 | { |
| 41 | 41 | parent::configureOptions($resolver); |
| 42 | - $resolver->setDefaults(array |
|
| 43 | - ( |
|
| 42 | + $resolver->setDefaults(array( |
|
| 44 | 43 | 'allow_add' => true, |
| 45 | 44 | 'allow_delete' => true, |
| 46 | 45 | 'prototype' => true, |
@@ -48,20 +47,19 @@ discard block |
||
| 48 | 47 | 'delete_empty' => true, |
| 49 | 48 | 'error_bubbling' => false |
| 50 | 49 | )); |
| 51 | - $resolver->setNormalizer('type', function (Options $options, $value) |
|
| 50 | + $resolver->setNormalizer('type', function(Options $options, $value) |
|
| 52 | 51 | { |
| 53 | 52 | return $options['dm2_type']; |
| 54 | 53 | }); |
| 55 | - $resolver->setNormalizer('type_config', function (Options $options, $value) |
|
| 54 | + $resolver->setNormalizer('type_config', function(Options $options, $value) |
|
| 56 | 55 | { |
| 57 | - $widget_defaults = array |
|
| 58 | - ( |
|
| 56 | + $widget_defaults = array( |
|
| 59 | 57 | 'sortable' => false, |
| 60 | 58 | 'max_count' => 0 |
| 61 | 59 | ); |
| 62 | 60 | return helper::resolve_options($widget_defaults, $value); |
| 63 | 61 | }); |
| 64 | - $resolver->setNormalizer('constraints', function (Options $options, $value) |
|
| 62 | + $resolver->setNormalizer('constraints', function(Options $options, $value) |
|
| 65 | 63 | { |
| 66 | 64 | $validation = array(); |
| 67 | 65 | if ($options['type_config']['max_count'] > 0) |
@@ -78,15 +76,14 @@ discard block |
||
| 78 | 76 | } |
| 79 | 77 | return $validation; |
| 80 | 78 | }); |
| 81 | - $resolver->setNormalizer('options', function (Options $options, $value) |
|
| 79 | + $resolver->setNormalizer('options', function(Options $options, $value) |
|
| 82 | 80 | { |
| 83 | - return array |
|
| 84 | - ( |
|
| 81 | + return array( |
|
| 85 | 82 | 'required' => false, //@todo no idea why this is necessary |
| 86 | 83 | 'widget_config' => $options['widget_config'] |
| 87 | 84 | ); |
| 88 | 85 | }); |
| 89 | - $resolver->setNormalizer('widget_config', function (Options $options, $value) |
|
| 86 | + $resolver->setNormalizer('widget_config', function(Options $options, $value) |
|
| 90 | 87 | { |
| 91 | 88 | if (!array_key_exists('sortable', $value)) |
| 92 | 89 | { |
@@ -24,10 +24,9 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function configureOptions(OptionsResolver $resolver) |
| 26 | 26 | { |
| 27 | - $resolver->setNormalizer('widget_config', function (Options $options, $value) |
|
| 27 | + $resolver->setNormalizer('widget_config', function(Options $options, $value) |
|
| 28 | 28 | { |
| 29 | - $widget_defaults = array |
|
| 30 | - ( |
|
| 29 | + $widget_defaults = array( |
|
| 31 | 30 | 'map_action_elements' => false, |
| 32 | 31 | 'show_title' => true, |
| 33 | 32 | 'show_description' => false, |
@@ -45,14 +45,12 @@ discard block |
||
| 45 | 45 | { |
| 46 | 46 | parent::configureOptions($resolver); |
| 47 | 47 | |
| 48 | - $resolver->setDefaults(array |
|
| 49 | - ( |
|
| 48 | + $resolver->setDefaults(array( |
|
| 50 | 49 | 'error_bubbling' => false |
| 51 | 50 | )); |
| 52 | - $resolver->setNormalizer('widget_config', function (Options $options, $value) |
|
| 51 | + $resolver->setNormalizer('widget_config', function(Options $options, $value) |
|
| 53 | 52 | { |
| 54 | - $widget_defaults = array |
|
| 55 | - ( |
|
| 53 | + $widget_defaults = array( |
|
| 56 | 54 | 'showOn' => 'both', |
| 57 | 55 | 'format' => '%Y-%m-%d %H:%M', |
| 58 | 56 | 'hide_seconds' => true, |
@@ -62,10 +60,9 @@ discard block |
||
| 62 | 60 | ); |
| 63 | 61 | return helper::resolve_options($widget_defaults, $value); |
| 64 | 62 | }); |
| 65 | - $resolver->setNormalizer('type_config', function (Options $options, $value) |
|
| 63 | + $resolver->setNormalizer('type_config', function(Options $options, $value) |
|
| 66 | 64 | { |
| 67 | - $type_defaults = array |
|
| 68 | - ( |
|
| 65 | + $type_defaults = array( |
|
| 69 | 66 | 'storage_type' => jsdate::ISO, |
| 70 | 67 | ); |
| 71 | 68 | return helper::resolve_options($type_defaults, $value); |
@@ -79,8 +76,7 @@ discard block |
||
| 79 | 76 | { |
| 80 | 77 | $builder->addModelTransformer(new jsdatetransformer($options)); |
| 81 | 78 | |
| 82 | - $date_options = array |
|
| 83 | - ( |
|
| 79 | + $date_options = array( |
|
| 84 | 80 | 'widget' => 'single_text' |
| 85 | 81 | ); |
| 86 | 82 | |
@@ -97,8 +93,7 @@ discard block |
||
| 97 | 93 | { |
| 98 | 94 | $pattern .= ':[0-5][0-9]'; |
| 99 | 95 | } |
| 100 | - $time_options = array |
|
| 101 | - ( |
|
| 96 | + $time_options = array( |
|
| 102 | 97 | 'widget' => 'single_text', |
| 103 | 98 | 'with_seconds' => !$options['widget_config']['hide_seconds'], |
| 104 | 99 | 'attr' => array('size' => 11, 'pattern' => $pattern), |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | { |
| 45 | 45 | parent::configureOptions($resolver); |
| 46 | 46 | |
| 47 | - $map_attr = function (Options $options, $value) |
|
| 47 | + $map_attr = function(Options $options, $value) |
|
| 48 | 48 | { |
| 49 | 49 | if ($value === null) |
| 50 | 50 | { |
@@ -56,21 +56,19 @@ discard block |
||
| 56 | 56 | return $value; |
| 57 | 57 | }; |
| 58 | 58 | |
| 59 | - $get_config = function (Options $options, $value) |
|
| 59 | + $get_config = function(Options $options, $value) |
|
| 60 | 60 | { |
| 61 | 61 | return \midcom_baseclasses_components_configuration::get('midcom.helper.datamanager2', 'config'); |
| 62 | 62 | }; |
| 63 | 63 | |
| 64 | - $resolver->setDefaults(array |
|
| 65 | - ( |
|
| 64 | + $resolver->setDefaults(array( |
|
| 66 | 65 | 'attr' => $map_attr, |
| 67 | 66 | 'config' => $get_config |
| 68 | 67 | )); |
| 69 | 68 | |
| 70 | - $resolver->setNormalizer('widget_config', function (Options $options, $value) |
|
| 69 | + $resolver->setNormalizer('widget_config', function(Options $options, $value) |
|
| 71 | 70 | { |
| 72 | - $widget_defaults = array |
|
| 73 | - ( |
|
| 71 | + $widget_defaults = array( |
|
| 74 | 72 | 'mode' => 'exact', |
| 75 | 73 | 'theme' => $options['config']->get('tinymce_default_theme'), |
| 76 | 74 | 'local_config' => '', |
@@ -79,10 +77,9 @@ discard block |
||
| 79 | 77 | ); |
| 80 | 78 | return helper::resolve_options($widget_defaults, $value); |
| 81 | 79 | }); |
| 82 | - $resolver->setNormalizer('type_config', function (Options $options, $value) |
|
| 80 | + $resolver->setNormalizer('type_config', function(Options $options, $value) |
|
| 83 | 81 | { |
| 84 | - $type_defaults = array |
|
| 85 | - ( |
|
| 82 | + $type_defaults = array( |
|
| 86 | 83 | |
| 87 | 84 | ); |
| 88 | 85 | return helper::resolve_options($type_defaults, $value); |
@@ -109,14 +106,13 @@ discard block |
||
| 109 | 106 | |
| 110 | 107 | $schema_name = 'default'; |
| 111 | 108 | $config = $this->get_configuration($options); |
| 112 | - $tiny_options = array |
|
| 113 | - ( |
|
| 109 | + $tiny_options = array( |
|
| 114 | 110 | 'config' => $config, |
| 115 | 111 | 'mode' => $options['widget_config']['mode'], |
| 116 | 112 | 'elements' => $view->vars['id'], |
| 117 | 113 | 'local_config' => $options['widget_config']['local_config'], |
| 118 | 114 | 'language' => midcom::get()->i18n->get_current_language(), |
| 119 | - 'img' => ($options['widget_config']['use_imagepopup'])? $this->_get_image_popup($schema_name, $form) : '', |
|
| 115 | + 'img' => ($options['widget_config']['use_imagepopup']) ? $this->_get_image_popup($schema_name, $form) : '', |
|
| 120 | 116 | ); |
| 121 | 117 | $snippet = $this->_get_snippet($tiny_options); |
| 122 | 118 | $view->vars['tinymce_snippet'] = $snippet; |
@@ -33,26 +33,25 @@ |
||
| 33 | 33 | public function configureOptions(OptionsResolver $resolver) |
| 34 | 34 | { |
| 35 | 35 | parent::configureOptions($resolver); |
| 36 | - $map_options = function (Options $options) |
|
| 36 | + $map_options = function(Options $options) |
|
| 37 | 37 | { |
| 38 | 38 | $return_options = array(); |
| 39 | 39 | if (isset($options['type_config']['options'])) |
| 40 | 40 | { |
| 41 | - foreach($options['type_config']['options'] as $key => $value) |
|
| 41 | + foreach ($options['type_config']['options'] as $key => $value) |
|
| 42 | 42 | { |
| 43 | 43 | //symfony expects only strings |
| 44 | - $return_options[$value] = (string)$key; |
|
| 44 | + $return_options[$value] = (string) $key; |
|
| 45 | 45 | } |
| 46 | 46 | return $return_options; |
| 47 | 47 | } |
| 48 | 48 | }; |
| 49 | - $map_multiple = function (Options $options) |
|
| 49 | + $map_multiple = function(Options $options) |
|
| 50 | 50 | { |
| 51 | 51 | return !empty($options['type_config']['allow_multiple']); |
| 52 | 52 | }; |
| 53 | 53 | |
| 54 | - $resolver->setDefaults(array |
|
| 55 | - ( |
|
| 54 | + $resolver->setDefaults(array( |
|
| 56 | 55 | 'choices' => $map_options, |
| 57 | 56 | 'choices_as_values' => true, |
| 58 | 57 | 'expanded' => true, |