diff --git a/admin/assets/style.min.css b/admin/assets/style.min.css index bab54e8..10f82b8 100644 --- a/admin/assets/style.min.css +++ b/admin/assets/style.min.css @@ -1 +1 @@ -#authorSave{margin-left: 1.5rem;}#authorSave:active{margin:1px 0 -1px 1.5rem;} \ No newline at end of file +#authorSave{margin-left:1.5rem}#authorSave:active{margin:1px 0 -1px 1.5rem}#authorSave i{margin-right:5px} \ No newline at end of file diff --git a/admin/pages/authors.md b/admin/pages/authors.md index 32f08e2..0724c4c 100644 --- a/admin/pages/authors.md +++ b/admin/pages/authors.md @@ -84,7 +84,7 @@ form: buttons: submit: type: submit - value: ' Save' + value: Save classes: button id: authorSave --- diff --git a/admin/templates/authors.html.twig b/admin/templates/authors.html.twig index 7f2b48e..cc65fbc 100644 --- a/admin/templates/authors.html.twig +++ b/admin/templates/authors.html.twig @@ -7,5 +7,5 @@ {% block content %} {% include "forms/form.html.twig" %} {% do assets.addCss('user://plugins/aura-authors/admin/assets/style.min.css') %} - {% do assets.addInlineJs('$(" ").prependTo(\"#authorSave\");') %} + {% do assets.addJs('user://plugins/aura-authors/admin/assets/admin.min.js', { 'loading':'defer' }) %} {% endblock %} \ No newline at end of file diff --git a/aura-authors.php b/aura-authors.php index caa8378..0cf8738 100644 --- a/aura-authors.php +++ b/aura-authors.php @@ -15,7 +15,6 @@ class AuraAuthorsPlugin extends Plugin { protected static $authorsFile = DATA_DIR . 'authors/authors.yaml'; protected $route = 'authors'; - static protected $authorList = []; public static function getAuthors() { @@ -26,13 +25,6 @@ class AuraAuthorsPlugin extends Plugin return Yaml::parse($fileInstance->content()); } - public static function saveAuthors(array $authors) - { - $file = File::instance(self::$authorsFile); - $file->save(Yaml::dump($authors)); - echo json_encode('Saved'); - } - public function onPluginsInitialized() { // Admin only events