See https://www.drupal.org/project/drupal/issues/3089751 & https://www.drupal.org/forum/support/theme-development/2018-12-08/prevent-form-actions-from-appearing-in-a-modal-dialog
In mytheme.libraries.yml
dialog.ajax:
js:
<?php | |
namespace Drupal\mobilis\Plugin\Field\FieldFormatter; | |
use Drupal\Core\Entity\EntityDisplayRepositoryInterface; | |
use Drupal\Core\Entity\EntityTypeManagerInterface; | |
use Drupal\Core\Form\FormStateInterface; | |
use Drupal\Core\Field\FieldDefinitionInterface; | |
use Drupal\Core\Field\FieldItemListInterface; | |
use Drupal\Core\Field\Plugin\Field\FieldFormatter\EntityReferenceFormatterBase; |
<?php | |
namespace Drupal\opitools\Commands; | |
use Drush\Commands\DrushCommands; | |
use Drupal\Core\Language\LanguageInterface; | |
/** | |
* A Drush commandfile. | |
* |
#!/bin/bash | |
function greenecho { | |
echo "" && echo -e "\e[30;48;5;82m ✔ $1 \e[0m" | |
} | |
function orangeecho { | |
echo "" && echo -e "\e[30;48;5;208m ⚠ $1 \e[0m" | |
} | |
#!/bin/bash | |
function greenecho { | |
echo "" && echo -e "\e[30;48;5;82m ✔ $1 \e[0m" | |
} | |
function orangeecho { | |
echo "" && echo -e "\e[30;48;5;208m ⚠ $1 \e[0m" | |
} | |
#!/bin/bash | |
function greenecho { | |
echo "" && echo -e "\e[30;48;5;82m ✔ $1 \e[0m" | |
} | |
function orangeecho { | |
echo "" && echo -e "\e[30;48;5;208m ⚠ $1 \e[0m" | |
} | |
#!/bin/bash | |
function greenecho { | |
echo "" && echo -e "\e[30;48;5;82m ✔ $1 \e[0m" | |
} | |
function orangeecho { | |
echo "" && echo -e "\e[30;48;5;208m ⚠ $1 \e[0m" | |
} | |
#!/bin/bash | |
function greenecho { | |
echo "" && echo -e "\e[30;48;5;82m ✔ $1 \e[0m" | |
} | |
function orangeecho { | |
echo "" && echo -e "\e[30;48;5;208m ⚠ $1 \e[0m" | |
} | |
# Get document root path |
<?php | |
/** | |
* Implements hook_entity_form_display_alter(). | |
*/ | |
function MY_MODULE_entity_form_display_alter(&$form_display, array $context) { | |
if ($context['entity_type'] == 'node' && $context['bundle'] == 'MY_BUNDLE') { | |
$current_user = \Drupal::currentUser(); | |
if ($current_user->hasPermission('CUSTOM PERMISSION')) { | |
$storage = \Drupal::entityManager()->getStorage('entity_form_display'); |
On a screen we want to display this sentence: Limit to X messages per Y, where X and Y are dropdown list of options.
On a screen reader we want 2 distinct fields with corresponding label:
Note: Label are hidden with the .element-invisible
class, using the clip
method.