Skip to content

Commit

Permalink
Cleaned code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-KM committed Jun 3, 2018
1 parent 199c0ff commit 849df0d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function getConfigForm(PhpRenderer $renderer)
$services = $this->getServiceLocator();
$config = $services->get('Config');
$settings = $services->get('Omeka\Settings');
$formElementManager = $services->get('FormElementManager');
$form = $services->get('FormElementManager')->get(ConfigForm::class);
$controllerPluginManager = $services->get('ControllerPluginManager');
$api = $services->get('Omeka\ApiManager');
$referencePlugin = $controllerPluginManager->get('reference');
Expand Down Expand Up @@ -212,7 +212,6 @@ public function getConfigForm(PhpRenderer $renderer)
}
}

$form = $formElementManager->get(ConfigForm::class);
$form->init();
// TODO Fix the setData() with sub-subfieldset..
$form->setData($data);
Expand All @@ -234,8 +233,7 @@ public function handleConfigForm(AbstractController $controller)

$params = $controller->getRequest()->getPost();

$form = $this->getServiceLocator()->get('FormElementManager')
->get(ConfigForm::class);
$form = $services->get('FormElementManager')->get(ConfigForm::class);
$form->init();
$form->setData($params);
if (!$form->isValid()) {
Expand Down
2 changes: 1 addition & 1 deletion config/module.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[info]
name = "Reference"
description = "Adds glossary pages with the alphabetical indexes of specified classes and properties."
description = "Adds glossary pages and blocks with the alphabetical indexes of specified classes and properties."
tags = "glossary, tree view, indexing, lexicon"
license = "CeCILL v2.1"
author = "Daniel Berthereau"
Expand Down
2 changes: 1 addition & 1 deletion view/reference/site/reference/list.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$this->htmlElement('body')->appendAttribute('class', 'reference browse list');
?>
<div id="primary" class="reference">
<h2><?php echo sprintf($this->translate('Browse Items By "%s" (%d Headings)'), $label, $total); ?></h2>
<h2><?php echo sprintf($this->translate('Browse items by "%s" (%d headings)'), $label, $total); ?></h2>
<?php if ($total): ?>
<?php echo $this->reference()->displayListForTerm($term, $args, $options); ?>
<?php else: ?>
Expand Down

0 comments on commit 849df0d

Please sign in to comment.