first commit
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
{**
|
||||
* lib/pkp/templates/controllers/grid/settings/category/form/categoryForm.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 to edit or create a category
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {ldelim}
|
||||
// Attach the form handler.
|
||||
$('#categoryForm').pkpHandler(
|
||||
'$.pkp.controllers.form.FileUploadFormHandler',
|
||||
{ldelim}
|
||||
publishChangeEvents: ['updateSidebar'],
|
||||
$uploader: $('#plupload'),
|
||||
uploaderOptions: {ldelim}
|
||||
uploadUrl: {url|json_encode op="uploadImage" escape=false},
|
||||
baseUrl: {$baseUrl|json_encode},
|
||||
filters: {ldelim}
|
||||
mime_types : [
|
||||
{ldelim} title : "Image files", extensions : "jpg,jpeg,png" {rdelim}
|
||||
]
|
||||
{rdelim}
|
||||
{rdelim}
|
||||
{rdelim}
|
||||
);
|
||||
{rdelim});
|
||||
</script>
|
||||
|
||||
<form class="pkp_form" id="categoryForm" method="post" action="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT component="grid.settings.category.CategoryCategoryGridHandler" op="updateCategory" categoryId=$categoryId}">
|
||||
{csrf}
|
||||
{include file="controllers/notification/inPlaceNotification.tpl" notificationId="categoryFormNotification"}
|
||||
|
||||
{fbvFormArea id="categoryDetails"}
|
||||
|
||||
<h3>{translate key="grid.category.categoryDetails"}</h3>
|
||||
|
||||
{fbvFormSection title="grid.category.name" for="name" required="true"}
|
||||
{fbvElement type="text" multilingual="true" name="name" value=$name id="name" required="true"}
|
||||
{/fbvFormSection}
|
||||
|
||||
{fbvFormSection title="grid.category.parentCategory" for="context"}
|
||||
{fbvElement type="select" id="parentId" from=$rootCategories selected=$parentId translate=false disabled=$cannotSelectChild}
|
||||
{/fbvFormSection}
|
||||
|
||||
{fbvFormSection title="grid.category.path" required=true for="path"}
|
||||
{capture assign="instruct"}
|
||||
{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="catalog" op="category" path="path"}
|
||||
{translate key="grid.category.urlWillBe" sampleUrl=$sampleUrl}
|
||||
{/capture}
|
||||
{fbvElement type="text" id="path" value=$path maxlength="32" label=$instruct subLabelTranslate=false}
|
||||
{/fbvFormSection}
|
||||
|
||||
{fbvFormSection title="grid.category.description" for="context"}
|
||||
{fbvElement type="textarea" multilingual="true" id="description" value=$description rich=true}
|
||||
{/fbvFormSection}
|
||||
|
||||
{fbvFormSection label="catalog.sortBy" description="catalog.sortBy.categoryDescription" for="sortOption"}
|
||||
{fbvElement type="select" id="sortOption" from=$sortOptions selected=$sortOption translate=false}
|
||||
{/fbvFormSection}
|
||||
|
||||
{fbvFormSection title="category.coverImage"}
|
||||
{include file="controllers/fileUploadContainer.tpl" id="plupload"}
|
||||
<input type="hidden" name="temporaryFileId" id="temporaryFileId" value="" />
|
||||
{/fbvFormSection}
|
||||
|
||||
{if $image}
|
||||
{fbvFormSection}
|
||||
{capture assign="altTitle"}{translate key="submission.currentCoverImage"}{/capture}
|
||||
<img class="pkp_helpers_container_center" height="{$image.thumbnailHeight}" width="{$image.thumbnailWidth}" src="{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="catalog" op="thumbnail" type="category" id=$categoryId}" alt="{$altTitle|escape}" />
|
||||
{/fbvFormSection}
|
||||
{/if}
|
||||
|
||||
{fbvFormSection list=true title="manager.sections.form.assignEditors"}
|
||||
<div>{translate key="manager.categories.form.assignEditors.description"}</div>
|
||||
{foreach from=$assignableUserGroups item="assignableUserGroup"}
|
||||
{assign var="role" value=$assignableUserGroup.userGroup->getLocalizedName()}
|
||||
{assign var="userGroupId" value=$assignableUserGroup.userGroup->getId()}
|
||||
{foreach from=$assignableUserGroup.users item=$username key="id"}
|
||||
{fbvElement
|
||||
type="checkbox"
|
||||
id="subEditors[{$userGroupId}][]"
|
||||
value=$id
|
||||
checked=(isset($subeditorUserGroups[$id]) && in_array($userGroupId, $subeditorUserGroups[$id]))
|
||||
label={translate key="manager.sections.form.assignEditorAs" name=$username|escape role=$role|escape}
|
||||
translate=false
|
||||
}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/fbvFormSection}
|
||||
|
||||
<p><span class="formRequired">{translate key="common.requiredField"}</span></p>
|
||||
{fbvFormButtons}
|
||||
|
||||
{/fbvFormArea}
|
||||
</form>
|
||||
@@ -0,0 +1,53 @@
|
||||
{**
|
||||
* templates/controllers/grid/settings/genre/form/genreForm.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.
|
||||
*
|
||||
* Genre form under context management.
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {ldelim}
|
||||
// Attach the form handler.
|
||||
$('#genreForm').pkpHandler('$.pkp.controllers.form.AjaxFormHandler');
|
||||
{rdelim});
|
||||
</script>
|
||||
|
||||
<form class="pkp_form" id="genreForm" method="post" action="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT component="grid.settings.genre.GenreGridHandler" op="updateGenre"}">
|
||||
{csrf}
|
||||
{include file="controllers/notification/inPlaceNotification.tpl" notificationId="genreFormNotification"}
|
||||
|
||||
{fbvFormArea id="genreInfo"}
|
||||
{fbvFormSection title="common.name" for="name" required="true"}
|
||||
{fbvElement type="text" multilingual="true" id="name" value=$name maxlength="80" required="true"}
|
||||
{/fbvFormSection}
|
||||
{fbvFormSection list="true" title="manager.setup.genres.label"}
|
||||
{fbvElement type="checkbox" id="dependent" checked=$dependent label="manager.setup.genres.dependent"}
|
||||
{fbvElement type="checkbox" id="supplementary" checked=$supplementary label="manager.setup.genres.supplementary"}
|
||||
{/fbvFormSection}
|
||||
{fbvFormSection label="manager.setup.genres.metatadata" description="manager.setup.genres.metatadata.description" for="category"}
|
||||
{fbvElement type="select" id="category" from=$submissionFileCategories selected=$category translate=false}
|
||||
{/fbvFormSection}
|
||||
{fbvFormSection list="true" label="manager.setup.genres.submitRequired.label" description="manager.setup.genres.submitRequired.description"}
|
||||
{fbvElement type="radio" id="required1" name="required" value=1 checked=$required label="manager.setup.genres.submitRequired.yes"}
|
||||
{fbvElement type="radio" id="required0" name="required" value=0 checked=!$required label="manager.setup.genres.submitRequired.no"}
|
||||
{/fbvFormSection}
|
||||
{fbvFormSection label="manager.setup.genres.key" description="manager.setup.genres.key.description" for="key"}
|
||||
{fbvElement type="text" id="key" value=$key maxlength="30" readonly=$keyReadOnly size=$fbvStyles.size.SMALL}
|
||||
{/fbvFormSection}
|
||||
{/fbvFormArea}
|
||||
|
||||
{if $gridId}
|
||||
<input type="hidden" name="gridId" value="{$gridId|escape}" />
|
||||
{/if}
|
||||
{if $rowId}
|
||||
<input type="hidden" name="rowId" value="{$rowId|escape}" />
|
||||
{/if}
|
||||
{if $genreId}
|
||||
<input type="hidden" name="genreId" value="{$genreId|escape}" />
|
||||
{/if}
|
||||
<p><span class="formRequired">{translate key="common.requiredField"}</span></p>
|
||||
{fbvFormButtons submitText="common.save"}
|
||||
</form>
|
||||
@@ -0,0 +1,77 @@
|
||||
{**
|
||||
* templates/controllers/grid/settings/library/form/editFileForm.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.
|
||||
*
|
||||
* Library Files form for editing an existing file
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
// Attach the file upload form handler.
|
||||
$(function() {ldelim}
|
||||
$('#uploadForm').pkpHandler(
|
||||
'$.pkp.controllers.form.FileUploadFormHandler',
|
||||
{ldelim}
|
||||
$uploader: $('#plupload'),
|
||||
uploaderOptions: {ldelim}
|
||||
uploadUrl: {url|json_encode op="uploadFile" fileType=$fileType escape=false},
|
||||
baseUrl: {$baseUrl|json_encode}
|
||||
{rdelim}
|
||||
{rdelim}
|
||||
);
|
||||
{rdelim});
|
||||
</script>
|
||||
|
||||
<form class="pkp_form" id="uploadForm" action="{url op="updateFile" fileId=$libraryFile->getId()}" method="post">
|
||||
{csrf}
|
||||
<input type="hidden" name="temporaryFileId" id="temporaryFileId" value="" />
|
||||
{fbvFormArea id="name"}
|
||||
{fbvFormSection title="common.name" required=true}
|
||||
{fbvElement type="text" id="libraryFileName" value=$libraryFileName maxlength="255" multilingual=true required=true}
|
||||
{/fbvFormSection}
|
||||
{/fbvFormArea}
|
||||
|
||||
{fbvFormArea id="type"}
|
||||
{fbvFormSection title="common.type" required=true}
|
||||
{fbvElement type="select" from=$fileTypes id="fileType" selected=$libraryFile->getType() defaultValue="" defaultLabel="common.chooseOne"|translate required=true}
|
||||
{/fbvFormSection}
|
||||
{/fbvFormArea}
|
||||
|
||||
{fbvFormArea id="file"}
|
||||
{fbvFormSection title="common.file"}
|
||||
<table id="fileInfo" class="data" width="100%">
|
||||
<tr valign="top">
|
||||
<td width="20%" class="label">{translate key="common.fileName"}</td>
|
||||
<td width="80%" class="value">{$libraryFile->getOriginalFileName()|escape}</a></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td class="label">{translate key="common.fileSize"}</td>
|
||||
<td class="value">{$libraryFile->getNiceFileSize()}</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td class="label">{translate key="common.dateUploaded"}</td>
|
||||
<td class="value">{$libraryFile->getDateUploaded()|date_format:$datetimeFormatShort}</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td class="label">{translate key="common.replaceFile"}</td>
|
||||
<td class="value">{include file="controllers/fileUploadContainer.tpl" id="plupload"}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/fbvFormSection}
|
||||
{/fbvFormArea}
|
||||
|
||||
{fbvFormSection list="true" translate=false}
|
||||
{capture assign=enablePublicAccess}{translate key="common.publicAccess"}{/capture}
|
||||
{fbvElement type="checkbox" id="publicAccess" value="1" checked=$publicAccess label=$enablePublicAccess translate=false}
|
||||
<p>
|
||||
{capture assign=downloadUrl}{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="libraryFiles" op="downloadPublic" path=$libraryFile->getId()}{/capture}
|
||||
{translate key="settings.libraryFiles.public.viewInstructions" downloadUrl=$downloadUrl}
|
||||
</p>
|
||||
{/fbvFormSection}
|
||||
|
||||
<p><span class="formRequired">{translate key="common.requiredField"}</span></p>
|
||||
|
||||
{fbvFormButtons}
|
||||
</form>
|
||||
@@ -0,0 +1,61 @@
|
||||
{**
|
||||
* templates/controllers/grid/settings/library/form/newFileForm.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.
|
||||
*
|
||||
* Library Files form
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
// Attach the file upload form handler.
|
||||
$(function() {ldelim}
|
||||
$('#uploadForm').pkpHandler(
|
||||
'$.pkp.controllers.form.FileUploadFormHandler',
|
||||
{ldelim}
|
||||
$uploader: $('#plupload'),
|
||||
uploaderOptions: {ldelim}
|
||||
uploadUrl: {url|json_encode op="uploadFile" fileType=$fileType escape=false},
|
||||
baseUrl: {$baseUrl|json_encode}
|
||||
{rdelim}
|
||||
{rdelim}
|
||||
);
|
||||
{rdelim});
|
||||
</script>
|
||||
|
||||
<form class="pkp_form" id="uploadForm" action="{url op="saveFile"}" method="post">
|
||||
{csrf}
|
||||
{include file="controllers/notification/inPlaceNotification.tpl" notificationId="libraryFileUploadNotification"}
|
||||
<input type="hidden" name="temporaryFileId" id="temporaryFileId" value="" />
|
||||
{fbvFormArea id="name"}
|
||||
{fbvFormSection title="common.name" required=true}
|
||||
{fbvElement type="text" multilingual="true" id="libraryFileName" value=$libraryFileName maxlength="255" required=true}
|
||||
{/fbvFormSection}
|
||||
{/fbvFormArea}
|
||||
|
||||
{fbvFormArea id="type"}
|
||||
{fbvFormSection title="common.type" required=true}
|
||||
{fbvElement type="select" from=$fileTypes id="fileType" selected=$fileType defaultValue="" defaultLabel="common.chooseOne"|translate required=true}
|
||||
{/fbvFormSection}
|
||||
{/fbvFormArea}
|
||||
|
||||
{fbvFormArea id="file"}
|
||||
{fbvFormSection title="common.file" required=true}
|
||||
{include file="controllers/fileUploadContainer.tpl" id="plupload"}
|
||||
{/fbvFormSection}
|
||||
{/fbvFormArea}
|
||||
|
||||
{fbvFormSection list="true" translate=false}
|
||||
{capture assign=enablePublicAccess}{translate key="common.publicAccess"}{/capture}
|
||||
{fbvElement type="checkbox" id="publicAccess" value="1" checked=false label=$enablePublicAccess translate=false}
|
||||
<p>
|
||||
{capture assign=downloadUrl}{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="libraryFiles" op="downloadPublic" path="id"}{/capture}
|
||||
{translate key="settings.libraryFiles.public.viewInstructions" downloadUrl=$downloadUrl}
|
||||
</p>
|
||||
{/fbvFormSection}
|
||||
|
||||
<p><span class="formRequired">{translate key="common.requiredField"}</span></p>
|
||||
|
||||
{fbvFormButtons}
|
||||
</form>
|
||||
@@ -0,0 +1,28 @@
|
||||
{**
|
||||
* templates/controllers/grid/settings/reviewForms/editReviewForm.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.
|
||||
*
|
||||
* The edit/preview a review form tabset.
|
||||
*}
|
||||
<script type="text/javascript">
|
||||
// Attach the JS file tab handler.
|
||||
$(function() {ldelim}
|
||||
$('#editReviewFormTabs').pkpHandler(
|
||||
'$.pkp.controllers.TabHandler',
|
||||
{ldelim}
|
||||
{if !$canEdit}disabled: [0, 1],{/if}
|
||||
selected: {if $preview}2{else}0{/if}
|
||||
{rdelim}
|
||||
);
|
||||
{rdelim});
|
||||
</script>
|
||||
<div id="editReviewFormTabs" class="pkp_controllers_tab">
|
||||
<ul>
|
||||
<li><a href="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT op="reviewFormBasics" reviewFormId=$reviewFormId}">{translate key="manager.reviewForms.edit"}</a></li>
|
||||
<li><a href="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT op="reviewFormElements" reviewFormId=$reviewFormId}">{translate key="manager.reviewFormElements"}</a></li>
|
||||
<li><a href="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT op="reviewFormPreview" reviewFormId=$reviewFormId}">{translate key="manager.reviewForms.preview"}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,65 @@
|
||||
{**
|
||||
* templates/controllers/grid/settings/roles/form/userGroupForm.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 to edit or create a user group
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {ldelim}
|
||||
// Attach the form handler.
|
||||
$('#userGroupForm').pkpHandler(
|
||||
'$.pkp.controllers.grid.settings.roles.form.UserGroupFormHandler', {ldelim}
|
||||
selfRegistrationRoleIds: {$selfRegistrationRoleIds|@json_encode},
|
||||
recommendOnlyRoleIds: {$recommendOnlyRoleIds|@json_encode},
|
||||
roleForbiddenStagesJSON: {$roleForbiddenStagesJSON},
|
||||
notChangeMetadataEditPermissionRoles: {$notChangeMetadataEditPermissionRoles|@json_encode},
|
||||
stagesSelector: '[id^="assignedStages"]'
|
||||
{rdelim});
|
||||
{rdelim});
|
||||
</script>
|
||||
|
||||
<form class="pkp_form" id="userGroupForm" method="post" action="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT component="grid.settings.roles.UserGroupGridHandler" op="updateUserGroup"}">
|
||||
{csrf}
|
||||
{include file="controllers/notification/inPlaceNotification.tpl" notificationId="userGroupFormNotification"}
|
||||
|
||||
{if $userGroupId}
|
||||
<input type="hidden" id="userGroupId" name="userGroupId" value="{$userGroupId|escape}" />
|
||||
{/if}
|
||||
{fbvFormArea id="userGroupDetails"}
|
||||
<h3>{translate key="settings.roles.roleDetails"}</h3>
|
||||
{fbvFormSection title="settings.roles.from" for="roleId" required="true"}
|
||||
{fbvElement type="select" name="roleId" from=$roleOptions id="roleId" selected=$roleId disabled=$disableRoleSelect required="true"}
|
||||
{/fbvFormSection}
|
||||
{fbvFormSection title="settings.roles.roleName" for="name" required="true"}
|
||||
{fbvElement type="text" multilingual="true" name="name" value=$name id="name" required="true"}
|
||||
{/fbvFormSection}
|
||||
{fbvFormSection title="settings.roles.roleAbbrev" for="abbrev" required="true"}
|
||||
{fbvElement type="text" multilingual="true" name="abbrev" value=$abbrev id="abbrev" required="true"}
|
||||
{/fbvFormSection}
|
||||
{/fbvFormArea}
|
||||
<div id="userGroupStageContainer" class="full left">
|
||||
{fbvFormArea id="userGroupRoles"}
|
||||
{fbvFormSection title="grid.roles.stageAssignment" for="assignedStages[]" list="true"}
|
||||
{fbvElement type="checkboxgroup" name="assignedStages" id="assignedStages" from=$stages selected=$assignedStages}
|
||||
{/fbvFormSection}
|
||||
<label for="stages[]" class="error pkp_form_hidden">{translate key="settings.roles.stageIdRequired"}</label>
|
||||
{/fbvFormArea}
|
||||
</div>
|
||||
<div id="userGroupOptionsContainer" class="full left">
|
||||
{fbvFormArea id="userGroupOptions"}
|
||||
{fbvFormSection title="settings.roles.roleOptions" list="true"}
|
||||
{fbvElement type="checkbox" name="showTitle" id="showTitle" checked=$showTitle label="settings.roles.showTitles"}
|
||||
{fbvElement type="checkbox" name="permitSelfRegistration" id="permitSelfRegistration" checked=$permitSelfRegistration label="settings.roles.permitSelfRegistration"}
|
||||
{fbvElement type="checkbox" name="recommendOnly" id="recommendOnly" checked=$recommendOnly label="settings.roles.recommendOnly"}
|
||||
{fbvElement type="checkbox" name="permitMetadataEdit" id="permitMetadataEdit" checked=$permitMetadataEdit label="settings.roles.permitMetadataEdit"}
|
||||
{/fbvFormSection}
|
||||
{/fbvFormArea}
|
||||
</div>
|
||||
|
||||
<p><span class="formRequired">{translate key="common.requiredField"}</span></p>
|
||||
{fbvFormButtons}
|
||||
</form>
|
||||
@@ -0,0 +1,24 @@
|
||||
{**
|
||||
* templates/controllers/grid/settings/roles/userGroupsGridFilter.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.
|
||||
*
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
// Attach the form handler to the form.
|
||||
$('#userGroupSearchForm').pkpHandler('$.pkp.controllers.form.ToggleFormHandler');
|
||||
</script>
|
||||
<form class="pkp_form filter" id="userGroupSearchForm" action="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT component="grid.settings.roles.UserGroupGridHandler" op="fetchGrid"}" method="post">
|
||||
{csrf}
|
||||
{fbvFormArea id="userGroupSearchFormArea"}
|
||||
{fbvFormSection description="grid.userGroup.filter.listRoles" size=$fbvStyles.size.SMALL inline=true}
|
||||
{fbvElement type="select" id="selectedStageId" from=$filterData.stageOptions selected=$filterSelectionData.selectedStageId}
|
||||
{/fbvFormSection}
|
||||
{fbvFormSection description="grid.userGroup.filter.permissionLevel" size=$fbvStyles.size.SMALL inline=true}
|
||||
{fbvElement type="select" id="selectedRoleId" from=$filterData.roleOptions selected=$filterSelectionData.selectedRoleId}
|
||||
{/fbvFormSection}
|
||||
{/fbvFormArea}
|
||||
</form>
|
||||
@@ -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