Changeset 2880 for trunk/calendar


Ignore:
Timestamp:
05/28/10 09:50:28 (14 years ago)
Author:
rodsouza
Message:

Ticket #1058 - Removendo reload de formulários do módulo admin.

Location:
trunk/calendar
Files:
4 edited

Legend:

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

    r2439 r2880  
    5252                              $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/admin/index.php')); 
    5353                        } 
    54                         //unset($GLOBALS['phpgw_info']['flags']['noheader']); 
    55                         //unset($GLOBALS['phpgw_info']['flags']['nonavbar']); 
    56                         $GLOBALS['phpgw_info']['flags']['noappfooter'] = True; 
    57                         //$GLOBALS['phpgw']->common->phpgw_header(); 
     54                        $GLOBALS['phpgw_info']['flags']['noappfooter'] = True; 
    5855 
    5956                        $p = &$GLOBALS['phpgw']->template; 
     
    6360                        $p->set_block('locales','row_empty','row_empty'); 
    6461                        $p->set_block('locales','submit_column','submit_column'); 
     62                        $p->set_block('locales','back_button_form','back_button_form'); 
    6563 
    6664                        $var = Array( 
     
    111109 
    112110                        $var = Array( 
    113                                 'new_action'            => $GLOBALS['phpgw']->link($this->base_url,Array('menuaction'=>'calendar.uiholiday.edit_holiday','id'=>0)), 
    114                                 'lang_add'                      => lang('add'), 
    115                                 'search_action' => $GLOBALS['phpgw']->link($this->base_url,Array('menuaction'=>'calendar.uiholiday.admin')), 
    116                                 'lang_search'           => lang('search') 
     111                                'new_action'    => $GLOBALS[ 'phpgw' ] -> link($this->base_url,Array('menuaction'=>'calendar.uiholiday.edit_holiday','id'=>0)), 
     112                                'lang_add'              => lang( 'add' ), 
     113                                'back_action'   => $GLOBALS[ 'phpgw' ] -> link( '/admin/' ), 
     114                                'lang_back'             => lang( 'Back' ), 
     115                                'search_action' => $GLOBALS[ 'phpgw' ] -> link($this->base_url,Array('menuaction'=>'calendar.uiholiday.admin')), 
     116                                'lang_search'   => lang('search') 
    117117                        ); 
    118118 
    119119                        $p->set_var($var); 
     120                        $p->parse('back_button','back_button_form',False); 
    120121                        $p->pparse('out','list'); 
    121122                } 
     
    195196                                                $holidays[$i]['name'] = ' '; 
    196197                                        } 
    197                                          
     198 
    198199                                        $var = Array( 
    199200                                                'tr_color'              => $tr_color, 
     
    256257 
    257258                        $t = &$GLOBALS['phpgw']->template; 
    258                         $t->set_file(Array('holiday'=>'holiday.tpl','form_button'=>'form_button_change_form_action.tpl')); 
     259                        $t->set_file(Array('holiday'=>'holiday.tpl','form_button'=>'form_button_script.tpl')); 
    259260                        $t->set_block('holiday','form','form'); 
    260261                        $t->set_block('holiday','list','list'); 
     
    268269                                $message = ''; 
    269270                        } 
    270          
     271 
    271272                        $var = Array( 
    272273                                'title_holiday' => ($this->bo->id ? lang('Edit') : lang('Add')).' '.lang('Holiday'), 
     
    342343                                ); 
    343344                        } 
    344                          
     345 
    345346                        $t->set_var(Array( 
    346                                 'action_url_button'     => $GLOBALS['phpgw']->link($this->base_url,$link_params), 
    347                                 'action_text_button'    => lang('Cancel'), 
     347                                'action_cancel' => $GLOBALS['phpgw']->link($this->base_url,$link_params), 
     348                                'lang_cancel'   => lang('Cancel'), 
    348349                        )); 
    349                         $t->parse('cancel_button','form_button'); 
    350                          
     350 
    351351                        if ($this->bo->id) 
    352352                        { 
     
    359359                                $t->set_var(Array( 
    360360                                        'action_url_button'     => $GLOBALS['phpgw']->link($this->base_url,$link_params), 
    361                                         'action_text_button'    => lang('Delete') 
     361                                        'action_text_button'    => lang('Delete'), 
     362                                        'action_extra_field'    => '' 
    362363                                )); 
    363364                                $t->parse('delete_button','form_button'); 
     
    378379                        } 
    379380 
    380                         //unset($GLOBALS['phpgw_info']['flags']['noheader']); 
    381                         //unset($GLOBALS['phpgw_info']['flags']['nonavbar']); 
    382                         $GLOBALS['phpgw_info']['flags']['noappfooter'] = True; 
    383                         //$GLOBALS['phpgw']->common->phpgw_header(); 
     381                        $GLOBALS['phpgw_info']['flags']['noappfooter'] = True; 
    384382 
    385383                        $p = CreateObject('phpgwapi.Template',$this->template_dir); 
    386                         $p->set_file(Array('form'=>'delete_common.tpl','form_button'=>'form_button_script.tpl')); 
    387                  
    388                         $p->set_var('messages',lang('Are you sure want to delete this Country?')."<br>".$this->bo->locales[0]); 
    389  
    390                         $var = Array( 
    391                                 'action_url_button'     => $GLOBALS['phpgw']->link($this->base_url,Array('menuaction'=>'calendar.uiholiday.admin')), 
    392                                 'action_text_button'    => lang('No'), 
    393                                 'action_confirm_button' => '', 
    394                                 'action_extra_field'    => '' 
    395                         ); 
    396                         $p->set_var($var); 
    397                         $p->parse('no','form_button'); 
    398  
    399                         $var = Array( 
    400                                 'action_url_button'     => $GLOBALS['phpgw']->link($this->base_url,Array('menuaction'=>'calendar.boholiday.delete_locale','locale'=>$this->bo->locales[0])), 
    401                                 'action_text_button'    => lang('Yes'), 
    402                                 'action_confirm_button' => '', 
    403                                 'action_extra_field'    => '' 
    404                         ); 
    405                         $p->set_var($var); 
    406                         $p->parse('yes','form_button'); 
    407  
    408                         $p->pparse('out','form'); 
     384                        $p->set_file( array( 'form' => 'delete_common.tpl' ) ); 
     385 
     386                        $p->set_var( array( 
     387                                'messages' => lang( 'Are you sure want to delete this Country?' ) . '<br>' . $this->bo->locales[0], 
     388                                'agree_action' => $GLOBALS[ 'phpgw' ] -> link( '/', "menuaction=calendar.boholiday.delete_locale&locale={$this -> bo -> locales[ 0 ]}" ), 
     389                                'agree_lang' => lang('Yes'), 
     390                                'disagree_action' => $GLOBALS[ 'phpgw' ] -> link( '/', 'menuaction=calendar.uiholiday.admin' ), 
     391                                'disagree_lang' => lang('No') 
     392                        ) ); 
     393 
     394                        $p->pparse( 'out', 'form' ); 
    409395                } 
    410396 
     
    417403                                $this->edit_locale(); 
    418404                        } 
    419                          
    420                         //unset($GLOBALS['phpgw_info']['flags']['noheader']); 
    421                         //unset($GLOBALS['phpgw_info']['flags']['nonavbar']); 
    422                         $GLOBALS['phpgw_info']['flags']['noappfooter'] = True; 
    423                         //$GLOBALS['phpgw']->common->phpgw_header(); 
     405 
     406                        $GLOBALS['phpgw_info']['flags']['noappfooter'] = True; 
    424407 
    425408                        $p = CreateObject('phpgwapi.Template',$this->template_dir); 
    426                         $p->set_file(Array('form'=>'delete_common.tpl','form_button'=>'form_button_script.tpl')); 
    427                  
    428                         $p->set_var('messages',lang('Are you sure want to delete this holiday?')."<br>".$holiday['name'].' ('.$this->bo->locales[0].') '.$this->bo->rule_string($holiday)); 
    429  
    430                         $var = Array( 
    431                                 'action_url_button'     => $GLOBALS['phpgw']->link($this->base_url,Array('menuaction'=>'calendar.uiholiday.edit_locale','locale'=>$this->bo->locales[0],'year'=>$this->bo->year)), 
    432                                 'action_text_button'    => lang('No'), 
    433                                 'action_confirm_button' => '', 
    434                                 'action_extra_field'    => '' 
    435                         ); 
    436                         $p->set_var($var); 
    437                         $p->parse('no','form_button'); 
    438  
    439                         $var = Array( 
    440                                 'action_url_button'     => $GLOBALS['phpgw']->link($this->base_url,Array('menuaction'=>'calendar.boholiday.delete_holiday','locale'=>$this->bo->locales[0],'id'=>$this->bo->id,'year'=>$this->bo->year)), 
    441                                 'action_text_button'    => lang('Yes'), 
    442                                 'action_confirm_button' => '', 
    443                                 'action_extra_field'    => '' 
    444                         ); 
    445                         $p->set_var($var); 
    446                         $p->parse('yes','form_button'); 
     409                        $p->set_file( array( 'form' => 'delete_common.tpl' ) ); 
     410 
     411                        $p->set_var( array( 
     412                                'messages' => lang('Are you sure want to delete this holiday?') . "<br>{$holiday[ 'name' ]} ({$this -> bo -> locales[ 0 ]}) {$this -> bo -> rule_string( $holiday )}", 
     413                                'agree_action' => $GLOBALS[ 'phpgw' ] -> link( '/', "menuaction=calendar.boholiday.delete_holiday&locale={$this -> bo -> locales[ 0 ]}&id={$this -> bo -> id}&year={$this -> bo -> year}" ), 
     414                                'agree_lang' => lang('Yes'), 
     415                                'disagree_action' => $GLOBALS[ 'phpgw' ] -> link( '/', "menuaction=calendar.uiholiday.edit_locale&locale={$this -> bo -> locales[ 0 ]}&year={$this -> bo -> year}" ), 
     416                                'disagree_lang' => lang('No') 
     417                        ) ); 
    447418 
    448419                        $p->pparse('out','form'); 
  • trunk/calendar/templates/default/delete_common.tpl

    r2 r2880  
    88   </tr> 
    99   <tr> 
    10     <td align="center">{no}</td> 
    11     <td align="center">{yes}</td> 
     10    <td align="center"><input type="button" value="{disagree_lang}" onclick="ExpressoLivre.link( '{disagree_action}' );" /></td> 
     11    <td align="center"><input type="button" value="{agree_lang}" onclick="ExpressoLivre.link( '{agree_action}' );" /></td> 
    1212   </tr> 
    1313  </table> 
  • trunk/calendar/templates/default/holiday.tpl

    r2439 r2880  
    22<center> 
    33{message}<br> 
    4  <form name="form" action="{actionurl}" method="POST"> 
     4<form name="form" action="{actionurl}" method="POST" onsubmit="return ExpressoLivre.form( this );"> 
    55<table border="0" width="80%" cellspacing="2" cellpadding="2">  
    66  {hidden_vars} 
     
    1111    <tr> 
    1212     <td> 
    13           <div style="padding-top:15px; padding-right: 2px"> 
    14        <input type="submit" name="submit" value="{lang_add}"> 
    15           </div> 
     13      <input type="submit" name="submit" value="{lang_add}" /> 
    1614     </td> 
    1715     <td> 
    18       {cancel_button} 
     16      <input type="button" value="{lang_cancel}" onclick="ExpressoLivre.link( '{action_cancel}' );" /> 
    1917     </td> 
    2018     <td align="right" width="80%"> 
  • trunk/calendar/templates/default/locales.tpl

    r2439 r2880  
    2727  <tr> 
    2828   <td align="left"> 
    29     <form method="POST" action="{new_action}"> 
    30      <input type="submit" value="{lang_add}"> 
    31     </form> 
     29    <input type="button" value="{lang_add}" onclick="ExpressoLivre.link( '{new_action}' )" /> 
    3230   </td> 
    3331   {back_button} 
     
    5654<!-- BEGIN back_button_form --> 
    5755   <td align="center"> 
    58     <form method="POST" action="{back_action}"> 
    59      <input type="submit" value="{lang_back}"> 
    60     </form> 
     56    <input type="submit" value="{lang_back}" onclick="ExpressoLivre.link( '{back_action}' )" /> 
    6157   </td> 
    6258<!-- END back_button_form --> 
Note: See TracChangeset for help on using the changeset viewer.