Issue #2983648 by ifrik, andypost, Gábor Hojtsy, Artusamak: Reword the Update style button to Save

8.6.x
Gábor Hojtsy 2018-07-11 11:00:39 +02:00
parent 61cbaba042
commit b8c4f6ecf1
3 changed files with 3 additions and 13 deletions

View File

@ -257,16 +257,6 @@ class ImageStyleEditForm extends ImageStyleFormBase {
$this->messenger()->addStatus($this->t('Changes to the style have been saved.')); $this->messenger()->addStatus($this->t('Changes to the style have been saved.'));
} }
/**
* {@inheritdoc}
*/
public function actions(array $form, FormStateInterface $form_state) {
$actions = parent::actions($form, $form_state);
$actions['submit']['#value'] = $this->t('Update style');
return $actions;
}
/** /**
* Updates image effect weights. * Updates image effect weights.
* *

View File

@ -199,7 +199,7 @@ class ImageAdminStylesTest extends ImageFieldTestBase {
$image_path = $this->createSampleImage($style); $image_path = $this->createSampleImage($style);
$this->assertEqual($this->getImageCount($style), 1, format_string('Image style %style image %file successfully generated.', ['%style' => $style->label(), '%file' => $image_path])); $this->assertEqual($this->getImageCount($style), 1, format_string('Image style %style image %file successfully generated.', ['%style' => $style->label(), '%file' => $image_path]));
$this->drupalPostForm($style_path, $edit, t('Update style')); $this->drupalPostForm($style_path, $edit, t('Save'));
// Note that after changing the style name, the style path is changed. // Note that after changing the style name, the style path is changed.
$style_path = 'admin/config/media/image-styles/manage/' . $style_name; $style_path = 'admin/config/media/image-styles/manage/' . $style_name;
@ -337,7 +337,7 @@ class ImageAdminStylesTest extends ImageFieldTestBase {
'name' => $new_style_name, 'name' => $new_style_name,
'label' => $new_style_label, 'label' => $new_style_label,
]; ];
$this->drupalPostForm($style_path . $style_name, $edit, t('Update style')); $this->drupalPostForm($style_path . $style_name, $edit, t('Save'));
$this->assertText(t('Changes to the style have been saved.'), format_string('Style %name was renamed to %new_name.', ['%name' => $style_name, '%new_name' => $new_style_name])); $this->assertText(t('Changes to the style have been saved.'), format_string('Style %name was renamed to %new_name.', ['%name' => $style_name, '%new_name' => $new_style_name]));
$this->drupalGet('node/' . $nid); $this->drupalGet('node/' . $nid);

View File

@ -103,7 +103,7 @@ class ImageStyleFlushTest extends ImageFieldTestBase {
} }
$this->drupalPostForm($style_path . '/effects/' . $uuids['image_scale'] . '/delete', [], t('Delete')); $this->drupalPostForm($style_path . '/effects/' . $uuids['image_scale'] . '/delete', [], t('Delete'));
$this->assertResponse(200); $this->assertResponse(200);
$this->drupalPostForm($style_path, [], t('Update style')); $this->drupalPostForm($style_path, [], t('Save'));
$this->assertResponse(200); $this->assertResponse(200);
// Post flush, expected 1 image in the 'public' wrapper (sample.png). // Post flush, expected 1 image in the 'public' wrapper (sample.png).