Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
320 additions
and 32 deletions.
- +140 −0 plugins/citationFormats/abnt/AbntCitationPlugin.inc.php
- +80 −0 plugins/citationFormats/abnt/AbntSettingsForm.inc.php
- +19 −5 plugins/citationFormats/abnt/citation.tpl
- +0 −1 plugins/citationFormats/abnt/locale/ca_ES/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/cs_CZ/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/da_DK/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/de_DE/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/el_GR/locale.xml
- +7 −2 plugins/citationFormats/abnt/locale/en_US/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/es_ES/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/eu_ES/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/fa_IR/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/fr_CA/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/hr_HR/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/it_IT/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/ja_JP/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/nl_NL/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/no_NO/locale.xml
- +6 −1 plugins/citationFormats/abnt/locale/pt_BR/locale.xml
- +8 −2 plugins/citationFormats/abnt/locale/pt_PT/locale.xml
- +0 −2 plugins/citationFormats/abnt/locale/ro_RO/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/ru_RU/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/sv_SE/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/uk_UA/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/vi_VN/locale.xml
- +0 −1 plugins/citationFormats/abnt/locale/zh_CN/locale.xml
- +59 −0 plugins/citationFormats/abnt/settingsForm.tpl
- +1 −1 plugins/citationFormats/abnt/version.xml
@@ -0,0 +1,80 @@ | ||
<?php | ||
|
||
/** | ||
* @file AbntSettingsForm.inc.php | ||
* | ||
* Copyright (c) 2003-2012 John Willinsky | ||
* Contributed by Lepidus Tecnologia | ||
* | ||
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. | ||
* | ||
* @class AbntSettingsForm | ||
* @ingroup plugins_citationFormats_abnt | ||
* | ||
* @brief Form for journal managers to modify ABNT Citation plugin settings | ||
*/ | ||
|
||
import('lib.pkp.classes.form.Form'); | ||
|
||
class AbntSettingsForm extends Form { | ||
|
||
/** @var $journalId int */ | ||
var $journalId; | ||
|
||
/** @var $plugin object */ | ||
var $plugin; | ||
|
||
/** | ||
* Constructor | ||
* @param $plugin object | ||
* @param $journalId int | ||
*/ | ||
function AbntSettingsForm(&$plugin, $journalId) { | ||
$this->journalId = $journalId; | ||
$this->plugin =& $plugin; | ||
|
||
parent::Form($plugin->getTemplatePath() . 'settingsForm.tpl'); | ||
} | ||
|
||
/** | ||
* Initialize form data. | ||
*/ | ||
function initData() { | ||
$journalId = $this->journalId; | ||
$plugin =& $this->plugin; | ||
|
||
$this->_data = array( | ||
'location' => $plugin->getSetting($journalId, 'location') | ||
); | ||
} | ||
|
||
/** | ||
* Get the list of field names for which localized settings are used. | ||
* @return array | ||
*/ | ||
function getLocaleFieldNames() { | ||
return array('location'); | ||
} | ||
|
||
/** | ||
* Assign form data to user-submitted data. | ||
*/ | ||
function readInputData() { | ||
$this->readUserVars(array('location')); | ||
} | ||
|
||
/** | ||
* Save settings. | ||
*/ | ||
function execute() { | ||
$journalId =& Request::getJournal()->getId(); | ||
$plugin =& $this->plugin; | ||
|
||
$value = $this->getData('location'); | ||
if (is_array($value)) { | ||
$plugin->updateSetting($journalId, 'location', $value, 'object'); | ||
} | ||
} | ||
} | ||
|
||
?> |
Oops, something went wrong.