Revision: 1431
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1431&view=rev
Author:   cimorrison
Date:     2010-09-01 10:06:58 +0000 (Wed, 01 Sep 2010)

Log Message:
-----------
Tightened up on the use of "accept" and "confirm" with respect to bookings 
requiring approval.  "Approve" is now used instead.   This is to avoid 
confusion with the forthcoming new style provisional bookings which will allow 
bookings to be confirmed (in the sense that they are definitely going to 
happen).

Modified Paths:
--------------
    mrbs/branches/provisional_bookings_new_style/web/functions_mail.inc
    mrbs/branches/provisional_bookings_new_style/web/lang.en
    mrbs/branches/provisional_bookings_new_style/web/lang.ja
    mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php
    mrbs/branches/provisional_bookings_new_style/web/mrbs_auth.inc
    mrbs/branches/provisional_bookings_new_style/web/mrbs_sql.inc
    mrbs/branches/provisional_bookings_new_style/web/pending.php
    mrbs/branches/provisional_bookings_new_style/web/view_entry.php

Added Paths:
-----------
    mrbs/branches/provisional_bookings_new_style/web/approve_entry_handler.php

Removed Paths:
-------------
    mrbs/branches/provisional_bookings_new_style/web/confirm_entry_handler.php

Copied: 
mrbs/branches/provisional_bookings_new_style/web/approve_entry_handler.php 
(from rev 1430, 
mrbs/branches/provisional_bookings_new_style/web/confirm_entry_handler.php)
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/approve_entry_handler.php  
                        (rev 0)
+++ mrbs/branches/provisional_bookings_new_style/web/approve_entry_handler.php  
2010-09-01 10:06:58 UTC (rev 1431)
@@ -0,0 +1,140 @@
+<?php
+// $Id$
+
+// Handles actions on bookings awaiting approval
+
+require_once "defaultincludes.inc";
+require_once "mrbs_sql.inc";
+require_once "functions_mail.inc";
+
+// Get non-standard form variables
+$action = get_form_var('action', 'string');
+$id = get_form_var('id', 'int');
+$series = get_form_var('series', 'int');
+$returl = get_form_var('returl', 'string');
+$room_id = get_form_var('room_id', 'int');
+$note = get_form_var('note', 'string');
+
+
+// Check the user is authorised for this page
+checkAuthorised();
+$user = getUserName();
+
+                  
+if (isset($action))
+{                     
+  if ($need_to_send_mail)
+  { 
+    $is_new_entry = TRUE;  // Treat it as a new entry unless told otherwise    
+  }
+  
+  // If we have to approve or reject a booking, check that we have rights to 
do so
+  // for this room
+  if ((($action == "approve") || ($action == "reject")) 
+       && !auth_book_admin($user, $room_id))
+  {
+    showAccessDenied($day, $month, $year, $area, isset($room) ? $room : "");
+    exit;
+  }
+  
+  switch ($action)
+  {
+    // ACTION = "APPROVE"
+    case 'approve':
+      if ($need_to_send_mail)
+      {
+        $is_new_entry = FALSE;
+        // Get the current booking data, before we change anything, for use in 
emails
+        $mail_previous = getPreviousEntryData($id, $series);
+      }
+      $result = mrbsApproveEntry($id, $series);
+      if (!$result)
+      {
+        $returl .= "&error=approve_failed";
+      }
+      break;
+    
+      
+    // ACTION = "MORE_INFO"  
+    case 'more_info':
+      // update the last reminded time (the ball is back in the 
+      // originator's court, so the clock gets reset)
+      mrbsUpdateLastReminded($id, $series);
+      // update the more info fields
+      mrbsUpdateMoreInfo($id, $series, $user, $note);
+      $result = TRUE;  // We'll assume success and end an email anyway
+      break;
+    
+      
+    // ACTION = "REMIND"
+    case 'remind':
+      // update the last reminded time
+      mrbsUpdateLastReminded($id, $series);
+      $result = TRUE;  // We'll assume success and end an email anyway
+      break;
+      
+    default:
+      $result = FALSE;  // should not get here
+      break;
+      
+  }  // switch ($action)
+  
+  
+  
+  // Now send an email if required and the operation was successful
+  if ($result && $need_to_send_mail)
+  {
+    // Retrieve the booking details which we will need for the email
+    // (notifyAdminOnBooking relies on them being available as globals)
+
+    $row = mrbsGetBookingInfo($id, $series);
+    
+    $name          = $row['name'];
+    $description   = $row['description'];
+    $create_by     = $row['create_by'];
+    $type          = $row['type'];
+    $status        = $row['status'];
+    $starttime     = $row['start_time'];
+    $endtime       = $row['end_time'];
+    $room_name     = $row['room_name'];
+    $room_id       = $row['room_id'];
+    $area_name     = $row['area_name'];
+    $duration      = ($row['end_time'] - $row['start_time']) - 
cross_dst($row['start_time'], $row['end_time']);
+    $rep_type      = $row['rep_type'];
+    $repeat_id     = isset($row['repeat_id'])     ? $row['repeat_id']     : 
NULL;
+    $rep_enddate   = isset($row['rep_enddate'])   ? $row['rep_enddate']   : 
NULL;
+    $rep_opt       = isset($row['rep_opt'])       ? $row['rep_opt']       : 
NULL;
+    $rep_num_weeks = isset($row['rep_num_weeks']) ? $row['rep_num_weeks'] : 
NULL;
+    
+    if ($enable_periods)
+    {
+      list($start_period, $start_date) =  
period_date_string($row['start_time']);
+    }
+    else
+    {
+      $start_date = time_date_string($row['start_time']);
+    }
+
+    if ($enable_periods)
+    {
+      list( , $end_date) =  period_date_string($row['end_time'], -1);
+    }
+    else
+    {
+      $end_date = time_date_string($row['end_time']);
+    }
+  
+    // The optional last parameters below are set to FALSE because we don't 
want the units
+    // translated - otherwise they will end up getting translated twice, 
resulting
+    // in an undefined index error.
+    $enable_periods ? toPeriodString($start_period, $duration, $dur_units, 
FALSE) : toTimeString($duration, $dur_units, FALSE);
+
+    $result = notifyAdminOnBooking($is_new_entry, $id, $series, $action);
+  }
+}
+
+// Now it's all done go back to the previous view
+header("Location: $returl");
+exit;
+
+?>

Deleted: 
mrbs/branches/provisional_bookings_new_style/web/confirm_entry_handler.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/confirm_entry_handler.php  
2010-09-01 08:38:11 UTC (rev 1430)
+++ mrbs/branches/provisional_bookings_new_style/web/confirm_entry_handler.php  
2010-09-01 10:06:58 UTC (rev 1431)
@@ -1,140 +0,0 @@
-<?php
-// $Id$
-
-// Handles actions on bookings awaiting approval
-
-require_once "defaultincludes.inc";
-require_once "mrbs_sql.inc";
-require_once "functions_mail.inc";
-
-// Get non-standard form variables
-$action = get_form_var('action', 'string');
-$id = get_form_var('id', 'int');
-$series = get_form_var('series', 'int');
-$returl = get_form_var('returl', 'string');
-$room_id = get_form_var('room_id', 'int');
-$note = get_form_var('note', 'string');
-
-
-// Check the user is authorised for this page
-checkAuthorised();
-$user = getUserName();
-
-                  
-if (isset($action))
-{                     
-  if ($need_to_send_mail)
-  { 
-    $is_new_entry = TRUE;  // Treat it as a new entry unless told otherwise    
-  }
-  
-  // If we have to accept or reject a booking, check that we have rights to do 
so
-  // for this room
-  if ((($action == "accept") || ($action == "reject")) 
-       && !auth_book_admin($user, $room_id))
-  {
-    showAccessDenied($day, $month, $year, $area, isset($room) ? $room : "");
-    exit;
-  }
-  
-  switch ($action)
-  {
-    // ACTION = "ACCEPT"
-    case 'accept':
-      if ($need_to_send_mail)
-      {
-        $is_new_entry = FALSE;
-        // Get the current booking data, before we change anything, for use in 
emails
-        $mail_previous = getPreviousEntryData($id, $series);
-      }
-      $result = mrbsConfirmEntry($id, $series);
-      if (!$result)
-      {
-        $returl .= "&error=accept_failed";
-      }
-      break;
-    
-      
-    // ACTION = "MORE_INFO"  
-    case 'more_info':
-      // update the last reminded time (the ball is back in the 
-      // originator's court, so the clock gets reset)
-      mrbsUpdateLastReminded($id, $series);
-      // update the more info fields
-      mrbsUpdateMoreInfo($id, $series, $user, $note);
-      $result = TRUE;  // We'll assume success and end an email anyway
-      break;
-    
-      
-    // ACTION = "REMIND"
-    case 'remind':
-      // update the last reminded time
-      mrbsUpdateLastReminded($id, $series);
-      $result = TRUE;  // We'll assume success and end an email anyway
-      break;
-      
-    default:
-      $result = FALSE;  // should not get here
-      break;
-      
-  }  // switch ($action)
-  
-  
-  
-  // Now send an email if required and the operation was successful
-  if ($result && $need_to_send_mail)
-  {
-    // Retrieve the booking details which we will need for the email
-    // (notifyAdminOnBooking relies on them being available as globals)
-
-    $row = mrbsGetBookingInfo($id, $series);
-    
-    $name          = $row['name'];
-    $description   = $row['description'];
-    $create_by     = $row['create_by'];
-    $type          = $row['type'];
-    $status        = $row['status'];
-    $starttime     = $row['start_time'];
-    $endtime       = $row['end_time'];
-    $room_name     = $row['room_name'];
-    $room_id       = $row['room_id'];
-    $area_name     = $row['area_name'];
-    $duration      = ($row['end_time'] - $row['start_time']) - 
cross_dst($row['start_time'], $row['end_time']);
-    $rep_type      = $row['rep_type'];
-    $repeat_id     = isset($row['repeat_id'])     ? $row['repeat_id']     : 
NULL;
-    $rep_enddate   = isset($row['rep_enddate'])   ? $row['rep_enddate']   : 
NULL;
-    $rep_opt       = isset($row['rep_opt'])       ? $row['rep_opt']       : 
NULL;
-    $rep_num_weeks = isset($row['rep_num_weeks']) ? $row['rep_num_weeks'] : 
NULL;
-    
-    if ($enable_periods)
-    {
-      list($start_period, $start_date) =  
period_date_string($row['start_time']);
-    }
-    else
-    {
-      $start_date = time_date_string($row['start_time']);
-    }
-
-    if ($enable_periods)
-    {
-      list( , $end_date) =  period_date_string($row['end_time'], -1);
-    }
-    else
-    {
-      $end_date = time_date_string($row['end_time']);
-    }
-  
-    // The optional last parameters below are set to FALSE because we don't 
want the units
-    // translated - otherwise they will end up getting translated twice, 
resulting
-    // in an undefined index error.
-    $enable_periods ? toPeriodString($start_period, $duration, $dur_units, 
FALSE) : toTimeString($duration, $dur_units, FALSE);
-
-    $result = notifyAdminOnBooking($is_new_entry, $id, $series, $action);
-  }
-}
-
-// Now it's all done go back to the previous view
-header("Location: $returl");
-exit;
-
-?>

Modified: mrbs/branches/provisional_bookings_new_style/web/functions_mail.inc
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/functions_mail.inc 
2010-09-01 08:38:11 UTC (rev 1430)
+++ mrbs/branches/provisional_bookings_new_style/web/functions_mail.inc 
2010-09-01 10:06:58 UTC (rev 1431)
@@ -359,7 +359,7 @@
   
   if ($mail_settings['booker'])
   {
-    if (($action == "accept")  || ($action == "more_info"))
+    if (($action == "approve")  || ($action == "more_info"))
     {
       // Put the recipients on the cc line and the booker will go
       // on the to line
@@ -384,9 +384,9 @@
   // set up the subject and body
   switch ($action)
   {
-    case "accept":
-      $subject = get_mail_vocab("mail_subject_accepted");
-      $body = get_mail_vocab("mail_body_accepted") . "\n\n";
+    case "approve":
+      $subject = get_mail_vocab("mail_subject_approved");
+      $body = get_mail_vocab("mail_body_approved") . "\n\n";
       break;
     case "more_info":
       $subject = get_mail_vocab("mail_subject_more_info");
@@ -444,8 +444,8 @@
     {                        
       // Approval status:
       $body .= get_mail_vocab("status") . ": ";
-      $old_approval_status = ($mail_previous['status'] & 
STATUS_AWAITING_APPROVAL) ? get_mail_vocab("awaiting_approval") : 
get_mail_vocab("confirmed");
-      $new_approval_status = ($status & STATUS_AWAITING_APPROVAL) ? 
get_mail_vocab("awaiting_approval") : get_mail_vocab("confirmed");
+      $old_approval_status = ($mail_previous['status'] & 
STATUS_AWAITING_APPROVAL) ? get_mail_vocab("awaiting_approval") : 
get_mail_vocab("approved");
+      $new_approval_status = ($status & STATUS_AWAITING_APPROVAL) ? 
get_mail_vocab("awaiting_approval") : get_mail_vocab("approved");
       $body .= compareEntries($new_approval_status, $old_approval_status, 
$new_entry) . "\n";
     }
                                

Modified: mrbs/branches/provisional_bookings_new_style/web/lang.en
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/lang.en    2010-09-01 
08:38:11 UTC (rev 1430)
+++ mrbs/branches/provisional_bookings_new_style/web/lang.en    2010-09-01 
10:06:58 UTC (rev 1431)
@@ -106,9 +106,9 @@
 $vocab["invalid_entry_id"]   = "Invalid entry id.";
 $vocab["invalid_series_id"]  = "Invalid series id.";
 $vocab["status"]             = "Status";
-$vocab["confirmed"]          = "Confirmed booking";
+$vocab["approved"]           = "Approved booking";
 $vocab["awaiting_approval"]  = "Awaiting approval";
-$vocab["accept"]             = "Accept";
+$vocab["approve"]            = "Approve";
 $vocab["reject"]             = "Reject";
 $vocab["more_info"]          = "More Info";
 $vocab["remind_admin"]       = "Remind Admin";
@@ -116,7 +116,7 @@
 $vocab["request_more_info"]  = "Please list the extra information you require";
 $vocab["reject_reason"]      = "Please give a reason for your rejection of 
this reservation request";
 $vocab["send"]               = "Send";
-$vocab["accept_failed"]      = "The reservation could not be confirmed.";
+$vocab["approve_failed"]     = "The reservation could not be approved.";
 $vocab["no_request_yet"]     = "No request has been sent yet"; // Used for the 
title tooltip on More Info button
 $vocab["last_request"]       = "Last request sent at";         // Used for the 
title tooltip on More Info button
 $vocab["by"]                 = "by";                           // Used for the 
title tooltip on More Info button
@@ -134,11 +134,11 @@
 $vocab["failed_to_acquire"]  = "Failed to acquire exclusive database access";
 $vocab["invalid_booking"]    = "Invalid booking";
 $vocab["must_set_description"] = "You must set a brief description for the 
booking. Please go back and enter one.";
-$vocab["mail_subject_accepted"]  = "Entry approved for $mrbs_company MRBS";
+$vocab["mail_subject_approved"]  = "Entry approved for $mrbs_company MRBS";
 $vocab["mail_subject_rejected"]  = "Entry rejected for $mrbs_company MRBS";
 $vocab["mail_subject_more_info"] = "$mrbs_company MRBS: more information 
requested";
 $vocab["mail_subject_reminder"]  = "Reminder for $mrbs_company MRBS";
-$vocab["mail_body_accepted"]     = "An entry has been approved by the 
administrators; here are the details:";
+$vocab["mail_body_approved"]     = "An entry has been approved by the 
administrators; here are the details:";
 $vocab["mail_body_rej_entry"]    = "An entry has been rejected by the 
administrators, here are the details:";
 $vocab["mail_body_more_info"]    = "The administrators require more 
information about an entry; here are the details:";
 $vocab["mail_body_reminder"]     = "Reminder - an entry is awaiting approval; 
here are the details:";

Modified: mrbs/branches/provisional_bookings_new_style/web/lang.ja
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/lang.ja    2010-09-01 
08:38:11 UTC (rev 1430)
+++ mrbs/branches/provisional_bookings_new_style/web/lang.ja    2010-09-01 
10:06:58 UTC (rev 1431)
@@ -106,9 +106,9 @@
 $vocab["invalid_entry_id"]   = "無効な予約IDです。";
 $vocab["invalid_series_id"]  = "無効な定例予約IDです。";
 $vocab["status"]             = "状況";
-$vocab["confirmed"]          = "確認予約";
+$vocab["approved"]           = "確認予約";
 $vocab["awaiting_approval"]  = "仮予約";
-$vocab["accept"]             = "承認";
+$vocab["approve"]            = "承認";
 $vocab["reject"]             = "棄却";
 $vocab["more_info"]          = "詳細情報";
 $vocab["remind_admin"]       = "管理者に通知";
@@ -116,7 +116,7 @@
 $vocab["request_more_info"]  = "必要な追加情報を記入してください";
 $vocab["reject_reason"]      = "この予約情報を棄却した理由を記入してください";
 $vocab["send"]               = "送信";
-$vocab["accept_failed"]      = "予約が確認できませんでした。";
+$vocab["approve_failed"]     = "予約が確認できませんでした。";
 
 // Used in edit_entry_handler.php
 $vocab["error"]              = "エラー";
@@ -128,11 +128,11 @@
 $vocab["failed_to_acquire"]  = "データベースへの排他的なアクセスの確保に失敗しました"; 
 $vocab["invalid_booking"]    = "無効な予約";
 $vocab["must_set_description"] = "予約のための簡単な説明を設定する必要があります。戻って入力してください。";
-$vocab["mail_subject_accepted"]  = "$mrbs_company MRBSのエントリが承認されました";
+$vocab["mail_subject_approved"]  = "$mrbs_company MRBSのエントリが承認されました";
 $vocab["mail_subject_rejected"]  = "$mrbs_company MRBSのエントリが棄却されました";
 $vocab["mail_subject_more_info"] = "$mrbs_company MRBS: 詳細情報を必要としています";
 $vocab["mail_subject_reminder"]  = "$mrbs_company MRBS備忘通知";
-$vocab["mail_body_accepted"]     = "エントリは管理者に承認されました。詳細は以下のとおりです:";
+$vocab["mail_body_approved"]     = "エントリは管理者に承認されました。詳細は以下のとおりです:";
 $vocab["mail_body_rej_entry"]    = "エントリは管理者に棄却されました。詳細は以下のとおりです:";
 $vocab["mail_body_more_info"]    = "管理者はエントリについて詳細情報を要求しています。詳細は以下のとおりです:";
 $vocab["mail_body_reminder"]     = "備忘通知 - エントリは承認待ちです。詳細は以下のとおりです:";

Modified: mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php       
2010-09-01 08:38:11 UTC (rev 1430)
+++ mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php       
2010-09-01 10:06:58 UTC (rev 1431)
@@ -790,10 +790,10 @@
 /* ------------ VIEW_ENTRY.PHP ------------------*/
 .view_entry #entry td:first-child {text-align: right; font-weight: bold; 
padding-right: 1.0em}
 .view_entry div#view_entry_nav {margin-top: 1.0em}
-.view_entry #confirm_buttons form {float: left; margin-right: 2em}
-.view_entry #confirm_buttons legend {font-size: 0}
-#confirm_buttons td {vertical-align: middle; padding-top: 1em}
-#confirm_buttons td#caption {text-align: left}
-#confirm_buttons td#note {padding-top: 0}
-#confirm_buttons td#note form {width: 100%}
-#confirm_buttons td#note textarea {width: 100%; height: 6em}
+.view_entry #approve_buttons form {float: left; margin-right: 2em}
+.view_entry #approve_buttons legend {font-size: 0}
+#approve_buttons td {vertical-align: middle; padding-top: 1em}
+#approve_buttons td#caption {text-align: left}
+#approve_buttons td#note {padding-top: 0}
+#approve_buttons td#note form {width: 100%}
+#approve_buttons td#note textarea {width: 100%; height: 6em}

Modified: mrbs/branches/provisional_bookings_new_style/web/mrbs_auth.inc
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/mrbs_auth.inc      
2010-09-01 08:38:11 UTC (rev 1430)
+++ mrbs/branches/provisional_bookings_new_style/web/mrbs_auth.inc      
2010-09-01 10:06:58 UTC (rev 1431)
@@ -27,7 +27,7 @@
 // cases write access for their own entries.   Where necessary further checks 
are
 // made within the page to prevent ordinary users gaining access to admin 
features.
 $page_level['admin.php']                 = 1;  // Ordinary users can view room 
details 
-$page_level['confirm_entry_handler.php'] = 1;  // Ordinary users are allowed 
to remind admins
+$page_level['approve_entry_handler.php'] = 1;  // Ordinary users are allowed 
to remind admins
 $page_level['del_entry.php']             = 1;  // Ordinary users can delete 
their own entries
 $page_level['edit_area_room.php']        = 1;  // Ordinary users can view room 
details
 $page_level['edit_entry.php']            = 1;  // Ordinary users can edit 
their own entries

Modified: mrbs/branches/provisional_bookings_new_style/web/mrbs_sql.inc
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/mrbs_sql.inc       
2010-09-01 08:38:11 UTC (rev 1430)
+++ mrbs/branches/provisional_bookings_new_style/web/mrbs_sql.inc       
2010-09-01 10:06:58 UTC (rev 1431)
@@ -757,13 +757,13 @@
   return sql_command($sql);
 }
 
-// mrbsConfirmEntry($id, $series)
+// mrbsApproveEntry($id, $series)
 //
-// Confirm an entry with id $id.   If series is set to TRUE
-// then the id is the id in the repeat table and we must confirm
+// Approve an entry with id $id.   If series is set to TRUE
+// then the id is the id in the repeat table and we must approve
 // all the individual entries.
 // Returns FALSE on failure, TRUE on success
-function mrbsConfirmEntry($id, $series)
+function mrbsApproveEntry($id, $series)
 {
   global $tbl_entry, $tbl_repeat;
   

Modified: mrbs/branches/provisional_bookings_new_style/web/pending.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/pending.php        
2010-09-01 08:38:11 UTC (rev 1430)
+++ mrbs/branches/provisional_bookings_new_style/web/pending.php        
2010-09-01 10:06:58 UTC (rev 1431)
@@ -22,14 +22,14 @@
   
   if (auth_book_admin($user, $row['room_id']))
   {
-    // accept
-    echo "<form action=\"confirm_entry_handler.php\" method=\"post\">\n";
+    // approve
+    echo "<form action=\"approve_entry_handler.php\" method=\"post\">\n";
     echo "<div>\n";
-    echo "<input type=\"hidden\" name=\"action\" value=\"accept\">\n";
+    echo "<input type=\"hidden\" name=\"action\" value=\"approve\">\n";
     echo "<input type=\"hidden\" name=\"id\" value=\"$target_id\">\n";
     echo "<input type=\"hidden\" name=\"series\" value=\"$is_series\">\n";
     echo "<input type=\"hidden\" name=\"returl\" value=\"" . 
htmlspecialchars($returl) . "\">\n";
-    echo "<input type=\"submit\" value=\"" . get_vocab("accept") . "\">\n";
+    echo "<input type=\"submit\" value=\"" . get_vocab("approve") . "\">\n";
     echo "</div>\n";
     echo "</form>\n";
     // reject
@@ -72,7 +72,7 @@
     if ($reminders_enabled  && 
         (working_time_diff(time(), $last_reminded) >= $reminder_interval))
     {
-      echo "<form action=\"confirm_entry_handler.php\" method=\"post\">\n";
+      echo "<form action=\"approve_entry_handler.php\" method=\"post\">\n";
       echo "<div>\n";
       echo "<input type=\"hidden\" name=\"action\" value=\"remind_admin\">\n";
       echo "<input type=\"hidden\" name=\"id\" value=\"" . $row['id'] . 
"\">\n";

Modified: mrbs/branches/provisional_bookings_new_style/web/view_entry.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/view_entry.php     
2010-09-01 08:38:11 UTC (rev 1430)
+++ mrbs/branches/provisional_bookings_new_style/web/view_entry.php     
2010-09-01 10:06:58 UTC (rev 1431)
@@ -20,8 +20,8 @@
   echo "</form>\n";  
 }
 
-// Generates the Accept, Reject and More Info buttons
-function generateConfirmButtons($id, $series)
+// Generates the Approve, Reject and More Info buttons
+function generateApproveButtons($id, $series)
 {
   global $returl, $PHP_SELF;
   global $entry_info_time, $entry_info_user, $repeat_info_time, 
$repeat_info_user;
@@ -46,7 +46,7 @@
   echo "<tr>\n";
   echo "<td>" . ($series ? get_vocab("series") : get_vocab("entry")) . 
":</td>\n";
   echo "<td>\n";
-  generateButton("confirm_entry_handler.php", $id, $series, "accept", $returl, 
get_vocab("accept"));
+  generateButton("approve_entry_handler.php", $id, $series, "approve", 
$returl, get_vocab("approve"));
   generateButton($this_page, $id, $series, "reject", $returl, 
get_vocab("reject"));
   generateButton($this_page, $id, $series, "more_info", $returl, 
get_vocab("more_info"), $info_title);
   echo "</td>\n";
@@ -71,7 +71,7 @@
     echo "<tr>\n";
     echo "<td>&nbsp;</td>\n";
     echo "<td>\n";
-    generateButton("confirm_entry_handler.php", $id, $series, "remind", 
$this_page . "?id=$id&amp;area=$area", get_vocab("remind_admin"));
+    generateButton("approve_entry_handler.php", $id, $series, "remind", 
$this_page . "?id=$id&amp;area=$area", get_vocab("remind_admin"));
     echo "</td>\n";
     echo "</tr>\n";
   } 
@@ -356,7 +356,7 @@
 // the bookings in the footer
 if ($approval_enabled && ($status & STATUS_AWAITING_APPROVAL))
 {
-  echo "<tfoot id=\"confirm_buttons\">\n";
+  echo "<tfoot id=\"approve_buttons\">\n";
   // PHASE 2 - REJECT
   if (isset($action) && ($action == "reject"))
   {
@@ -370,7 +370,7 @@
   // PHASE 2 - MORE INFO
   elseif (isset($action) && ($action == "more_info"))
   {
-    // but confirm_entry_handler expects the id to be a repeat_id
+    // but approve_entry_handler expects the id to be a repeat_id
     // if $series is true (ie behaves like the rest of MRBS).
     // Sometime this difference in behaviour should be rationalised
     // because it is very confusing!
@@ -393,7 +393,7 @@
       $value .= "\n----\n";
       $value .= $info_text;
     }
-    generateTextArea("confirm_entry_handler.php", $target_id, $series,
+    generateTextArea("approve_entry_handler.php", $target_id, $series,
                      "more_info", $returl,
                      get_vocab("send"),
                      get_vocab("request_more_info"),
@@ -402,16 +402,16 @@
   // PHASE 1 - first time through this page
   else
   {
-    // Buttons for those who are allowed to confirm this booking
+    // Buttons for those who are allowed to approve this booking
     if (auth_book_admin($user, $room_id))
     {
       if (!$series)
       {
-        generateConfirmButtons($id, FALSE);
+        generateApproveButtons($id, FALSE);
       }
       if (!empty($repeat_id) || $series)
       {
-        generateConfirmButtons($repeat_id, TRUE);
+        generateApproveButtons($repeat_id, TRUE);
       }    
     }
     // Buttons for the owner of this booking
@@ -442,7 +442,7 @@
   {
     echo "<tr>\n";
     echo "<td>" . get_vocab("status") . ":</td>\n";
-    echo "<td>" . (($status & STATUS_AWAITING_APPROVAL) ? 
get_vocab("awaiting_approval") : get_vocab("confirmed")) . "</td>\n";
+    echo "<td>" . (($status & STATUS_AWAITING_APPROVAL) ? 
get_vocab("awaiting_approval") : get_vocab("approved")) . "</td>\n";
     echo "</tr>\n";
   }
   ?>


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to