Skip to content

Commit

Permalink
Merge pull request #50 from OS2Forms/f/S2FRMS-18
Browse files Browse the repository at this point in the history
3.7.0 deploy
  • Loading branch information
stankut authored Jun 26, 2023
2 parents d0e4c9e + 2902d0f commit fa1069a
Show file tree
Hide file tree
Showing 19 changed files with 52 additions and 34 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ before starting to add changes. Use example [placed in the end of the page](#exa

## [Unreleased]

## [3.7.0] 2023-06-22

- [S2FRMS-18] - Fixing PDF styles

## [3.6.0] 2023-06-07

- [OSF-25] added modules/os2forms_forloeb
Expand Down
6 changes: 3 additions & 3 deletions modules/os2forms_attachment/os2forms_attachment.module
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function _os2forms_attachment_print_form_add_template_override(array &$element,
'#options' => $header_options,
'#description' => t('Select default header that will be used on all forms (use standard for no override)'),
'#empty_option' => t('Use standard'),
'#default_value' => $template_settings['os2forms_header'] ?? '',
'#default_value' => $template_settings['os2form_header'] ?? '',
'#weight' => -1,
];

Expand All @@ -208,7 +208,7 @@ function _os2forms_attachment_print_form_add_template_override(array &$element,
'#options' => $colophon_options,
'#description' => t('Select default colophon that will be used on all forms (use standard for no override)'),
'#empty_option' => t('Use standard'),
'#default_value' => $template_settings['os2forms_colophon'] ?? '',
'#default_value' => $template_settings['os2form_colophon'] ?? '',
'#weight' => -1,
];

Expand All @@ -218,7 +218,7 @@ function _os2forms_attachment_print_form_add_template_override(array &$element,
'#options' => $footer_options,
'#description' => t('Select default footer that will be used on all forms (use standard for no override)'),
'#empty_option' => t('Use standard'),
'#default_value' => $template_settings['os2forms_footer'] ?? '',
'#default_value' => $template_settings['os2form_footer'] ?? '',
'#weight' => 0,
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Drupal\os2forms_attachment\Form;

use Drupal\Core\Entity\EntityConfirmFormBase;
use Drupal\Core\Url;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;

/**
* Class AttachmentComponentDeleteForm.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Session\AccountInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\webform\WebformTokenManagerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
* Form handler for the Attachment component add and edit forms.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ protected function prepareRenderer(array $entities, PrintEngineInterface $print_
'#attached' => [],
];

$print_engine->addPage($renderer->generateHtml($entities, $render, $use_default_css, TRUE));
// Adding hardcoded negative margin to avoid margins in <fieldset> <legend>
// structure. That margin is automatically added in PDF and PDF only.
$generatedHtml = (string) $renderer->generateHtml($entities, $render, $use_default_css, TRUE);
$generatedHtml .= "<style>fieldset legend {margin-left: -12px;}</style>";

$print_engine->addPage($generatedHtml);

return $renderer;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@
.table {
width: 100%;
}
legend, summary, .details-wrapper, fieldset {
padding: 0;
}
fieldset {
margin: 0;
border: 0;
}
</style>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion modules/os2forms_consent/os2forms_consent.module
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* OS2Forms Consent functionality module.
*/

use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\Plugin\MigrateSourceInterface;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\Row;
use Symfony\Component\Yaml\Yaml;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Drupal\os2forms_consent\Element;

use Drupal\webform\WebformSubmissionInterface;
use Drupal\os2forms\Element\WebformAttachmentXml;
use Drupal\os2forms_consent\Plugin\WebformElement\WebformAttachmentConsentXml as WebformElementAttachmentConsentXml;
use Drupal\webform\WebformSubmissionInterface;

/**
* Provides a 'webform_attachment_os2forms_consent_xml' element.
Expand Down
8 changes: 4 additions & 4 deletions modules/os2forms_forloeb/os2forms_forloeb.module
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
* Install, update and uninstall functions for the os2forms_forloeb.
*/

use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\webform\WebformInterface;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\BubbleableMetadata;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Url;
use Drupal\maestro\Engine\MaestroEngine;
use Drupal\os2forms_forloeb\Plugin\EngineTasks\MaestroWebformInheritTask;
use Drupal\webform\Entity\WebformSubmission;
use Drupal\user\Entity\User;
use Drupal\webform\Entity\WebformSubmission;
use Drupal\webform\WebformInterface;
use Drupal\webform\WebformSubmissionInterface;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\StringTranslation\PluralTranslatableMarkup;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\Url;
use Drupal\maestro\Engine\MaestroEngine;
use Drupal\maestro\Utility\TaskHandler;
use Drupal\os2forms_forloeb\ForloebTaskConsole;
use Drupal\Core\StringTranslation\PluralTranslatableMarkup;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\RequestStack;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace Drupal\os2forms_forloeb\Plugin\EngineTasks;

use Drupal\node\Entity\Node;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Form\FormState;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\PluginBase;
use Drupal\maestro\MaestroTaskTrait;
use Drupal\Core\Routing\TrustedRedirectResponse;
use Drupal\maestro\Engine\MaestroEngine;
use Drupal\maestro\Form\MaestroExecuteInteractive;
use Drupal\maestro\MaestroEngineTaskInterface;
use Drupal\maestro\Engine\MaestroEngine;
use Drupal\Core\Routing\TrustedRedirectResponse;
use Drupal\maestro\MaestroTaskTrait;
use Drupal\node\Entity\Node;

/**
* Maestro Select a Content Item.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace Drupal\os2forms_forloeb\Plugin\EngineTasks;

use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;
use Drupal\maestro\Engine\MaestroEngine;
use Drupal\maestro\Form\MaestroExecuteInteractive;
use Drupal\maestro_webform\Plugin\EngineTasks\MaestroWebformTask;
use Drupal\webform\Entity\WebformSubmission;
use Drupal\webform\WebformSubmissionForm;
use Drupal\maestro_webform\Plugin\EngineTasks\MaestroWebformTask;
use Drupal\maestro\Form\MaestroExecuteInteractive;
use Drupal\maestro\Engine\MaestroEngine;
use Drupal\Core\Form\FormStateInterface;
use Drupal\webform\WebformSubmissionInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Drupal\os2forms_forloeb\Plugin\EngineTasks;

use Drupal\maestro\Engine\MaestroEngine;
use Drupal\maestro\Form\MaestroExecuteInteractive;
use Drupal\maestro_webform\Plugin\EngineTasks\MaestroWebformTask;
use Drupal\webform\Entity\WebformSubmission;
use Drupal\webform\WebformSubmissionForm;
use Drupal\maestro_webform\Plugin\EngineTasks\MaestroWebformTask;
use Drupal\maestro\Form\MaestroExecuteInteractive;
use Drupal\maestro\Engine\MaestroEngine;

/**
* Maestro Webform Task Plugin for Multiple Submissions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\Url;
use Drupal\os2web_nemlogin\Service\AuthProviderService;
use Drupal\os2forms_nemid\Form\SettingsForm;
use Drupal\os2web_nemlogin\Service\AuthProviderService;
use Drupal\webform\Entity\Webform;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\KernelEvents;

/**
* Event subscriber subscribing to KernelEvents::REQUEST.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

use Drupal\Core\Config\Entity\ConfigEntityInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\node\NodeInterface;
use Drupal\views\Plugin\views\query\QueryPluginBase;
use Drupal\views\ViewExecutable;
use Drupal\webform\WebformInterface;
use Drupal\Core\Session\AccountInterface;

/**
* Implements hook_module_implements_alter().
Expand Down
2 changes: 1 addition & 1 deletion modules/os2forms_sbsys/os2forms_sbsys.module
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* OS2Forms SBSYS functionality module.
*/

use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\Plugin\MigrateSourceInterface;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\Row;
use Symfony\Component\Yaml\Yaml;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Drupal\os2forms_sbsys\Element;

use Drupal\webform\WebformSubmissionInterface;
use Drupal\os2forms\Element\WebformAttachmentXml;
use Drupal\os2forms_sbsys\Plugin\WebformElement\WebformAttachmentSbsysXml as WebformElementAttachmentSbsysXml;
use Drupal\webform\WebformSubmissionInterface;

/**
* Provides a 'webform_attachment_os2forms_sbsys_xml' element.
Expand Down
4 changes: 2 additions & 2 deletions os2forms.module
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* OS2Forms functionality module.
*/

use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\migrate\Plugin\MigrateSourceInterface;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\Row;
use Drupal\Core\Form\FormStateInterface;

/**
* Implements hook_entity_type_build().
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/WebformHandler/SaveToFileWebformHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Drupal\Component\Serialization\Json;
use Drupal\Core\File\Exception\FileWriteException;
use Drupal\Core\File\FileSystemInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Routing\TrustedRedirectResponse;
use Drupal\Core\Serialization\Yaml;
use Drupal\Core\Form\FormStateInterface;
use Drupal\file\Entity\File;
use Drupal\webform\Element\WebformMessage;
use Drupal\webform\Plugin\WebformElement\BooleanBase;
Expand Down

0 comments on commit fa1069a

Please sign in to comment.