Skip to content
Snippets Groups Projects

Issue #3506184: Added valdiation for Custom button text for comments.

1 file
+ 8
2
Compare changes
  • Side-by-side
  • Inline
+ 8
2
@@ -47,12 +47,18 @@ function buttons_config_form_alter(&$form, FormStateInterface $form_state, $form
$enabled = $values['enabled'];
$ct_name = $values['form_id'];
$form_isSave = $values['form_type'];
if ($form_isSave) {
if ($entity_id[0] == 'comment') {
$form_name = $ct_name . "_form";
}
else {
$form_name = $ct_name . "_edit_form";
if ($form_isSave) {
$form_name = $ct_name . "_form";
}
else {
$form_name = $ct_name . "_edit_form";
}
}
if ($enabled == 1 && $form_name == $form_id) {
$form['actions']['submit']['#value'] = t($values['custom_text']);
}
Loading