Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralph Bryan Brioso committed Jul 8, 2020
2 parents 7fdbdd0 + c02d425 commit 3839b60
Show file tree
Hide file tree
Showing 10 changed files with 661 additions and 4 deletions.
5 changes: 4 additions & 1 deletion config/app.interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
return array(
'plugins' => array(
'melisfront' => array(
'datas' => [
'gdpr_auto_anonymized_time_format' => 'd'
],
'resources' => array(
'js' => array(),
'css' => array(),
)
)
)
);
);
2 changes: 2 additions & 0 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@
'MelisFrontBlockSectionPlugin' => 'MelisFront\Controller\Plugin\MelisFrontBlockSectionPlugin',
'MiniTemplatePlugin' => 'MelisFront\Controller\Plugin\MiniTemplatePlugin',
'MelisFrontGdprBannerPlugin' => 'MelisFront\Controller\Plugin\MelisFrontGdprBannerPlugin',
'MelisFrontGdprRevalidationPlugin' => 'MelisFront\Controller\Plugin\MelisFrontGdprRevalidationPlugin',
)
),
'view_helpers' => array(
Expand Down Expand Up @@ -250,6 +251,7 @@
'MelisFront/block-section-container' => __DIR__ . '/../view/melis-front/plugins/block-section-container.phtml',
'MelisFront/gdpr-banner' => __DIR__ . '/../view/melis-front/plugins/gdpr-banner.phtml',
'MelisFront/modal-template-form' => __DIR__ . '/../view/melis-front/plugins/modal-template-form.phtml',
'MelisFront/gdpr-revalidation' => __DIR__ . '/../view/melis-front/plugins/gdpr-revalidation.phtml',

//Mini Template plugins
'MiniTemplate/Content' => __DIR__ . '/../view/melis-front/plugins/mini-template-default.phtml',
Expand Down
186 changes: 186 additions & 0 deletions config/plugins/MelisFrontGdprRevalidationPlugin.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
<?php

return [
'plugins' => [
'melisfront' => [
'plugins' => [
'MelisFrontGdprRevalidationPlugin' => [
'front' => [
'pageId' => null,
'template_path' => ['MelisFront/gdpr-revalidation'],
'id' => 'MelisFrontGdprRevalidation',
'site_id' => null,
'module' => null,
// List the files to be automatically included for the correct display of the plugin
// To overide a key, just add it again in your site module
// To delete an entry, use the keyword "disable" instead of the file path for the same key
'files' => [
'css' => [
'/MelisFront/plugins/css/plugin.gdprRevalidation.css',
],
// 'js' => [
// '/MelisFront/plugins/js/plugin.melisGdprBanner.init.js',
// ],
],
'forms' => [
'gdpr_revalidation_form' => [
'attributes' => [
'name' => 'gdpr_revalidation_form',
'id' => 'gdpr_revalidation_form',
'method' => 'POST',
'action' => '',
],
'hydrator' => 'Zend\Stdlib\Hydrator\ArraySerializable',
'elements' => [
[
'spec' => [
'name' => 'revalidate_account',
'type' => 'checkbox',
'options' => [
'label' => 'tr_melis_front_gdpr_revalidation_label_checkbox'
],
'attributes' => [
'class' => 'form-control text-center',
'style' => "cursor:pointer;width:50px;height:50px;margin:0 auto;"
]
]
]
]
]
]
],
'melis' => [
'subcategory' => [
'id' => 'BASICS',
'title' => 'tr_MelisFrontSubcategoryPageBasics_Title'
],
'name' => 'tr_melis_front_gdpr_revalidation_name',
'description' => 'tr_melis_front_gdpr_revalidation_desc',
// 'files' => [
'css' => [
'/MelisFront/plugins/css/plugin.gdprRevalidation.css',
],
// 'js' => [
// '/MelisFront/plugins/js/plugin.melisGdprBanner.init.js',
// ],
// ],
'js_initialization' => [],
'modal_form' => [
'melis_cms_gdpr_revalidation_plugin_settings_form' => [
'tab_title' => 'Properties',
'tab_icon' => 'fa fa-cog',
'tab_form_layout' => 'MelisFront/modal-template-form',
'attributes' => [
'name' => 'melis_cms_gdpr_revalidation_plugin_settings_form',
'id' => 'id_melis_cms_gdpr_revalidation_plugin_settings_form',
'method' => 'POST',
'action' => '',
],
'hydrator' => 'Zend\Stdlib\Hydrator\ArraySerializable',
'elements' => [
[
'spec' => [
'name' => 'template_path',
'type' => 'MelisEnginePluginTemplateSelect',
'options' => [
'label' => 'tr_melis_Plugins_Template',
'tooltip' => 'tr_melis_Plugins_Template tooltip',
'empty_option' => 'tr_melis_Plugins_Choose',
'disable_inarray_validator' => true,
],
'attributes' => [
'id' => 'id_page_tpl_id',
'class' => 'form-control',
'required' => 'required',
],
],
],
[
'spec' => [
'name' => 'site_id',
'type' => 'MelisCmsPluginSiteSelect',
'options' => [
'label' => 'tr_melis_engine_sites',
'tooltip' => 'tr_melis_engine_sites_select',
'empty_option' => 'tr_melis_Plugins_Choose',
'disable_inarray_validator' => true,
],
'attributes' => [
'id' => 'id_page_tpl_id',
'class' => 'form-control',
'required' => 'required',
],
],
],
[
'spec' => [
'name' => 'module',
'type' => 'MelisCoreGdprModuleSelect',
'options' => [
'label' => 'Associated Module',
'tooltip' => 'The module associated to this plugin',
'empty_option' => 'tr_melis_Plugins_Choose',
'disable_inarray_validator' => true,
],
'attributes' => [
'class' => 'form-control',
'required' => 'required',
],
],
],
],
'input_filter' => [
'template_path' => [
'name' => 'template_path',
'required' => true,
'validators' => [
[
'name' => 'NotEmpty',
'options' => [
'messages' => [
\Zend\Validator\NotEmpty::IS_EMPTY => 'tr_front_template_path_empty',
],
],
],
],
'filters' => [],
],
'site_id' => [
'name' => 'site_id',
'required' => true,
// 'validators' => [
// [
// 'name' => 'NotEmpty',
// 'options' => [
// 'messages' => [
// \Zend\Validator\NotEmpty::IS_EMPTY => 'tr_front_template_path_empty',
// ],
// ],
// ],
// ],
// 'filters' => [],
],
'module' => [
'name' => 'module',
'required' => true,
// 'validators' => [
// [
// 'name' => 'NotEmpty',
// 'options' => [
// 'messages' => [
// \Zend\Validator\NotEmpty::IS_EMPTY => 'tr_front_template_path_empty',
// ],
// ],
// ],
// ],
// 'filters' => [],
],
],
],
],
],
],
],
],
],
];
13 changes: 12 additions & 1 deletion language/en_EN.interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,15 @@

//DragDrop Zone
'tr_front_drag_drop_zone_label' => 'DRAG PLUGIN HERE!',
);

// GDPR Revalidation plugin
'tr_melis_front_gdpr_revalidation_name' => 'GDPR Revalidation plugin',
'tr_melis_front_gdpr_revalidation_desc' => 'This plugin allows the user to validate the retention of its data on the site',
'tr_melis_front_gdpr_revalidation_info_text' => 'Your subscription to our services must be revalidated according to the GDPR requirements as you have not been active for a long time. Failure to revalidate will automatically activate the anonymization of your account.',
'tr_melis_front_gdpr_revalidation_label_checkbox' => 'I want to revalidate my account',
'tr_melis_front_gdpr_revalidation_btn_confirm' => 'Confirm',
'tr_melis_front_gdpr_revalidation_info_text_warning' => 'This link doesn’t seem to work or is not recognized.',
'tr_melis_front_gdpr_revalidation_info_success_heading' => 'Success',
'tr_melis_front_gdpr_revalidation_info_success_sub_heading' => 'Your account is now up to date!',
'tr_melis_front_gdpr_revalidation_not_checked' => 'Please check the box to validate'
);
13 changes: 12 additions & 1 deletion language/fr_FR.interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,15 @@

//DragDrop Zone
'tr_front_drag_drop_zone_label' => 'Déposez le plugin ici',
);

// GDPR Revalidation plugin
'tr_melis_front_gdpr_revalidation_name' => 'GDPR Revalidation plugin',
'tr_melis_front_gdpr_revalidation_desc' => 'Ce plugin permet à l\'utilisateur de valider la rétention de ses données sur le site',
'tr_melis_front_gdpr_revalidation_info_text' => 'Votre abonnement à nos services doit être revalidé en accord avec les exigences du RGPD car vous n\'avez pas été actif pendant longtemps. Le fait de ne pas revalider activera automatiquement l\'anonymisation de votre compte.',
'tr_melis_front_gdpr_revalidation_btn_confirm' => 'Confirmer',
'tr_melis_front_gdpr_revalidation_info_text_warning' => 'Ce lien n\'a pas l\'air de fonctionner ou n\'est pas reconnu.',
'tr_melis_front_gdpr_revalidation_info_success_heading' => 'Succès',
'tr_melis_front_gdpr_revalidation_info_success_sub_heading' => 'Votre compte a été validé',
'tr_melis_front_gdpr_revalidation_label_checkbox' => 'Je souhaite revalider mon compte',
'tr_melis_front_gdpr_revalidation_not_checked' => 'Veuillez cocher la case pour valider',
);
10 changes: 10 additions & 0 deletions public/plugins/css/plugin.gdprRevalidation.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.revalidation-plugin {
max-width: 62%;
margin:20px auto;
}
.revalidation-info {
max-width: 515px;
margin:0 auto 20px;
font-size:18px;
line-height: 33px;
}
Loading

0 comments on commit 3839b60

Please sign in to comment.