Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #33 from griffins/issue_32
Browse files Browse the repository at this point in the history
To fix issue #32
  • Loading branch information
Qoraiche authored May 15, 2019
2 parents d97a855 + 3effd97 commit b7c7319
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/mailEclipse.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,16 @@ static public function updateTemplate($request)

// Update
//
self::saveTemplates(self::getTemplates()->reject(function ($value, $key) use($template) {
$oldForm = self::getTemplates()->reject(function ($value, $key) use ($template) {
return $value->template_slug == $template->template_slug;
})->add(array_merge((array)$template, [
});
$newForm = array_merge($oldForm->toArray(),[ array_merge((array)$template, [
'template_slug' => $templatename,
'template_name' => $request->title,
'template_description' => $request->description,
])));
])]);

self::saveTemplates(collect($newForm));

$template_view = self::$view_namespace . '::templates.' . $request->templateslug;
$template_plaintext_view = $template_view . '_plain_text';
Expand Down

0 comments on commit b7c7319

Please sign in to comment.