From 4310d658a1a2607c8b0380f825226a6e36497b13 Mon Sep 17 00:00:00 2001
From: Kevin Thorne <kevin@enhancesoft.com>
Date: Tue, 25 Oct 2016 09:13:13 +0000
Subject: [PATCH] Loading overlay

Use class instead of id on form element that triggers overlay on submit.
---
 include/staff/apikey.inc.php               | 2 +-
 include/staff/banrule.inc.php              | 2 +-
 include/staff/cannedresponse.inc.php       | 2 +-
 include/staff/category.inc.php             | 2 +-
 include/staff/department.inc.php           | 2 +-
 include/staff/dynamic-form.inc.php         | 2 +-
 include/staff/dynamic-list.inc.php         | 4 ++--
 include/staff/email.inc.php                | 2 +-
 include/staff/faq.inc.php                  | 2 +-
 include/staff/filter.inc.php               | 2 +-
 include/staff/helptopic.inc.php            | 2 +-
 include/staff/page.inc.php                 | 2 +-
 include/staff/plugin.inc.php               | 2 +-
 include/staff/profile.inc.php              | 2 +-
 include/staff/role.inc.php                 | 2 +-
 include/staff/settings-agents.inc.php      | 2 +-
 include/staff/settings-emails.inc.php      | 2 +-
 include/staff/settings-kb.inc.php          | 2 +-
 include/staff/settings-pages.inc.php       | 2 +-
 include/staff/settings-system.inc.php      | 2 +-
 include/staff/settings-tasks.inc.php       | 2 +-
 include/staff/settings-tickets.inc.php     | 2 +-
 include/staff/settings-users.inc.php       | 2 +-
 include/staff/slaplan.inc.php              | 2 +-
 include/staff/staff.inc.php                | 2 +-
 include/staff/team.inc.php                 | 2 +-
 include/staff/template.inc.php             | 2 +-
 include/staff/templates/task-view.tmpl.php | 4 ++--
 include/staff/ticket-edit.inc.php          | 2 +-
 include/staff/ticket-open.inc.php          | 2 +-
 include/staff/tpl.inc.php                  | 2 +-
 scp/emailtest.php                          | 2 +-
 scp/js/scp.js                              | 6 +++---
 33 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/include/staff/apikey.inc.php b/include/staff/apikey.inc.php
index c3b41fb0c..c7da2e8e9 100644
--- a/include/staff/apikey.inc.php
+++ b/include/staff/apikey.inc.php
@@ -17,7 +17,7 @@ if($api && $_REQUEST['a']!='add'){
 }
 $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
 ?>
-<form action="apikeys.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
+<form action="apikeys.php?<?php echo Http::build_query($qs); ?>" method="post" class="save">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
diff --git a/include/staff/banrule.inc.php b/include/staff/banrule.inc.php
index 6b4b5cea1..ad8c69b81 100644
--- a/include/staff/banrule.inc.php
+++ b/include/staff/banrule.inc.php
@@ -19,7 +19,7 @@ if($rule && $_REQUEST['a']!='add'){
 
 $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
 ?>
-<form action="banlist.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
+<form action="banlist.php?<?php echo Http::build_query($qs); ?>" method="post" class="save">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
diff --git a/include/staff/cannedresponse.inc.php b/include/staff/cannedresponse.inc.php
index 0dabac6fd..20818d994 100644
--- a/include/staff/cannedresponse.inc.php
+++ b/include/staff/cannedresponse.inc.php
@@ -21,7 +21,7 @@ if($canned && $_REQUEST['a']!='add'){
 $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
 
 ?>
-<form action="canned.php?<?php echo Http::build_query($qs); ?>" method="post" id="save" enctype="multipart/form-data">
+<form action="canned.php?<?php echo Http::build_query($qs); ?>" method="post" class="save" enctype="multipart/form-data">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
diff --git a/include/staff/category.inc.php b/include/staff/category.inc.php
index ddfceba06..4eac20421 100644
--- a/include/staff/category.inc.php
+++ b/include/staff/category.inc.php
@@ -36,7 +36,7 @@ if($category && $_REQUEST['a']!='add'){
 $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
 
 ?>
-<form action="categories.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
+<form action="categories.php?<?php echo Http::build_query($qs); ?>" method="post" class="save">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
diff --git a/include/staff/department.inc.php b/include/staff/department.inc.php
index 865bcbb3d..b1eb9b323 100644
--- a/include/staff/department.inc.php
+++ b/include/staff/department.inc.php
@@ -26,7 +26,7 @@ if($dept && $_REQUEST['a']!='add') {
 
 $info = Format::htmlchars(($errors && $_POST) ? $_POST : $info);
 ?>
-<form action="departments.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
+<form action="departments.php?<?php echo Http::build_query($qs); ?>" method="post" class="save">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
diff --git a/include/staff/dynamic-form.inc.php b/include/staff/dynamic-form.inc.php
index 775e05879..563766f02 100644
--- a/include/staff/dynamic-form.inc.php
+++ b/include/staff/dynamic-form.inc.php
@@ -31,7 +31,7 @@ if($form && $_REQUEST['a']!='add') {
 $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
 
 ?>
-<form class="manage-form" action="<?php echo $url ?>" method="post" id="save">
+<form class="manage-form" action="<?php echo $url ?>" method="post" class="save">
     <?php csrf_token(); ?>
     <input type="hidden" name="do" value="<?php echo $action; ?>">
     <input type="hidden" name="a" value="<?php echo $action; ?>">
diff --git a/include/staff/dynamic-list.inc.php b/include/staff/dynamic-list.inc.php
index a71079656..8fb39d2cf 100644
--- a/include/staff/dynamic-list.inc.php
+++ b/include/staff/dynamic-list.inc.php
@@ -19,7 +19,7 @@ if ($list) {
 $info=Format::htmlchars(($errors && $_POST) ? array_merge($info,$_POST) : $info);
 
 ?>
-<form action="" method="post" id="save">
+<form action="" method="post" class="save">
     <?php csrf_token(); ?>
     <input type="hidden" name="do" value="<?php echo $action; ?>">
     <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
@@ -257,7 +257,7 @@ $(function() {
     $('#items').on('click', 'a.items-action', function(e) {
         e.preventDefault();
         var ids = [];
-        $('form#save :checkbox.mass:checked').each(function() {
+        $('form.save :checkbox.mass:checked').each(function() {
             ids.push($(this).val());
         });
         if (ids.length && confirm(__('You sure?'))) {
diff --git a/include/staff/email.inc.php b/include/staff/email.inc.php
index e46bcd643..77015e85a 100644
--- a/include/staff/email.inc.php
+++ b/include/staff/email.inc.php
@@ -39,7 +39,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
     — <?php echo $info['email']; ?></small>
     <?php } ?>
 </h2>
-<form action="emails.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
+<form action="emails.php?<?php echo Http::build_query($qs); ?>" method="post" class="save">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
diff --git a/include/staff/faq.inc.php b/include/staff/faq.inc.php
index 500e1132e..116bdad86 100644
--- a/include/staff/faq.inc.php
+++ b/include/staff/faq.inc.php
@@ -41,7 +41,7 @@ if($faq){
 $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
 $qstr = Http::build_query($qs);
 ?>
-<form action="faq.php?<?php echo $qstr; ?>" method="post" id="save" enctype="multipart/form-data">
+<form action="faq.php?<?php echo $qstr; ?>" method="post" class="save" enctype="multipart/form-data">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
diff --git a/include/staff/filter.inc.php b/include/staff/filter.inc.php
index b216779ac..942b2e337 100644
--- a/include/staff/filter.inc.php
+++ b/include/staff/filter.inc.php
@@ -23,7 +23,7 @@ if($filter && $_REQUEST['a']!='add'){
 }
 $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
 ?>
-<form action="filters.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
+<form action="filters.php?<?php echo Http::build_query($qs); ?>" method="post" class="save">
     <?php csrf_token(); ?>
     <input type="hidden" name="do" value="<?php echo $action; ?>">
     <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
diff --git a/include/staff/helptopic.inc.php b/include/staff/helptopic.inc.php
index a5a2c3180..8cb90850d 100644
--- a/include/staff/helptopic.inc.php
+++ b/include/staff/helptopic.inc.php
@@ -35,7 +35,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
     <li><a href="#forms"><i class="icon-paste"></i> <?php echo __('Forms'); ?></a></li>
 </ul>
 
-<form action="helptopics.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
+<form action="helptopics.php?<?php echo Http::build_query($qs); ?>" method="post" class="save">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
diff --git a/include/staff/page.inc.php b/include/staff/page.inc.php
index 97cb838e5..6ecd1e443 100644
--- a/include/staff/page.inc.php
+++ b/include/staff/page.inc.php
@@ -37,7 +37,7 @@ if($page && $_REQUEST['a']!='add'){
 }
 $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
 ?>
-<form action="pages.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
+<form action="pages.php?<?php echo Http::build_query($qs); ?>" method="post" class="save">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
diff --git a/include/staff/plugin.inc.php b/include/staff/plugin.inc.php
index 6ab5b3c28..5f9c35416 100644
--- a/include/staff/plugin.inc.php
+++ b/include/staff/plugin.inc.php
@@ -18,7 +18,7 @@ if($plugin && $_REQUEST['a']!='add') {
 $info = Format::htmlchars(($errors && $_POST) ? $_POST : $info);
 ?>
 
-<form action="?<?php echo Http::build_query(array('id' => $_REQUEST['id'])); ?>" method="post" id="save">
+<form action="?<?php echo Http::build_query(array('id' => $_REQUEST['id'])); ?>" method="post" class="save">
     <?php csrf_token(); ?>
     <input type="hidden" name="do" value="<?php echo $action; ?>">
     <input type="hidden" name="id" value="<?php echo $info['id']; ?>">
diff --git a/include/staff/profile.inc.php b/include/staff/profile.inc.php
index 5383a8c98..627842f69 100644
--- a/include/staff/profile.inc.php
+++ b/include/staff/profile.inc.php
@@ -2,7 +2,7 @@
 if(!defined('OSTSTAFFINC') || !$staff || !$thisstaff) die('Access Denied');
 ?>
 
-<form action="profile.php" method="post" id="save" autocomplete="off">
+<form action="profile.php" method="post" class="save" autocomplete="off">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="update">
  <input type="hidden" name="id" value="<?php echo $staff->getId(); ?>">
diff --git a/include/staff/role.inc.php b/include/staff/role.inc.php
index 9d82a8a31..5f05c6d79 100644
--- a/include/staff/role.inc.php
+++ b/include/staff/role.inc.php
@@ -18,7 +18,7 @@ if ($role) {
 $info = Format::htmlchars(($errors && $_POST) ? array_merge($info, $_POST) : $info);
 
 ?>
-<form action="" method="post" id="save">
+<form action="" method="post" class="save">
     <?php csrf_token(); ?>
     <input type="hidden" name="do" value="<?php echo $action; ?>">
     <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
diff --git a/include/staff/settings-agents.inc.php b/include/staff/settings-agents.inc.php
index 2a06676f0..310a6fbfc 100644
--- a/include/staff/settings-agents.inc.php
+++ b/include/staff/settings-agents.inc.php
@@ -3,7 +3,7 @@ if (!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config
 
 ?>
 <h2><?php echo __('Agents Settings'); ?></h2>
-<form action="settings.php?t=agents" method="post" id="save">
+<form action="settings.php?t=agents" method="post" class="save">
     <?php csrf_token(); ?>
     <input type="hidden" name="t" value="agents" >
     <ul class="tabs" id="agents-tabs">
diff --git a/include/staff/settings-emails.inc.php b/include/staff/settings-emails.inc.php
index d84fdd63b..784e519a7 100644
--- a/include/staff/settings-emails.inc.php
+++ b/include/staff/settings-emails.inc.php
@@ -2,7 +2,7 @@
 if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) die('Access Denied');
 ?>
 <h2><?php echo __('Email Settings and Options');?></h2>
-<form action="emailsettings.php" method="post" id="save">
+<form action="emailsettings.php" method="post" class="save">
 <?php csrf_token(); ?>
 <input type="hidden" name="t" value="emails" >
 <table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
diff --git a/include/staff/settings-kb.inc.php b/include/staff/settings-kb.inc.php
index 2f7fa6762..0fe2de9d2 100644
--- a/include/staff/settings-kb.inc.php
+++ b/include/staff/settings-kb.inc.php
@@ -2,7 +2,7 @@
 if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) die('Access Denied');
 ?>
 <h2><?php echo __('Knowledge Base Settings and Options');?></h2>
-<form action="settings.php?t=kb" method="post" id="save">
+<form action="settings.php?t=kb" method="post" class="save">
 <?php csrf_token(); ?>
 <input type="hidden" name="t" value="kb" >
 <table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
diff --git a/include/staff/settings-pages.inc.php b/include/staff/settings-pages.inc.php
index f37020003..e7f37590e 100644
--- a/include/staff/settings-pages.inc.php
+++ b/include/staff/settings-pages.inc.php
@@ -3,7 +3,7 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config)
 $pages = Page::getPages();
 ?>
 <h2><?php echo __('Company Profile'); ?></h2>
-<form action="settings.php?t=pages" method="post" id="save"
+<form action="settings.php?t=pages" method="post" class="save"
     enctype="multipart/form-data">
 <?php csrf_token(); ?>
 
diff --git a/include/staff/settings-system.inc.php b/include/staff/settings-system.inc.php
index 6d0364220..22502ed5e 100644
--- a/include/staff/settings-system.inc.php
+++ b/include/staff/settings-system.inc.php
@@ -4,7 +4,7 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config)
 $gmtime = Misc::gmtime();
 ?>
 <h2><?php echo __('System Settings and Preferences');?> <small>— <span class="ltr">osTicket (<?php echo $cfg->getVersion(); ?>)</span></small></h2>
-<form action="settings.php?t=system" method="post" id="save">
+<form action="settings.php?t=system" method="post" class="save">
 <?php csrf_token(); ?>
 <input type="hidden" name="t" value="system" >
 <table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
diff --git a/include/staff/settings-tasks.inc.php b/include/staff/settings-tasks.inc.php
index e06a96b5d..d5a51f034 100644
--- a/include/staff/settings-tasks.inc.php
+++ b/include/staff/settings-tasks.inc.php
@@ -4,7 +4,7 @@ if(!($maxfileuploads=ini_get('max_file_uploads')))
     $maxfileuploads=DEFAULT_MAX_FILE_UPLOADS;
 ?>
 <h2><?php echo __('Task Settings and Options');?></h2>
-<form action="settings.php?t=tasks" method="post" id="save">
+<form action="settings.php?t=tasks" method="post" class="save">
 <?php csrf_token(); ?>
 <input type="hidden" name="t" value="tasks" >
 
diff --git a/include/staff/settings-tickets.inc.php b/include/staff/settings-tickets.inc.php
index 59570b442..8ec825031 100644
--- a/include/staff/settings-tickets.inc.php
+++ b/include/staff/settings-tickets.inc.php
@@ -4,7 +4,7 @@ if(!($maxfileuploads=ini_get('max_file_uploads')))
     $maxfileuploads=DEFAULT_MAX_FILE_UPLOADS;
 ?>
 <h2><?php echo __('Ticket Settings and Options');?></h2>
-<form action="settings.php?t=tickets" method="post" id="save">
+<form action="settings.php?t=tickets" method="post" class="save">
 <?php csrf_token(); ?>
 <input type="hidden" name="t" value="tickets" >
 
diff --git a/include/staff/settings-users.inc.php b/include/staff/settings-users.inc.php
index 4096ccbd9..1ef385bf9 100644
--- a/include/staff/settings-users.inc.php
+++ b/include/staff/settings-users.inc.php
@@ -3,7 +3,7 @@ if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config)
 
 ?>
 <h2><?php echo __('Users Settings'); ?></h2>
-<form action="settings.php?t=users" method="post" id="save">
+<form action="settings.php?t=users" method="post" class="save">
 <?php csrf_token(); ?>
 <input type="hidden" name="t" value="users" >
 <ul class="tabs" id="users-tabs">
diff --git a/include/staff/slaplan.inc.php b/include/staff/slaplan.inc.php
index beba3be42..bc775ba57 100644
--- a/include/staff/slaplan.inc.php
+++ b/include/staff/slaplan.inc.php
@@ -20,7 +20,7 @@ if($sla && $_REQUEST['a']!='add'){
 }
 $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
 ?>
-<form action="slas.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
+<form action="slas.php?<?php echo Http::build_query($qs); ?>" method="post" class="save">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
diff --git a/include/staff/staff.inc.php b/include/staff/staff.inc.php
index 3a3a27f72..ff37fa8fc 100644
--- a/include/staff/staff.inc.php
+++ b/include/staff/staff.inc.php
@@ -35,7 +35,7 @@ else {
 }
 ?>
 
-<form action="staff.php?<?php echo Http::build_query($qs); ?>" method="post" id="save" autocomplete="off">
+<form action="staff.php?<?php echo Http::build_query($qs); ?>" method="post" class="save" autocomplete="off">
   <?php csrf_token(); ?>
   <input type="hidden" name="do" value="<?php echo $action; ?>">
   <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
diff --git a/include/staff/team.inc.php b/include/staff/team.inc.php
index 3552d2cc7..cefc503fc 100644
--- a/include/staff/team.inc.php
+++ b/include/staff/team.inc.php
@@ -23,7 +23,7 @@ if ($team && $_REQUEST['a']!='add') {
 
 $info = $team->getInfo();
 ?>
-<form action="teams.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
+<form action="teams.php?<?php echo Http::build_query($qs); ?>" method="post" class="save">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
diff --git a/include/staff/template.inc.php b/include/staff/template.inc.php
index c8a91cace..0ff7ff3d9 100644
--- a/include/staff/template.inc.php
+++ b/include/staff/template.inc.php
@@ -19,7 +19,7 @@ if($template && $_REQUEST['a']!='add'){
 }
 $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
 ?>
-<form action="templates.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
+<form action="templates.php?<?php echo Http::build_query($qs); ?>" method="post" class="save">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
diff --git a/include/staff/templates/task-view.tmpl.php b/include/staff/templates/task-view.tmpl.php
index e2e26b7cc..b2dff1253 100644
--- a/include/staff/templates/task-view.tmpl.php
+++ b/include/staff/templates/task-view.tmpl.php
@@ -469,7 +469,7 @@ else
     </ul>
     <?php
     if ($role->hasPerm(TaskModel::PERM_REPLY)) { ?>
-    <form id="task_reply" class="tab_content spellcheck"
+    <form id="task_reply" class="tab_content spellcheck save"
         action="<?php echo $action; ?>"
         name="task_reply" method="post" enctype="multipart/form-data">
         <?php csrf_token(); ?>
@@ -559,7 +559,7 @@ else
     } ?>
     <form id="task_note"
         action="<?php echo $action; ?>"
-        class="tab_content spellcheck <?php
+        class="tab_content spellcheck save <?php
             echo $role->hasPerm(TaskModel::PERM_REPLY) ? 'hidden' : ''; ?>"
         name="task_note"
         method="post" enctype="multipart/form-data">
diff --git a/include/staff/ticket-edit.inc.php b/include/staff/ticket-edit.inc.php
index 37697ea8c..e15e8554d 100644
--- a/include/staff/ticket-edit.inc.php
+++ b/include/staff/ticket-edit.inc.php
@@ -10,7 +10,7 @@ if ($_POST)
     // timezone)
     $info['duedate'] = Format::date(strtotime($info['duedate']), false, false, 'UTC');
 ?>
-<form action="tickets.php?id=<?php echo $ticket->getId(); ?>&a=edit" method="post" id="save"  enctype="multipart/form-data">
+<form action="tickets.php?id=<?php echo $ticket->getId(); ?>&a=edit" method="post" class="save"  enctype="multipart/form-data">
     <?php csrf_token(); ?>
     <input type="hidden" name="do" value="update">
     <input type="hidden" name="a" value="edit">
diff --git a/include/staff/ticket-open.inc.php b/include/staff/ticket-open.inc.php
index 5319cb1af..6d383e580 100644
--- a/include/staff/ticket-open.inc.php
+++ b/include/staff/ticket-open.inc.php
@@ -25,7 +25,7 @@ if ($info['topicId'] && ($topic=Topic::lookup($info['topicId']))) {
 if ($_POST)
     $info['duedate'] = Format::date(strtotime($info['duedate']), false, false, 'UTC');
 ?>
-<form action="tickets.php?a=open" method="post" id="save"  enctype="multipart/form-data">
+<form action="tickets.php?a=open" method="post" class="save"  enctype="multipart/form-data">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="create">
  <input type="hidden" name="a" value="open">
diff --git a/include/staff/tpl.inc.php b/include/staff/tpl.inc.php
index 7f0839f8b..b21cc2593 100644
--- a/include/staff/tpl.inc.php
+++ b/include/staff/tpl.inc.php
@@ -76,7 +76,7 @@ $tpl=$msgtemplates[$selected];
     <input type="hidden" name="tpl_id" value="<?php echo $tpl_id; ?>">
 </form>
 <hr/>
-<form action="templates.php?id=<?php echo $id; ?>&amp;a=manage" method="post" id="save">
+<form action="templates.php?id=<?php echo $id; ?>&amp;a=manage" method="post" class="save">
 <?php csrf_token(); ?>
 <?php foreach ($extras as $k=>$v) { ?>
     <input type="hidden" name="<?php echo $k; ?>" value="<?php echo Format::htmlchars($v); ?>" />
diff --git a/scp/emailtest.php b/scp/emailtest.php
index 5bd65e319..ed34e8f7c 100644
--- a/scp/emailtest.php
+++ b/scp/emailtest.php
@@ -55,7 +55,7 @@ require(STAFFINC_DIR.'header.inc.php');
 
 $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
 ?>
-<form action="emailtest.php" method="post" id="save">
+<form action="emailtest.php" method="post" class="save">
  <?php csrf_token(); ?>
  <input type="hidden" name="do" value="<?php echo $action; ?>">
  <h2><?php echo __('Test Outgoing Email');?></h2>
diff --git a/scp/js/scp.js b/scp/js/scp.js
index 3c04b4a9c..ae2512f63 100644
--- a/scp/js/scp.js
+++ b/scp/js/scp.js
@@ -146,11 +146,11 @@ var scp_prep = function() {
         }
     };
 
-    $("form#save").on('change', ':input[name], :button[name]', function() {
+    $("form.save").on('change', ':input[name], :button[name]', function() {
         if (!$(this).is('.nowarn')) warnOnLeave($(this));
     });
 
-    $("form#save").on('click', ':input[type=reset], :button[type=reset]', function() {
+    $("form.save").on('click', ':input[type=reset], :button[type=reset]', function() {
         var fObj = $(this).closest('form');
         if(fObj.data('changed')){
             $('input[type=submit], button[type=submit]', fObj).removeClass('save pending');
@@ -161,7 +161,7 @@ var scp_prep = function() {
         }
     });
 
-    $('form#save, form:has(table.list)').submit(function() {
+    $('form.save, form:has(table.list)').submit(function() {
         $(window).unbind('beforeunload');
         $('#overlay, #loading').show();
         return true;
-- 
GitLab