Commit 986f79eed0ceb07ef82a91c7bc9d78cf7444eb2d

Authored by Megan
1 parent 31a5b682

Added electronic signature to additional actions.

Committed by: Megan Watson
Reviewed by: Kevin Cyster
lib/templating/kt3template.inc.php
@@ -154,13 +154,20 @@ class KTPage { @@ -154,13 +154,20 @@ class KTPage {
154 // FIXME: we lost the getDefaultAction stuff - do we care? 154 // FIXME: we lost the getDefaultAction stuff - do we care?
155 // note that key == action. this is _important_, since we crossmatch the breadcrumbs against this for "active" 155 // note that key == action. this is _important_, since we crossmatch the breadcrumbs against this for "active"
156 $sBaseUrl = KTUtil::kt_url(); 156 $sBaseUrl = KTUtil::kt_url();
157 - $heading = _kt('You are attempting to access DMS Administration');  
158 157
159 $this->menu = array(); 158 $this->menu = array();
160 $this->menu['dashboard'] = array('label' => _kt("Dashboard"), 'url' => $sBaseUrl.'/dashboard.php'); 159 $this->menu['dashboard'] = array('label' => _kt("Dashboard"), 'url' => $sBaseUrl.'/dashboard.php');
161 $this->menu['browse'] = array('label' => _kt("Browse Documents"), 'url' => $sBaseUrl.'/browse.php'); 160 $this->menu['browse'] = array('label' => _kt("Browse Documents"), 'url' => $sBaseUrl.'/browse.php');
162 - $this->menu['administration'] = array('label' => _kt("DMS Administration"), 'url' => '#',  
163 - 'onclick' => "javascript: showSignatureForm('{$heading}', 'dms.administration.access', 'system', '{$sBaseUrl}/admin.php', 'redirect');"); //$sBaseUrl.'/admin.php', 161 + $this->menu['administration'] = array('label' => _kt("DMS Administration"));
  162 +
  163 + global $default;
  164 + if($default->enableESignatures){
  165 + $heading = _kt('You are attempting to access DMS Administration');
  166 + $this->menu['administration']['url'] = '#';
  167 + $this->menu['administration']['onclick'] = "javascript: showSignatureForm('{$heading}', 'dms.administration.access', 'system', '{$sBaseUrl}/admin.php', 'redirect');";
  168 + }else{
  169 + $this->menu['administration']['url'] = $sBaseUrl.'/admin.php';
  170 + }
164 } 171 }
165 172
166 173
plugins/ktcore/KTPermissions.php
@@ -6,31 +6,31 @@ @@ -6,31 +6,31 @@
6 * Document Management Made Simple 6 * Document Management Made Simple
7 * Copyright (C) 2008, 2009 KnowledgeTree Inc. 7 * Copyright (C) 2008, 2009 KnowledgeTree Inc.
8 * Portions copyright The Jam Warehouse Software (Pty) Limited 8 * Portions copyright The Jam Warehouse Software (Pty) Limited
9 - * 9 + *
10 * This program is free software; you can redistribute it and/or modify it under 10 * This program is free software; you can redistribute it and/or modify it under
11 * the terms of the GNU General Public License version 3 as published by the 11 * the terms of the GNU General Public License version 3 as published by the
12 * Free Software Foundation. 12 * Free Software Foundation.
13 - * 13 + *
14 * This program is distributed in the hope that it will be useful, but WITHOUT 14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 16 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * details. 17 * details.
18 - * 18 + *
19 * You should have received a copy of the GNU General Public License 19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>. 20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 - *  
22 - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, 21 + *
  22 + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco,
23 * California 94120-7775, or email info@knowledgetree.com. 23 * California 94120-7775, or email info@knowledgetree.com.
24 - * 24 + *
25 * The interactive user interfaces in modified source and object code versions 25 * The interactive user interfaces in modified source and object code versions
26 * of this program must display Appropriate Legal Notices, as required under 26 * of this program must display Appropriate Legal Notices, as required under
27 * Section 5 of the GNU General Public License version 3. 27 * Section 5 of the GNU General Public License version 3.
28 - * 28 + *
29 * In accordance with Section 7(b) of the GNU General Public License version 3, 29 * In accordance with Section 7(b) of the GNU General Public License version 3,
30 * these Appropriate Legal Notices must retain the display of the "Powered by 30 * these Appropriate Legal Notices must retain the display of the "Powered by
31 - * KnowledgeTree" logo and retain the original copyright notice. If the display of the 31 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
32 * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices 32 * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
33 - * must display the words "Powered by KnowledgeTree" and retain the original 33 + * must display the words "Powered by KnowledgeTree" and retain the original
34 * copyright notice. 34 * copyright notice.
35 * Contributor( s): ______________________________________ 35 * Contributor( s): ______________________________________
36 * 36 *
@@ -541,14 +541,16 @@ class KTRoleAllocationPlugin extends KTFolderAction { @@ -541,14 +541,16 @@ class KTRoleAllocationPlugin extends KTFolderAction {
541 541
542 function do_editRoleUsers() { 542 function do_editRoleUsers() {
543 543
  544 + $iFolderId = $this->oFolder->getId();
  545 +
544 $role_allocation_id = KTUtil::arrayGet($_REQUEST, 'alloc_id'); 546 $role_allocation_id = KTUtil::arrayGet($_REQUEST, 'alloc_id');
545 - if (($this->oFolder->getId() == 1) && is_null($role_allocation_id)) { 547 + if (($iFolderId == 1) && is_null($role_allocation_id)) {
546 $oRoleAllocation = $this->rootoverride($_REQUEST['role_id']); 548 $oRoleAllocation = $this->rootoverride($_REQUEST['role_id']);
547 } else { 549 } else {
548 $oRoleAllocation = RoleAllocation::get($role_allocation_id); 550 $oRoleAllocation = RoleAllocation::get($role_allocation_id);
549 } 551 }
550 if ((PEAR::isError($oRoleAllocation)) || ($oRoleAllocation=== false)) { 552 if ((PEAR::isError($oRoleAllocation)) || ($oRoleAllocation=== false)) {
551 - $this->errorRedirectToMain(_kt('No such role allocation.'), sprintf('fFolderId=%d',$this->oFolder->getId())); 553 + $this->errorRedirectToMain(_kt('No such role allocation.'), sprintf('fFolderId=%d',$iFolderId));
552 } 554 }
553 555
554 556
@@ -577,6 +579,17 @@ class KTRoleAllocationPlugin extends KTFolderAction { @@ -577,6 +579,17 @@ class KTRoleAllocationPlugin extends KTFolderAction {
577 } 579 }
578 } 580 }
579 581
  582 + // Include the electronic signature on the permissions action
  583 + global $default;
  584 + if($default->enableESignatures){
  585 + $heading = _kt('You are attempting to modify roles');
  586 + $input['type'] = 'button';
  587 + $input['onclick'] = "javascript: showSignatureForm('{$heading}', 'ktcore.transactions.roles_modify_users', 'folder', 'userroleform', 'submit', {$iFolderId});";
  588 + }else{
  589 + $input['type'] = 'submit';
  590 + $input['onclick'] = '';
  591 + }
  592 +
580 $oTemplating =& KTTemplating::getSingleton(); 593 $oTemplating =& KTTemplating::getSingleton();
581 $oTemplate = $oTemplating->loadTemplate("ktcore/folder/roles_manageusers"); 594 $oTemplate = $oTemplating->loadTemplate("ktcore/folder/roles_manageusers");
582 $aTemplateData = array( 595 $aTemplateData = array(
@@ -584,20 +597,23 @@ class KTRoleAllocationPlugin extends KTFolderAction { @@ -584,20 +597,23 @@ class KTRoleAllocationPlugin extends KTFolderAction {
584 "edit_rolealloc" => $oRoleAllocation, 597 "edit_rolealloc" => $oRoleAllocation,
585 'unused_users' => $aFreeUsers, 598 'unused_users' => $aFreeUsers,
586 'role_users' => $aRoleUsers, 599 'role_users' => $aRoleUsers,
  600 + 'input' => $input
587 ); 601 );
588 return $oTemplate->render($aTemplateData); 602 return $oTemplate->render($aTemplateData);
589 } 603 }
590 604
591 function do_editRoleGroups() { 605 function do_editRoleGroups() {
592 606
  607 + $iFolderId = $this->oFolder->getId();
  608 +
593 $role_allocation_id = KTUtil::arrayGet($_REQUEST, 'alloc_id'); 609 $role_allocation_id = KTUtil::arrayGet($_REQUEST, 'alloc_id');
594 - if (($this->oFolder->getId() == 1) && is_null($role_allocation_id)) { 610 + if (($iFolderId == 1) && is_null($role_allocation_id)) {
595 $oRoleAllocation = $this->rootoverride($_REQUEST['role_id']); 611 $oRoleAllocation = $this->rootoverride($_REQUEST['role_id']);
596 } else { 612 } else {
597 $oRoleAllocation = RoleAllocation::get($role_allocation_id); 613 $oRoleAllocation = RoleAllocation::get($role_allocation_id);
598 } 614 }
599 if ((PEAR::isError($oRoleAllocation)) || ($oRoleAllocation=== false)) { 615 if ((PEAR::isError($oRoleAllocation)) || ($oRoleAllocation=== false)) {
600 - $this->errorRedirectToMain(_kt('No such role allocation.'), sprintf('fFolderId=%d',$this->oFolder->getId())); 616 + $this->errorRedirectToMain(_kt('No such role allocation.'), sprintf('fFolderId=%d',$iFolderId));
601 } 617 }
602 618
603 $oRole = Role::get($oRoleAllocation->getRoleId()); 619 $oRole = Role::get($oRoleAllocation->getRoleId());
@@ -627,7 +643,16 @@ class KTRoleAllocationPlugin extends KTFolderAction { @@ -627,7 +643,16 @@ class KTRoleAllocationPlugin extends KTFolderAction {
627 } 643 }
628 } 644 }
629 645
630 - 646 + // Include the electronic signature on the permissions action
  647 + global $default;
  648 + if($default->enableESignatures){
  649 + $heading = _kt('You are attempting to modify roles');
  650 + $input['type'] = 'button';
  651 + $input['onclick'] = "javascript: showSignatureForm('{$heading}', 'ktcore.transactions.roles_modify_groups', 'folder', 'grouproleform', 'submit', {$iFolderId});";
  652 + }else{
  653 + $input['type'] = 'submit';
  654 + $input['onclick'] = '';
  655 + }
631 656
632 $oTemplating =& KTTemplating::getSingleton(); 657 $oTemplating =& KTTemplating::getSingleton();
633 $oTemplate = $oTemplating->loadTemplate("ktcore/folder/roles_managegroups"); 658 $oTemplate = $oTemplating->loadTemplate("ktcore/folder/roles_managegroups");
@@ -637,6 +662,7 @@ class KTRoleAllocationPlugin extends KTFolderAction { @@ -637,6 +662,7 @@ class KTRoleAllocationPlugin extends KTFolderAction {
637 'unused_groups' => $aFreeUsers, 662 'unused_groups' => $aFreeUsers,
638 'role_groups' => $aRoleUsers, 663 'role_groups' => $aRoleUsers,
639 'rolename' => $oRole->getName(), 664 'rolename' => $oRole->getName(),
  665 + 'input' => $input
640 ); 666 );
641 return $oTemplate->render($aTemplateData); 667 return $oTemplate->render($aTemplateData);
642 } 668 }
plugins/ktcore/folder/Permissions.php
@@ -274,10 +274,11 @@ class KTFolderPermissionsAction extends KTFolderAction { @@ -274,10 +274,11 @@ class KTFolderPermissionsAction extends KTFolderAction {
274 274
275 function do_edit() { 275 function do_edit() {
276 $this->oPage->setBreadcrumbDetails(_kt('Viewing Permissions')); 276 $this->oPage->setBreadcrumbDetails(_kt('Viewing Permissions'));
  277 + $iFolderId = $this->oFolder->getId();
277 278
278 279
279 $oPO = KTPermissionObject::get($this->oFolder->getPermissionObjectId()); 280 $oPO = KTPermissionObject::get($this->oFolder->getPermissionObjectId());
280 - $aOptions = array('redirect_to' => array('main', 'fFolderId=' . $this->oFolder->getId())); 281 + $aOptions = array('redirect_to' => array('main', 'fFolderId=' . $iFolderId));
281 282
282 if (!KTBrowseUtil::inAdminMode($this->oUser, $this->oFolder)) { 283 if (!KTBrowseUtil::inAdminMode($this->oUser, $this->oFolder)) {
283 $this->oValidator->userHasPermissionOnItem($this->oUser, $this->_sEditShowPermission, $this->oFolder, $aOptions); 284 $this->oValidator->userHasPermissionOnItem($this->oUser, $this->_sEditShowPermission, $this->oFolder, $aOptions);
@@ -285,10 +286,10 @@ class KTFolderPermissionsAction extends KTFolderAction { @@ -285,10 +286,10 @@ class KTFolderPermissionsAction extends KTFolderAction {
285 286
286 // copy permissions if they were inherited 287 // copy permissions if they were inherited
287 $oInherited = KTPermissionUtil::findRootObjectForPermissionObject($oPO); 288 $oInherited = KTPermissionUtil::findRootObjectForPermissionObject($oPO);
288 - if ($oInherited->getId() !== $this->oFolder->getId()) { 289 + if ($oInherited->getId() !== $iFolderId) {
289 $override = KTUtil::arrayGet($_REQUEST, 'override', false); 290 $override = KTUtil::arrayGet($_REQUEST, 'override', false);
290 if (empty($override)) { 291 if (empty($override)) {
291 - $this->errorRedirectToMain(_kt('This folder does not override its permissions'), sprintf('fFolderId=%d', $this->oFolder->getId())); 292 + $this->errorRedirectToMain(_kt('This folder does not override its permissions'), sprintf('fFolderId=%d', $iFolderId));
292 } 293 }
293 $this->startTransaction(); 294 $this->startTransaction();
294 $this->_copyPermissions(); 295 $this->_copyPermissions();
@@ -314,13 +315,23 @@ class KTFolderPermissionsAction extends KTFolderAction { @@ -314,13 +315,23 @@ class KTFolderPermissionsAction extends KTFolderAction {
314 $oTemplating =& KTTemplating::getSingleton(); 315 $oTemplating =& KTTemplating::getSingleton();
315 $oTemplate = $oTemplating->loadTemplate('ktcore/folder/permissions'); 316 $oTemplate = $oTemplating->loadTemplate('ktcore/folder/permissions');
316 317
317 - $bCanInherit = ($this->oFolder->getId() != 1); 318 + $bCanInherit = ($iFolderId != 1);
  319 +
  320 + global $default;
  321 + if($default->enableESignatures){
  322 + $heading = _kt('You are attempting to modify permissions');
  323 + $input['type'] = 'button';
  324 + $input['onclick'] = "javascript: showSignatureForm('{$heading}', 'ktcore.transactions.permissions_change', 'folder', 'update_permissions_form', 'submit', {$iFolderId});";
  325 + }else{
  326 + $input['type'] = 'submit';
  327 + $input['onclick'] = '';
  328 + }
318 329
319 $perms = $aPermList; 330 $perms = $aPermList;
320 $docperms = KTPermission::getDocumentRelevantList(); 331 $docperms = KTPermission::getDocumentRelevantList();
321 332
322 $aTemplateData = array( 333 $aTemplateData = array(
323 - 'iFolderId' => $this->oFolder->getId(), 334 + 'iFolderId' => $iFolderId,
324 'roles' => Role::getList(), 335 'roles' => Role::getList(),
325 'groups' => Group::getList(), 336 'groups' => Group::getList(),
326 'conditions' => KTSavedSearch::getConditions(), 337 'conditions' => KTSavedSearch::getConditions(),
@@ -331,7 +342,8 @@ class KTFolderPermissionsAction extends KTFolderAction { @@ -331,7 +342,8 @@ class KTFolderPermissionsAction extends KTFolderAction {
331 'edit' => true, 342 'edit' => true,
332 'permissions' => $perms, 343 'permissions' => $perms,
333 'document_permissions' => $docperms, 344 'document_permissions' => $docperms,
334 - 'can_inherit' => $bCanInherit 345 + 'can_inherit' => $bCanInherit,
  346 + 'input' => $input
335 ); 347 );
336 return $oTemplate->render($aTemplateData); 348 return $oTemplate->render($aTemplateData);
337 } 349 }
plugins/ktcore/folder/Rename.php
@@ -6,31 +6,31 @@ @@ -6,31 +6,31 @@
6 * Document Management Made Simple 6 * Document Management Made Simple
7 * Copyright (C) 2008, 2009 KnowledgeTree Inc. 7 * Copyright (C) 2008, 2009 KnowledgeTree Inc.
8 * Portions copyright The Jam Warehouse Software (Pty) Limited 8 * Portions copyright The Jam Warehouse Software (Pty) Limited
9 - * 9 + *
10 * This program is free software; you can redistribute it and/or modify it under 10 * This program is free software; you can redistribute it and/or modify it under
11 * the terms of the GNU General Public License version 3 as published by the 11 * the terms of the GNU General Public License version 3 as published by the
12 * Free Software Foundation. 12 * Free Software Foundation.
13 - * 13 + *
14 * This program is distributed in the hope that it will be useful, but WITHOUT 14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 16 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * details. 17 * details.
18 - * 18 + *
19 * You should have received a copy of the GNU General Public License 19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>. 20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 - *  
22 - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, 21 + *
  22 + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco,
23 * California 94120-7775, or email info@knowledgetree.com. 23 * California 94120-7775, or email info@knowledgetree.com.
24 - * 24 + *
25 * The interactive user interfaces in modified source and object code versions 25 * The interactive user interfaces in modified source and object code versions
26 * of this program must display Appropriate Legal Notices, as required under 26 * of this program must display Appropriate Legal Notices, as required under
27 * Section 5 of the GNU General Public License version 3. 27 * Section 5 of the GNU General Public License version 3.
28 - * 28 + *
29 * In accordance with Section 7(b) of the GNU General Public License version 3, 29 * In accordance with Section 7(b) of the GNU General Public License version 3,
30 * these Appropriate Legal Notices must retain the display of the "Powered by 30 * these Appropriate Legal Notices must retain the display of the "Powered by
31 - * KnowledgeTree" logo and retain the original copyright notice. If the display of the 31 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
32 * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices 32 * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
33 - * must display the words "Powered by KnowledgeTree" and retain the original 33 + * must display the words "Powered by KnowledgeTree" and retain the original
34 * copyright notice. 34 * copyright notice.
35 * Contributor( s): ______________________________________ 35 * Contributor( s): ______________________________________
36 * 36 *
@@ -51,7 +51,7 @@ class KTFolderRenameAction extends KTFolderAction { @@ -51,7 +51,7 @@ class KTFolderRenameAction extends KTFolderAction {
51 function getDisplayName() { 51 function getDisplayName() {
52 return _kt('Rename'); 52 return _kt('Rename');
53 } 53 }
54 - 54 +
55 function getInfo() { 55 function getInfo() {
56 return parent::getInfo(); 56 return parent::getInfo();
57 } 57 }
@@ -63,10 +63,21 @@ class KTFolderRenameAction extends KTFolderAction { @@ -63,10 +63,21 @@ class KTFolderRenameAction extends KTFolderAction {
63 63
64 $fields = array(); 64 $fields = array();
65 $fields[] = new KTStringWidget(_kt('New folder name'), _kt('The name to which the current folder should be renamed.'), 'foldername', $this->oFolder->getName(), $this->oPage, true); 65 $fields[] = new KTStringWidget(_kt('New folder name'), _kt('The name to which the current folder should be renamed.'), 'foldername', $this->oFolder->getName(), $this->oPage, true);
66 - 66 +
  67 + global $default;
  68 + if($default->enableESignatures){
  69 + $heading = _kt('You are attempting to rename a folder');
  70 + $input['onclick'] = "javascript: showSignatureForm('{$heading}', 'ktcore.transactions.rename', 'folder', 'rename_folder_form', 'submit', {$this->oFolder->getId()});";
  71 + $input['type'] = 'button';
  72 + }else{
  73 + $input['onclick'] = '';
  74 + $input['type'] = 'submit';
  75 + }
  76 +
67 $oTemplate->setData(array( 77 $oTemplate->setData(array(
68 'context' => &$this, 78 'context' => &$this,
69 'fields' => $fields, 79 'fields' => $fields,
  80 + 'input' => $input,
70 'folderName' => $this->oFolder->getName(), 81 'folderName' => $this->oFolder->getName(),
71 )); 82 ));
72 return $oTemplate->render(); 83 return $oTemplate->render();
plugins/ktstandard/KTElectronicSignatures.php
@@ -113,7 +113,8 @@ class KTElectronicSignatures @@ -113,7 +113,8 @@ class KTElectronicSignatures
113 } 113 }
114 114
115 if($this->lock){ 115 if($this->lock){
116 - return $this->eSignature->getLockMsg(); 116 + $this->error = $this->eSignature->getLockMsg();
  117 + return $this->getError();
117 } 118 }
118 return $oTemplate->render($aTemplateData); 119 return $oTemplate->render($aTemplateData);
119 } 120 }
@@ -147,7 +148,7 @@ class KTElectronicSignatures @@ -147,7 +148,7 @@ class KTElectronicSignatures
147 */ 148 */
148 public function getError() 149 public function getError()
149 { 150 {
150 - return $this->error; 151 + return '<div class="error">'.$this->error.'</div>';
151 } 152 }
152 153
153 /** 154 /**
resources/css/kt-framing.css
@@ -2348,7 +2348,7 @@ body #content #add_dashlet @@ -2348,7 +2348,7 @@ body #content #add_dashlet
2348 color: #666; 2348 color: #666;
2349 } 2349 }
2350 2350
2351 -#sign_here #form_actions a { 2351 +#sign_here .form_actions a {
2352 border: 1px solid #ccc; 2352 border: 1px solid #ccc;
2353 background: #fdfdfd; 2353 background: #fdfdfd;
2354 color: #333; 2354 color: #333;
@@ -2358,6 +2358,17 @@ body #content #add_dashlet @@ -2358,6 +2358,17 @@ body #content #add_dashlet
2358 text-decoration: none; 2358 text-decoration: none;
2359 } 2359 }
2360 2360
  2361 +#sign_here .error {
  2362 + padding: 0.5em 1em;
  2363 + border: 1px solid #ffc21e;
  2364 + margin-bottom: 10px;
  2365 + padding-left: 25px;
  2366 +}
  2367 +
  2368 +#sign_here .error {
  2369 + background: #ffdd80 url(../../thirdparty/icon-theme/16x16/status/dialog-warning.gif) 2px center no-repeat;
  2370 +}
  2371 +
2361 .x-window-tl .x-window-header { 2372 .x-window-tl .x-window-header {
2362 color: #FFF; 2373 color: #FFF;
2363 } 2374 }
resources/js/signature.js
@@ -29,7 +29,7 @@ var showSignatureForm = function(head, action, type, request, request_type, deta @@ -29,7 +29,7 @@ var showSignatureForm = function(head, action, type, request, request_type, deta
29 applyTo : 'signature', 29 applyTo : 'signature',
30 layout : 'fit', 30 layout : 'fit',
31 width : 360, 31 width : 360,
32 - height : 265, 32 + height : 310,
33 closeAction :'destroy', 33 closeAction :'destroy',
34 y : 150, 34 y : 150,
35 shadow: false, 35 shadow: false,
@@ -50,6 +50,7 @@ var showSignatureForm = function(head, action, type, request, request_type, deta @@ -50,6 +50,7 @@ var showSignatureForm = function(head, action, type, request, request_type, deta
50 }else{ 50 }else{
51 window.document.forms[this.request].submit(); 51 window.document.forms[this.request].submit();
52 } 52 }
  53 + return;
53 } 54 }
54 info.innerHTML = response.responseText; 55 info.innerHTML = response.responseText;
55 }, 56 },
@@ -107,6 +108,7 @@ var submitForm = function() { @@ -107,6 +108,7 @@ var submitForm = function() {
107 }else{ 108 }else{
108 window.document.forms[this.request].submit(); 109 window.document.forms[this.request].submit();
109 } 110 }
  111 + return;
110 } 112 }
111 113
112 info.innerHTML = response.responseText; 114 info.innerHTML = response.responseText;
templates/ktcore/folder/permissions.smarty
@@ -84,8 +84,7 @@ @@ -84,8 +84,7 @@
84 <input type="hidden" name="action" value="update"> 84 <input type="hidden" name="action" value="update">
85 <input type="hidden" name="fFolderId" value="{$iFolderId}"> 85 <input type="hidden" name="fFolderId" value="{$iFolderId}">
86 <div id="submitButtons" class="form_actions"> 86 <div id="submitButtons" class="form_actions">
87 - <input type="button" value="{i18n}Update Permission Assignments{/i18n}"  
88 - onclick="javascript: showSignatureForm('{i18n}You are attempting to modify permissions{/i18n}', 'ktcore.transactions.permissions_change', 'folder', 'update_permissions_form', 'submit', {$iFolderId});" /> 87 + <input type="{$input.type}" value="{i18n}Update Permission Assignments{/i18n}" onclick="{$input.onclick}" />
89 <input type="submit" name="kt_cancel[{addQS}fFolderId={$iFolderId}{/addQS}]" value="{i18n}Cancel{/i18n}" /> 88 <input type="submit" name="kt_cancel[{addQS}fFolderId={$iFolderId}{/addQS}]" value="{i18n}Cancel{/i18n}" />
90 {/if} 89 {/if}
91 </div> 90 </div>
templates/ktcore/folder/rename.smarty
@@ -14,14 +14,9 @@ folder.{/i18n}&lt;/p&gt; @@ -14,14 +14,9 @@ folder.{/i18n}&lt;/p&gt;
14 {$oWidget->render()} 14 {$oWidget->render()}
15 {/foreach} 15 {/foreach}
16 <div class="form_actions"> 16 <div class="form_actions">
17 -<input type="button" name="btn_submit" value="{i18n}Rename{/i18n}"  
18 - onclick="javascript: showSignatureForm('{i18n}You are attempting to rename a folder{/i18n}', 'ktcore.transactions.rename', 'folder', 'rename_folder_form', 'submit', {$iFolderId});" /> 17 +<input type="{$input.type}" name="btn_submit" value="{i18n}Rename{/i18n}" onclick="{$input.onclick}" />
19 18
20 <input type="submit" name="kt_cancel[{$link}]" value="{i18n}Cancel{/i18n}" /> 19 <input type="submit" name="kt_cancel[{$link}]" value="{i18n}Cancel{/i18n}" />
21 </div> 20 </div>
22 </fieldset> 21 </fieldset>
23 </form> 22 </form>
24 -  
25 -  
26 -<!-- onclick="javascript: showSignatureForm('rename_folder_form');"  
27 --->  
templates/ktcore/folder/roles_managegroups.smarty
@@ -4,15 +4,15 @@ @@ -4,15 +4,15 @@
4 4
5 <p class="descriptiveText">{i18n}Groups must be allocated to roles to ensure that the workflow transition this role is supposed to support can be acted upon by a user.{/i18n}</p> 5 <p class="descriptiveText">{i18n}Groups must be allocated to roles to ensure that the workflow transition this role is supposed to support can be acted upon by a user.{/i18n}</p>
6 6
7 -<form action="{$smarty.server.PHP_SELF}" method="POST" id="grouproleform"> 7 +<form action="{$smarty.server.PHP_SELF}" method="POST" id="grouproleform" name="grouproleform">
8 <input type="hidden" name="action" value="setRoleGroups" /> 8 <input type="hidden" name="action" value="setRoleGroups" />
9 <input type="hidden" name="allocation_id" value="{$edit_rolealloc->getId()}" /> 9 <input type="hidden" name="allocation_id" value="{$edit_rolealloc->getId()}" />
10 <input type="hidden" name="fFolderId" value="{$context->oFolder->getId()}" /> 10 <input type="hidden" name="fFolderId" value="{$context->oFolder->getId()}" />
11 <!-- erk. FIXME clean up and remove OptionTransfer.js. --> 11 <!-- erk. FIXME clean up and remove OptionTransfer.js. -->
12 - 12 +
13 <input type="hidden" name="groupFinal" /> 13 <input type="hidden" name="groupFinal" />
14 -  
15 - 14 +
  15 +
16 <fieldset> 16 <fieldset>
17 <legend>{i18n}Allocate Groups{/i18n}</legend> 17 <legend>{i18n}Allocate Groups{/i18n}</legend>
18 <p class="descriptiveText">{i18n}Select the groups which should be part of this role.{/i18n}</p> 18 <p class="descriptiveText">{i18n}Select the groups which should be part of this role.{/i18n}</p>
@@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
58 </tbody></table> 58 </tbody></table>
59 59
60 <div class="form_actions"> 60 <div class="form_actions">
61 - <input type="submit" value="{i18n}save changes{/i18n}" /> 61 + <input type="{$input.type}" value="{i18n}save changes{/i18n}" onclick="{$input.onclick}" />
62 {capture assign=link}{addQS}fFolderId={$context->oFolder->getId()}{/addQS}{/capture} 62 {capture assign=link}{addQS}fFolderId={$context->oFolder->getId()}{/addQS}{/capture}
63 <input type="submit" name="kt_cancel[{$link}]" value="{i18n}Cancel{/i18n}" /> 63 <input type="submit" name="kt_cancel[{$link}]" value="{i18n}Cancel{/i18n}" />
64 </div> 64 </div>
templates/ktcore/folder/roles_manageusers.smarty
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 4
5 <p class="descriptiveText">{i18n}Add or remove users for this role. {/i18n}</p> 5 <p class="descriptiveText">{i18n}Add or remove users for this role. {/i18n}</p>
6 6
7 -<form action="{$smarty.server.PHP_SELF}" method="POST" id="userroleform"> 7 +<form action="{$smarty.server.PHP_SELF}" method="POST" id="userroleform" name="userroleform">
8 <input type="hidden" name="action" value="setRoleUsers" /> 8 <input type="hidden" name="action" value="setRoleUsers" />
9 <input type="hidden" name="allocation_id" value="{$edit_rolealloc->getId()}" /> 9 <input type="hidden" name="allocation_id" value="{$edit_rolealloc->getId()}" />
10 <input type="hidden" name="fFolderId" value="{$context->oFolder->getId()}" /> 10 <input type="hidden" name="fFolderId" value="{$context->oFolder->getId()}" />
@@ -63,7 +63,7 @@ Use the Ctrl key to multi-select user names.{/i18n}&lt;/p&gt; @@ -63,7 +63,7 @@ Use the Ctrl key to multi-select user names.{/i18n}&lt;/p&gt;
63 </tbody></table> 63 </tbody></table>
64 64
65 <div class="form_actions"> 65 <div class="form_actions">
66 - <input type="submit" value="{i18n}save changes{/i18n}" /> 66 + <input type="{$input.type}" value="{i18n}save changes{/i18n}" onclick="{$input.onclick}" />
67 {capture assign=link}{addQS}fFolderId={$context->oFolder->getId()}{/addQS}{/capture} 67 {capture assign=link}{addQS}fFolderId={$context->oFolder->getId()}{/addQS}{/capture}
68 <input type="submit" name="kt_cancel[{$link}]" value="{i18n}Cancel{/i18n}" /> 68 <input type="submit" name="kt_cancel[{$link}]" value="{i18n}Cancel{/i18n}" />
69 </div> 69 </div>
templates/ktstandard/signatures/signature_form.smarty
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 <input id="sign_comment" type="text" /> 22 <input id="sign_comment" type="text" />
23 </p> 23 </p>
24 24
25 -<div id="form_actions"> 25 +<div class="form_actions">
26 26
27 <a href="#" onclick="javascript: submitForm();">{i18n}OK{/i18n}</a>&nbsp; 27 <a href="#" onclick="javascript: submitForm();">{i18n}OK{/i18n}</a>&nbsp;
28 <a href="#" onclick="javascript: panel_close();">{i18n}Cancel{/i18n}</a> 28 <a href="#" onclick="javascript: panel_close();">{i18n}Cancel{/i18n}</a>