Changeset 212 for trunk/calendar


Ignore:
Timestamp:
03/11/08 14:50:37 (16 years ago)
Author:
niltonneto
Message:

Ver ticket #46:
Não permitir mais de um clique no botão 'aceitar' na mensagem

Location:
trunk/calendar
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar/inc/class.bocalendar.inc.php

    r204 r212  
    24532453                                return False; 
    24542454                        } 
     2455                        $event = $this->so->read_entry($cal_id); 
     2456                        $account_id = $GLOBALS['phpgw_info']['user']['account_id']; 
     2457                        if(($status2msg[$status] == "5" && $event['participants'][$account_id] == "A") || 
     2458                         ($status2msg[$status] == "3" && $event['participants'][$account_id] == "R")) { 
     2459                                return True; 
     2460                        } 
    24552461                        $this->so->set_status($cal_id,$status); 
    24562462                        $event = $this->so->read_entry($cal_id); 
    24572463                        $this->send_update($status2msg[$status],$event['participants'],$event); 
    24582464 
    2459                         return True; 
    24602465                } 
    24612466 
  • trunk/calendar/inc/class.uicalendar.inc.php

    r204 r212  
    14841484                } 
    14851485                 
    1486                 function confirm_action() 
     1486                function confirm_action($duplicated_action) 
    14871487                { 
    14881488                                if($_GET['response'] == 1) 
    14891489                                { 
    1490                                         $notify_message = lang('The commitment was accepted successfully!');; 
     1490                                        if(!$duplicated_action) 
     1491                                                $notify_message = lang('The commitment was accepted successfully!'); 
     1492                                        else 
     1493                                                $notify_message = lang('This commitment has already been accepted!'); 
    14911494                                }        
    14921495                                else 
    1493                                 {                                
    1494                                         $notify_message = lang('The commitment was rejected successfully!'); 
     1496                                {                                        
     1497                                        if(!$duplicated_action)                                          
     1498                                                $notify_message = lang('The commitment was rejected successfully!'); 
     1499                                        else 
     1500                                                $notify_message = lang('This commitment has already been rejected!'); 
    14951501                                } 
    14961502                                 
     
    15091515                                return; 
    15101516                        } 
    1511                         $this->bo->set_status((int)$_GET['cal_id'],(int)$_GET['action']); 
    15121517                         
     1518                        $confirm_status = $this->bo->set_status((int)$_GET['cal_id'],(int)$_GET['action']); 
     1519 
    15131520                        if(isset($_GET['response'])) 
    15141521                        { 
    1515                                         $this->confirm_action(); 
     1522                                        $this->confirm_action($confirm_status); 
    15161523                                        $GLOBALS['phpgw']->common->phpgw_exit(False); 
    15171524                        } 
Note: See TracChangeset for help on using the changeset viewer.