Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*8087* Settings migration: access options
- Loading branch information
Showing
7 changed files
with
101 additions
and
49 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
controllers/tab/settings/OJSDistributionSettingsTabHandler.inc.php
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,33 @@ | ||
<?php | ||
|
||
/** | ||
* @file controllers/tab/settings/OJSDistributionSettingsTabHandler.inc.php | ||
* | ||
* Copyright (c) 2003-2013 John Willinsky | ||
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. | ||
* | ||
* @class OJSDistributionSettingsTabHandler | ||
* @ingroup controllers_tab_settings | ||
* | ||
* @brief Handle AJAX operations for tabs on Distribution Process page. | ||
*/ | ||
|
||
// Import the base Handler. | ||
import('lib.pkp.controllers.tab.settings.DistributionSettingsTabHandler'); | ||
|
||
class OJSDistributionSettingsTabHandler extends DistributionSettingsTabHandler { | ||
/** | ||
* Constructor | ||
*/ | ||
function OJSDistributionSettingsTabHandler() { | ||
parent::DistributionSettingsTabHandler(); | ||
$this->setPageTabs(array_merge( | ||
$this->getPageTabs(), | ||
array( | ||
'access' => 'controllers.tab.settings.access.form.AccessForm', | ||
) | ||
)); | ||
} | ||
} | ||
|
||
?> |
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,33 @@ | ||
<?php | ||
|
||
/** | ||
* @file controllers/tab/settings/siteAccessOptions/form/AccessForm.inc.php | ||
* | ||
* Copyright (c) 2003-2013 John Willinsky | ||
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. | ||
* | ||
* @class AccessForm | ||
* @ingroup controllers_tab_settings_siteAccessOptions_form | ||
* | ||
* @brief Form to edit site access options. | ||
*/ | ||
|
||
import('lib.pkp.classes.controllers.tab.settings.form.ContextSettingsForm'); | ||
|
||
class AccessForm extends ContextSettingsForm { | ||
|
||
/** | ||
* Constructor. | ||
*/ | ||
function AccessForm($wizardMode = false) { | ||
parent::ContextSettingsForm( | ||
array( | ||
'publishingMode' => 'int', | ||
), | ||
'controllers/tab/settings/access/form/accessForm.tpl', | ||
$wizardMode | ||
); | ||
} | ||
} | ||
|
||
?> |
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
31 changes: 31 additions & 0 deletions
31
templates/controllers/tab/settings/access/form/accessForm.tpl
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,31 @@ | ||
{** | ||
* controllers/tab/settings/access/form/accessForm.tpl | ||
* | ||
* Copyright (c) 2003-2013 John Willinsky | ||
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. | ||
* | ||
* Access options form. | ||
* | ||
*} | ||
|
||
<script type="text/javascript"> | ||
$(function() {ldelim} | ||
// Attach the form handler. | ||
$('#accessForm').pkpHandler('$.pkp.controllers.form.AjaxFormHandler'); | ||
{rdelim}); | ||
</script> | ||
|
||
<form class="pkp_form" id="accessForm" method="post" action="{url router=$smarty.const.ROUTE_COMPONENT component="tab.settings.OJSDistributionSettingsTabHandler" op="saveFormData" tab="access"}"> | ||
{include file="controllers/notification/inPlaceNotification.tpl" notificationId="accessFormNotification"} | ||
|
||
{fbvFormArea id="userRegistration" class="border" title="manager.setup.onlineAccessManagement"} | ||
<p>{translate key="manager.setup.securitySettingsDescription"}</p> | ||
{fbvFormSection list=true} | ||
{fbvElement type="radio" id="publishingMode-0" name="publishingMode" value=$smarty.const.PUBLISHING_MODE_OPEN checked=$publishingMode|compare:$smarty.const.PUBLISHING_MODE_OPEN label="manager.setup.openAccess"} | ||
{fbvElement type="radio" id="publishingMode-1" name="publishingMode" value=$smarty.const.PUBLISHING_MODE_SUBSCRIPTION checked=$publishingMode|compare:$smarty.const.PUBLISHING_MODE_SUBSCRIPTION label="manager.setup.subscriptionDescription"} | ||
{fbvElement type="radio" id="publishingMode-1" name="publishingMode" value=$smarty.const.PUBLISHING_MODE_NONE checked=$publishingMode|compare:$smarty.const.PUBLISHING_MODE_NONE label="manager.setup.noPublishing"} | ||
{/fbvFormSection} | ||
{/fbvFormArea} | ||
|
||
{fbvFormButtons submitText="common.save" hideCancel=true} | ||
</form> |
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