Skip to content

Commit

Permalink
Merge branch '1138-submit-captions' into 'master'
Browse files Browse the repository at this point in the history
Use HTML content of submit button instead of caption

See merge request remp/remp!669
  • Loading branch information
rootpd committed May 27, 2022
2 parents d14595b + 21940ae commit 62793f9
Show file tree
Hide file tree
Showing 20 changed files with 33 additions and 32 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Fixed deprecated warning because of using `Latte#addFilter()` method. remp/remp#1135
- Fixed the filter loading issue. remp/remp#1135
- Fixed Latte deprecation issues introduced in the latest version of the templating engine. remp/remp#1136
- Removed captions from the submit buttons in favor of HTML content with icons. remp/remp#1138

## [0.32.2] - 2022-05-11

Expand Down
4 changes: 2 additions & 2 deletions Mailer/app/Forms/ArticleUrlParserTemplateFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ public function create()
$form->setDefaults($defaults);

if ($this->permissionManager->isAllowed($this->user, 'batch', 'start')) {
$withJobs = $form->addSubmit('generate_emails_jobs', 'system.save');
$withJobs = $form->addSubmit('generate_emails_jobs');
$withJobs->getControlPrototype()
->setName('button')
->setHtml('Generate newsletter batch and start sending');
}

$withJobsCreated = $form->addSubmit('generate_emails_jobs_created', 'system.save');
$withJobsCreated = $form->addSubmit('generate_emails_jobs_created');
$withJobsCreated->getControlPrototype()
->setName('button')
->setHtml('Generate newsletter batch');
Expand Down
4 changes: 2 additions & 2 deletions Mailer/app/Forms/DennikeTemplateFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ public function create()
$form->setDefaults($defaults);

if ($this->permissionManager->isAllowed($this->user, 'batch', 'start')) {
$withJobs = $form->addSubmit('generate_emails_jobs', 'system.save');
$withJobs = $form->addSubmit('generate_emails_jobs');
$withJobs->getControlPrototype()
->setName('button')
->setHtml('Generate newsletter batch and start sending');
}

$withJobsCreated = $form->addSubmit('generate_emails_jobs_created', 'system.save');
$withJobsCreated = $form->addSubmit('generate_emails_jobs_created');
$withJobsCreated->getControlPrototype()
->setName('button')
->setHtml('Generate newsletter batch');
Expand Down
4 changes: 2 additions & 2 deletions Mailer/app/Forms/MMSTemplateFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ public function create(): Form
$form->setDefaults($defaults);

if ($this->permissionManager->isAllowed($this->user, 'batch', 'start')) {
$withJobs = $form->addSubmit('generate_emails_jobs', 'system.save');
$withJobs = $form->addSubmit('generate_emails_jobs');
$withJobs->getControlPrototype()
->setName('button')
->setHtml('Generate newsletter batch and start sending');
}

$withJobsCreated = $form->addSubmit('generate_emails_jobs_created', 'system.save');
$withJobsCreated = $form->addSubmit('generate_emails_jobs_created');
$withJobsCreated->getControlPrototype()
->setName('button')
->setHtml('Generate newsletter batch');
Expand Down
4 changes: 2 additions & 2 deletions Mailer/app/Forms/MediaBriefingTemplateFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ public function create(): Form
$form->setDefaults($defaults);

if ($this->permissionManager->isAllowed($this->user, 'batch', 'start')) {
$withJobs = $form->addSubmit('generate_emails_jobs', 'system.save');
$withJobs = $form->addSubmit('generate_emails_jobs');
$withJobs->getControlPrototype()
->setName('button')
->setHtml('Generate newsletter batch and start sending');
}

$withJobsCreated = $form->addSubmit('generate_emails_jobs_created', 'system.save');
$withJobsCreated = $form->addSubmit('generate_emails_jobs_created');
$withJobsCreated->getControlPrototype()
->setName('button')
->setHtml('Generate newsletter batch');
Expand Down
4 changes: 2 additions & 2 deletions Mailer/app/Forms/NewsfilterTemplateFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,13 @@ public function create()
$form->setDefaults($defaults);

if ($this->permissionManager->isAllowed($this->user, 'batch', 'start')) {
$withJobs = $form->addSubmit('generate_emails_jobs', 'system.save');
$withJobs = $form->addSubmit('generate_emails_jobs');
$withJobs->getControlPrototype()
->setName('button')
->setHtml('Generate newsletter batch and start sending');
}

$withJobsCreated = $form->addSubmit('generate_emails_jobs_created', 'system.save');
$withJobsCreated = $form->addSubmit('generate_emails_jobs_created');
$withJobsCreated->getControlPrototype()
->setName('button')
->setHtml('Generate newsletter batch');
Expand Down
4 changes: 2 additions & 2 deletions Mailer/app/Forms/NovydenikNewsfilterTemplateFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@ public function create(): Form
$form->setDefaults($defaults);

if ($this->permissionManager->isAllowed($this->user, 'batch', 'start')) {
$withJobs = $form->addSubmit('generate_emails_jobs', 'system.save');
$withJobs = $form->addSubmit('generate_emails_jobs');
$withJobs->getControlPrototype()
->setName('button')
->setHtml('Generate newsletter batch and start sending');
}

$withJobsCreated = $form->addSubmit('generate_emails_jobs_created', 'system.save');
$withJobsCreated = $form->addSubmit('generate_emails_jobs_created');
$withJobsCreated->getControlPrototype()
->setName('button')
->setHtml('Generate newsletter batch');
Expand Down
4 changes: 2 additions & 2 deletions Mailer/app/Forms/TldrTemplateFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ public function create(): Form
$form->setDefaults($defaults);

if ($this->permissionManager->isAllowed($this->user, 'batch', 'start')) {
$withJobs = $form->addSubmit('generate_emails_jobs', 'system.save');
$withJobs = $form->addSubmit('generate_emails_jobs');
$withJobs->getControlPrototype()
->setName('button')
->setHtml('Generate newsletter batch and start sending');
}

$withJobsCreated = $form->addSubmit('generate_emails_jobs_created', 'system.save');
$withJobsCreated = $form->addSubmit('generate_emails_jobs_created');
$withJobsCreated->getControlPrototype()
->setName('button')
->setHtml('Generate newsletter batch');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function create(): Form
}
}

$form->addSubmit('save', 'Save')
$form->addSubmit('save')
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-mail-send"></i> Save');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ public function create(ActiveRow $batch): Form

$form->addHidden('id', $batch->id);

$form->addSubmit(self::FORM_ACTION_SAVE, self::FORM_ACTION_SAVE)
$form->addSubmit(self::FORM_ACTION_SAVE)
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-check"></i> Save');

$form->addSubmit(self::FORM_ACTION_SAVE_CLOSE, self::FORM_ACTION_SAVE_CLOSE)
$form->addSubmit(self::FORM_ACTION_SAVE_CLOSE)
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-mail-send"></i> Save and close');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function create(int $jobId): Form
->setHtmlAttribute('data-live-search-normalize', 'true')
->setDefaultValue($job->segment_provider . '::' . $job->segment_code);

$form->addSubmit('save', 'Save')
$form->addSubmit('save')
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-mail-send"></i> Save');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ public function create(?int $id = null): Form

$form->setDefaults($defaults);

$form->addSubmit(self::FORM_ACTION_SAVE, self::FORM_ACTION_SAVE)
$form->addSubmit(self::FORM_ACTION_SAVE)
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-check"></i> Save');

$form->addSubmit(self::FORM_ACTION_SAVE_CLOSE, self::FORM_ACTION_SAVE_CLOSE)
$form->addSubmit(self::FORM_ACTION_SAVE_CLOSE)
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-mail-send"></i> Save and close');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public function create(?int $id = null): Form

$form->setDefaults($defaults);

$form->addSubmit('save', 'Save')
$form->addSubmit('save')
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-mail-send"></i> Save');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ public function create(?int $jobId)

$form->addHidden('job_id', $jobId);

$form->addSubmit('save', 'Save')
$form->addSubmit('save')
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-mail-send"></i> Save');

if ($this->permissionManager->isAllowed($this->user, 'batch', 'start')) {
$form->addSubmit(self::FORM_ACTION_SAVE_START, 'Save and start sending')
$form->addSubmit(self::FORM_ACTION_SAVE_START)
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-mail-send"></i> Save and start');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function create($batchId)
$form->addSelect('template_id', 'Email', $templateList);
$form->addHidden('batch_id', $batchId);

$form->addSubmit('save', 'Save')
$form->addSubmit('save')
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-mail-send"></i> Save');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ public function create(?int $id = null): Form

$form->setDefaults($defaults);

$form->addSubmit(self::FORM_ACTION_SAVE, self::FORM_ACTION_SAVE)
$form->addSubmit(self::FORM_ACTION_SAVE)
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-check"></i> Save');

$form->addSubmit(self::FORM_ACTION_SAVE_CLOSE, self::FORM_ACTION_SAVE_CLOSE)
$form->addSubmit(self::FORM_ACTION_SAVE_CLOSE)
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-mail-send"></i> Save and close');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ public function create(?int $id = null): Form

$form->setDefaults($defaults);

$form->addSubmit(self::FORM_ACTION_SAVE, self::FORM_ACTION_SAVE)
$form->addSubmit(self::FORM_ACTION_SAVE)
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-check"></i> Save');

$form->addSubmit(self::FORM_ACTION_SAVE_CLOSE, self::FORM_ACTION_SAVE_CLOSE)
$form->addSubmit(self::FORM_ACTION_SAVE_CLOSE)
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-mail-send"></i> Save and close');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ public function create(?int $id = null, ?string $lang = null): Form

$form->setDefaults($defaults);

$form->addSubmit(self::FORM_ACTION_SAVE, self::FORM_ACTION_SAVE)
$form->addSubmit(self::FORM_ACTION_SAVE)
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-check"></i> Save');

$form->addSubmit(self::FORM_ACTION_SAVE_CLOSE, self::FORM_ACTION_SAVE_CLOSE)
$form->addSubmit(self::FORM_ACTION_SAVE_CLOSE)
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-mail-send"></i> Save and close');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function create(int $id): Form
$form->setDefaults(['locale' => $this->localizationConfig->getDefaultLocale()]);
}

$form->addSubmit('save', 'Send')
$form->addSubmit('save')
->getControlPrototype()
->setName('button')
->setHtml('<i class="zmdi zmdi-mail-send"></i> Send');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public function createComponentFilterLogsForm()

$form->addText('created_at_to', 'Sent to')->setRequired('Field `Sent to` is required');

$form->addSubmit('send', 'Filter')
$form->addSubmit('send')
->getControlPrototype()
->setName('button')
->setHtml('<i class="fa fa-filter"></i> Filter');
Expand Down

0 comments on commit 62793f9

Please sign in to comment.