Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*4645* ABNT location contributions by Lepidus Tecnologia
- Loading branch information
Showing
28 changed files
with
320 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'); | ||
} | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.