Changeset 4828 for trunk/preferences


Ignore:
Timestamp:
07/19/11 16:54:27 (13 years ago)
Author:
airton
Message:

Ticket #2146 - Implementacao da funcionalidade de multiplas assinaturas

Location:
trunk/preferences
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/preferences/preferences.php

    r3018 r4828  
    2222        if ($_POST['cancel']) 
    2323        { 
    24                 $GLOBALS['phpgw']->redirect_link('/preferences/index.php'); 
     24            $GLOBALS['phpgw']->redirect_link('/preferences/index.php'); 
    2525        } 
    2626         
     
    2929        $default = get_var('default',Array('POST')); 
    3030 
     31        if(!@is_object($GLOBALS['phpgw']->js)) 
     32        { 
     33                $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); 
     34        } 
     35        $GLOBALS['phpgw']->js->validate_file('jscode','validate','preferences'); 
     36        
    3137        $t = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('preferences')); 
    3238        $t->set_file(array( 
    3339                'preferences' => 'preferences.tpl' 
    3440        )); 
     41 
     42 
     43 
    3544        $t->set_block('preferences','list','lists'); 
    3645        $t->set_block('preferences','row','rowhandle'); 
     
    4352                $GLOBALS['phpgw']->translation->add_app('preferences'); // we need the prefs translations too 
    4453        } 
     54         
     55        $GLOBALS['phpgw']->preferences->default['expressoMail']['show_name_print_messages'] = "0"; 
    4556 
    4657        /* Make things a little easier to follow */ 
     
    205216        { 
    206217                global $t,$prefs; 
    207         $t->set_var('row_id', "${GLOBALS[type]}[$name]"); 
     218                $t->set_var('row_id', "${GLOBALS[type]}[$name]"); 
    208219                $t->set_var('row_value',$code.$prefs[$name].$appendcode); 
    209220                $t->set_var('row_name',lang("signature")); 
     
    240251                } 
    241252                $s .= create_option_string($default,$values); 
     253                 
    242254                if ($GLOBALS['type'] == 'user') 
    243255                { 
     
    346358        { 
    347359                $_appname = check_app(); 
    348  
    349360                $prefs = &$repository[$_appname]; 
    350361 
     
    487498                if (!is_admin() || $error) 
    488499                { 
    489                         $GLOBALS['phpgw']->redirect_link('/'.$_GET['appname'].'/');  
     500                        $GLOBALS['phpgw']->redirect_link('/'.$_GET['appname'].'/'); 
    490501                } 
    491502                 
     
    513524        $t->set_var('messages',$error); 
    514525        $t->set_var('action_url',$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=' . $_GET['appname'])); 
    515         $t->set_var('th_bg',  $GLOBALS['phpgw_info']['theme']['th_bg']); 
     526 
     527        if($_GET['appname'] == 'expressoMail1_2') 
     528            $t->set_var('validateForm','onSubmit="return validateSignature();"'); 
     529 
     530        $t->set_var('th_bg',  $GLOBALS['phpgw_info']['theme']['th_bg']); 
    516531        $t->set_var('th_text',$GLOBALS['phpgw_info']['theme']['th_text']); 
    517532        $t->set_var('row_on', $GLOBALS['phpgw_info']['theme']['row_on']); 
  • trunk/preferences/templates/default/preferences.tpl

    r1405 r4828  
    11<center><b>{messages}</b></center> 
    22<!-- BEGIN form --> 
    3 <form method="POST" action="{action_url}"> 
     3<form method="POST" action="{action_url}" {validateForm}> 
    44<table width="75%" cellpadding=0 cellspacing=0  class="prefTable">  
    55<tr><td colspan="3">{tabs}</td></tr>   
Note: See TracChangeset for help on using the changeset viewer.