Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*8095* introduce site access options form
- Loading branch information
Showing
3 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
controllers/tab/settings/siteAccessOptions/form/SiteAccessOptionsForm.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,37 @@ | ||
<?php | ||
|
||
/** | ||
* @file controllers/tab/settings/siteAccessOptions/form/SiteAccessOptionsForm.inc.php | ||
* | ||
* Copyright (c) 2003-2012 John Willinsky | ||
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. | ||
* | ||
* @class SiteAccessOptionsForm | ||
* @ingroup controllers_tab_settings_siteAccessOptions_form | ||
* | ||
* @brief Form to edit site access options. | ||
*/ | ||
|
||
import('lib.pkp.classes.controllers.tab.settings.form.ContextSettingsForm'); | ||
|
||
class SiteAccessOptionsForm extends ContextSettingsForm { | ||
|
||
/** | ||
* Constructor. | ||
*/ | ||
function SiteAccessOptionsForm($wizardMode = false) { | ||
$settings = array( | ||
'disableUserReg' => 'bool', | ||
'allowRegAuthor' => 'bool', | ||
'allowRegReviewer' => 'bool', | ||
'restrictSiteAccess' => 'bool', | ||
'restrictArticleAccess' => 'bool', | ||
'showGalleyLinks' => 'bool' | ||
); | ||
|
||
parent::ContextSettingsForm($settings, 'controllers/tab/settings/siteAccessOptions/form/siteAccessOptionsForm.tpl', $wizardMode); | ||
} | ||
|
||
} | ||
|
||
?> |
42 changes: 42 additions & 0 deletions
42
templates/controllers/tab/settings/siteAccessOptions/form/siteAccessOptionsForm.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,42 @@ | ||
{** | ||
* controllers/tab/settings/siteAccessOptions/form/siteAccessOptionsForm.tpl | ||
* | ||
* Copyright (c) 2003-2012 John Willinsky | ||
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. | ||
* | ||
* Site access options management form. | ||
* | ||
*} | ||
|
||
<script type="text/javascript"> | ||
$(function() {ldelim} | ||
// Attach the form handler. | ||
$('#siteAccessOptionsForm').pkpHandler('$.pkp.controllers.tab.settings.siteAccessOptions.form.SiteAccessOptionsFormHandler'); | ||
{rdelim}); | ||
</script> | ||
|
||
<form class="pkp_form" id="siteAccessOptionsForm" method="post" action="{url router=$smarty.const.ROUTE_COMPONENT component="tab.settings.AccessSettingsTabHandler" op="saveFormData" tab="siteAccessOptions"}"> | ||
{include file="controllers/notification/inPlaceNotification.tpl" notificationId="siteAccessOptionsFormNotification"} | ||
|
||
{fbvFormArea id="siteAccess" class="border" title="manager.setup.siteAccess"} | ||
{fbvFormSection list=true} | ||
{fbvElement type="checkbox" id="restrictSiteAccess" value="1" checked=$restrictSiteAccess label="manager.setup.restrictSiteAccess"} | ||
{fbvElement type="checkbox" id="restrictArticleAccess" value="1" checked=$restrictArticleAccess label="manager.setup.restrictArticleAccess"} | ||
{fbvElement type="checkbox" id="showGalleyLinks" value="1" checked=$showGalleyLinks label="manager.setup.showGalleyLinksDescription"} | ||
{/fbvFormSection} | ||
{/fbvFormArea} | ||
|
||
{fbvFormArea id="userRegistration" class="border" title="manager.setup.userRegistration"} | ||
{fbvFormSection list=true} | ||
{fbvElement type="radio" id="disableUserReg-0" name="disableUserReg" value="0" checked=!$disableUserReg label="manager.setup.enableUserRegistration"} | ||
<div style="padding-left: 20px;"> | ||
{fbvElement type="checkbox" id="allowRegReader" value="1" checked=$allowRegReader disabled=$disableUserReg label="manager.setup.enableUserRegistration.reader"} | ||
{fbvElement type="checkbox" id="allowRegAuthor" value="1" checked=$allowRegAuthor disabled=$disableUserReg label="manager.setup.enableUserRegistration.author"} | ||
{fbvElement type="checkbox" id="allowRegReviewer" value="1" checked=$allowRegReviewer disabled=$disableUserReg label="manager.setup.enableUserRegistration.reviewer"} | ||
</div> | ||
{fbvElement type="radio" id="disableUserReg-1" name="disableUserReg" value="1" checked=$disableUserReg label="manager.setup.disableUserRegistration"} | ||
{/fbvFormSection} | ||
{/fbvFormArea} | ||
|
||
{fbvFormButtons id="siteAccessFormSubmit" 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{** | ||
* templates/management/settings/access.tpl | ||
* | ||
* Copyright (c) 2003-2012 John Willinsky | ||
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. | ||
* | ||
* Access and Security page. | ||
*} | ||
|
||
{strip} | ||
{assign var="pageTitle" value="navigation.access"} | ||
{include file="common/header.tpl"} | ||
{/strip} | ||
|
||
<script type="text/javascript"> | ||
// Attach the JS file tab handler. | ||
$(function() {ldelim} | ||
$('#accessTabs').pkpHandler( | ||
'$.pkp.controllers.TabHandler'); | ||
{rdelim}); | ||
</script> | ||
<div id="accessTabs"> | ||
<ul> | ||
<li><a href="{url router=$smarty.const.ROUTE_COMPONENT component="tab.settings.AccessSettingsTabHandler" op="showTab" tab="users"}">{translate key="manager.users"}</a></li> | ||
<li><a href="{url router=$smarty.const.ROUTE_COMPONENT component="tab.settings.AccessSettingsTabHandler" op="showTab" tab="roles"}">{translate key="manager.roles"}</a></li> | ||
<li><a href="{url router=$smarty.const.ROUTE_COMPONENT component="tab.settings.AccessSettingsTabHandler" op="showTab" tab="siteAccessOptions"}">{translate key="manager.siteAccessOptions.siteAccessOptions"}</a></li> | ||
</ul> | ||
</div> | ||
|
||
{include file="common/footer.tpl"} |