first commit
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
{**
|
||||
* templates/controllers/grid/settings/user/form/userDetailsForm.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* Form for creating/editing a user.
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {ldelim}
|
||||
// Attach the form handler.
|
||||
$('#userDetailsForm').pkpHandler('$.pkp.controllers.grid.settings.user.form.UserDetailsFormHandler',
|
||||
{ldelim}
|
||||
fetchUsernameSuggestionUrl: {url|json_encode router=\PKP\core\PKPApplication::ROUTE_COMPONENT component="api.user.UserApiHandler" op="suggestUsername" givenName="GIVEN_NAME_PLACEHOLDER" familyName="FAMILY_NAME_PLACEHOLDER" escape=false},
|
||||
usernameSuggestionTextAlert: {translate|json_encode key="grid.user.mustProvideName"}
|
||||
{rdelim}
|
||||
);
|
||||
{rdelim});
|
||||
</script>
|
||||
|
||||
{if !$userId}
|
||||
{assign var="passwordRequired" value="true"}
|
||||
{/if}{* !$userId *}
|
||||
|
||||
<form class="pkp_form" id="userDetailsForm" method="post" action="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT component="grid.settings.user.UserGridHandler" op="updateUser"}">
|
||||
{csrf}
|
||||
<input type="hidden" id="sitePrimaryLocale" name="sitePrimaryLocale" value="{$sitePrimaryLocale|escape}" />
|
||||
<div id="userDetailsFormContainer">
|
||||
<div id="userDetails" class="full left">
|
||||
{if !$userGroupUpdateOnly}
|
||||
{if $userId}
|
||||
<h3>{translate key="grid.user.userDetails"}</h3>
|
||||
{else}
|
||||
<h3>{translate key="grid.user.step1"}</h3>
|
||||
{/if}
|
||||
{/if}
|
||||
{if $userId}
|
||||
<input type="hidden" id="userId" name="userId" value="{$userId|escape}" />
|
||||
{/if}
|
||||
{include file="controllers/notification/inPlaceNotification.tpl" notificationId="userDetailsFormNotification"}
|
||||
</div>
|
||||
|
||||
{if !$userGroupUpdateOnly}
|
||||
{if $userId}
|
||||
{assign var="disableSendNotifySection" value=true}
|
||||
{/if}
|
||||
|
||||
{include
|
||||
file="common/userDetails.tpl"
|
||||
disableSendNotifySection=$disableSendNotifySection
|
||||
}
|
||||
|
||||
{if $canCurrentUserGossip}
|
||||
{fbvFormSection label="user.gossip" description="user.gossip.description"}
|
||||
{fbvElement type="textarea" name="gossip" id="gossip" rich=true value=$gossip}
|
||||
{/fbvFormSection}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if $userGroupUpdateOnly}
|
||||
{include file="common/userDetailsReadOnly.tpl"}
|
||||
{/if}
|
||||
|
||||
{if $userId}
|
||||
{fbvFormSection}
|
||||
{fbvFormSection list=true title="grid.user.userRoles"}
|
||||
{foreach from=$allUserGroups item="userGroup" key="id"}
|
||||
{fbvElement type="checkbox" id="userGroupIds[]" value=$id checked=in_array($id, $assignedUserGroups) label=$userGroup|escape translate=false}
|
||||
{/foreach}
|
||||
{/fbvFormSection}
|
||||
{/fbvFormSection}
|
||||
{/if}
|
||||
<p><span class="formRequired">{translate key="common.requiredField"}</span></p>
|
||||
{fbvFormButtons}
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,33 @@
|
||||
{**
|
||||
* templates/controllers/grid/settings/user/form/userDisableForm.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* Display form to enable/disable a user.
|
||||
*}
|
||||
<script type="text/javascript">
|
||||
$(function() {ldelim}
|
||||
// Attach the form handler.
|
||||
$('#userDisableForm').pkpHandler('$.pkp.controllers.form.AjaxFormHandler');
|
||||
{rdelim});
|
||||
</script>
|
||||
<form class="pkp_form" id="userDisableForm" method="post" action="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT component="grid.settings.user.UserGridHandler" op="disableUser"}">
|
||||
{csrf}
|
||||
|
||||
<input type="hidden" name="userId" value="{$userId|escape}" />
|
||||
<input type="hidden" name="enable" value="{$enable|escape}" />
|
||||
|
||||
{if $enable}
|
||||
{fbvFormSection title="grid.user.enableReason" for="disableReason"}
|
||||
{fbvElement type="textarea" id="disableReason" value=$disableReason size=$fbvStyles.size.LARGE}
|
||||
{/fbvFormSection}
|
||||
{else}
|
||||
{fbvFormSection title="grid.user.disableReason" for="disableReason"}
|
||||
{fbvElement type="textarea" id="disableReason" value=$disableReason size=$fbvStyles.size.LARGE}
|
||||
{/fbvFormSection}
|
||||
{/if}
|
||||
|
||||
{fbvFormButtons}
|
||||
</form>
|
||||
@@ -0,0 +1,36 @@
|
||||
{**
|
||||
* templates/controllers/grid/settings/user/form/userEmailForm.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* Display form to send user an email.
|
||||
*}
|
||||
<script>
|
||||
$(function() {ldelim}
|
||||
// Attach the form handler.
|
||||
$('#sendEmailForm').pkpHandler('$.pkp.controllers.form.AjaxFormHandler');
|
||||
{rdelim});
|
||||
</script>
|
||||
<form class="pkp_form" id="sendEmailForm" method="post" action="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT component="grid.settings.user.UserGridHandler" op="sendEmail"}" >
|
||||
{csrf}
|
||||
|
||||
<input type="hidden" name="userId" value="{$userId|escape}" />
|
||||
|
||||
{fbvFormSection title="email.subject" for="subject" required="true" size=$fbvStyles.size.MEDIUM inline=true}
|
||||
{fbvElement type="text" id="subject" value=$subject required="true"}
|
||||
{/fbvFormSection}
|
||||
|
||||
{fbvFormSection title="email.to" size=$fbvStyles.size.MEDIUM inline=true}
|
||||
{fbvElement type="text" id="user" value=$userFullName|concat:" <":$userEmail:">" disabled="true"}
|
||||
{/fbvFormSection}
|
||||
|
||||
{fbvFormSection title="email.body" for="message" required="true"}
|
||||
{fbvElement type="textarea" id="message" value=$message rich=true required="true"}
|
||||
{/fbvFormSection}
|
||||
|
||||
{fbvFormButtons submitText="common.sendEmail"}
|
||||
|
||||
<p><span class="formRequired">{translate key="common.requiredField"}</span></p>
|
||||
</form>
|
||||
@@ -0,0 +1,34 @@
|
||||
{**
|
||||
* templates/controllers/grid/settings/user/form/userRoleForm.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* Form for managing roles for a newly created user.
|
||||
*}
|
||||
<script type="text/javascript">
|
||||
$(function() {ldelim}
|
||||
// Attach the form handler.
|
||||
$('#userRoleForm').pkpHandler('$.pkp.controllers.form.AjaxFormHandler');
|
||||
{rdelim});
|
||||
</script>
|
||||
<form class="pkp_form" id="userRoleForm" method="post" action="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT component="grid.settings.user.UserGridHandler" op="updateUserRoles"}">
|
||||
{csrf}
|
||||
|
||||
{include file="controllers/notification/inPlaceNotification.tpl" notificationId="userRoleFormNotification"}
|
||||
|
||||
<h3>{translate key="grid.user.step2" userFullName=$userFullName|escape}</h3>
|
||||
|
||||
<input type="hidden" id="userId" name="userId" value="{$userId|escape}" />
|
||||
|
||||
{fbvFormSection}
|
||||
{fbvFormSection list=true title="grid.user.userRoles"}
|
||||
{foreach from=$allUserGroups item="userGroup" key="id"}
|
||||
{fbvElement type="checkbox" id="userGroupIds[]" value=$id checked=in_array($id, $assignedUserGroups) label=$userGroup|escape translate=false}
|
||||
{/foreach}
|
||||
{/fbvFormSection}
|
||||
{/fbvFormSection}
|
||||
|
||||
{fbvFormButtons submitText="common.save"}
|
||||
</form>
|
||||
@@ -0,0 +1,46 @@
|
||||
{**
|
||||
* templates/controllers/grid/settings/user/userGridFilter.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2000-2021 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* @brief Filter template for user grid.
|
||||
*
|
||||
* @uses int|null $filterData.oldUserId The user grid is re-used when merging
|
||||
* users. During the process, an $oldUserId is passed representing the user to
|
||||
* be merged. This is used to distinguish the grid filter IDs. The $oldUserId
|
||||
* must be submitted with the client form in order to ensure that the unique
|
||||
* IDs are used when the grid is refreshed. This ensures the filter form
|
||||
* binds to the correct grid when the filter is submitted and refreshed.
|
||||
*}
|
||||
{assign var=filterId value="userSearchForm"}
|
||||
{if $filterData.oldUserId}
|
||||
{assign var=filterId value=$filterId|concat:"-userMerge"}
|
||||
{/if}
|
||||
<script type="text/javascript">
|
||||
// Attach the form handler to the form.
|
||||
$('#{$filterId}').pkpHandler('$.pkp.controllers.form.ClientFormHandler',
|
||||
{ldelim}
|
||||
trackFormChanges: false
|
||||
{rdelim}
|
||||
);
|
||||
</script>
|
||||
<form class="pkp_form filter" id="{$filterId}" action="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT component="grid.settings.user.UserGridHandler" op="fetchGrid"}" method="post">
|
||||
{csrf}
|
||||
{if $filterData.oldUserId}
|
||||
<input type="hidden" name="oldUserId" value="{$filterData.oldUserId|escape}">
|
||||
{/if}
|
||||
{fbvFormArea id="userSearchFormArea"}
|
||||
{fbvFormSection title="common.search" for="search"}
|
||||
{fbvElement type="search" name="search" id="search" value=$filterSelectionData.search size=$fbvStyles.size.LARGE inline="true"}
|
||||
{fbvElement type="select" name="userGroup" id="userGroup" from=$filterData.userGroupOptions selected=$filterSelectionData.userGroup size=$fbvStyles.size.SMALL translate=false inline="true"}
|
||||
{/fbvFormSection}
|
||||
|
||||
{fbvFormSection list=true}
|
||||
{if $filterSelectionData.includeNoRole}{assign var="checked" value="checked"}{/if}
|
||||
{fbvElement type="checkbox" name="includeNoRole" id="includeNoRole" value="1" checked=$checked label="user.noRoles.selectUsersWithoutRoles" translate="true"}
|
||||
{/fbvFormSection}
|
||||
{fbvFormButtons hideCancel=true submitText="common.search"}
|
||||
{/fbvFormArea}
|
||||
</form>
|
||||
Reference in New Issue
Block a user