Changeset 2873 for branches/2.0


Ignore:
Timestamp:
05/27/10 15:26:38 (14 years ago)
Author:
niltonneto
Message:

Ticket #1088 - Correção para validar corretamente limite máximo de anexo.

Location:
branches/2.0
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/admin/inc/class.uiconfig.inc.php

    r1325 r2873  
    200200                        $t->set_var('row_on',    $GLOBALS['phpgw_info']['theme']['row_on']); 
    201201                        $t->set_var('row_off',   $GLOBALS['phpgw_info']['theme']['row_off']); 
     202                        $t->set_var('php_upload_limit',str_replace('M','',ini_get('upload_max_filesize'))); 
    202203                        $t->pparse('out','header'); 
    203204 
  • branches/2.0/expressoMail1_2/js/main.js

    r2769 r2873  
    14571457        else{ 
    14581458                if(data == 'Post-Content-Length') 
    1459                         write_msg(get_lang('The size of this message has exceeded  the limit (%1B).',Element('upload_max_filesize').value)); 
     1459                        write_msg(get_lang('The size of this message has exceeded  the limit (%1B).', preferences.max_attachment_size ? preferences.max_attachment_size : Element('upload_max_filesize').value)); 
    14601460                else if(data) 
    14611461                        write_msg(data); 
  • branches/2.0/expressoMail1_2/templates/default/config.tpl

    r1312 r2873  
    11<!-- BEGIN header --> 
    2 <form method="POST" action="{action_url}"> 
     2<script> 
     3function valida(pForm) 
     4{ 
     5        if((!document.getElementsByName('newsettings[expressoMail_Max_attachment_size]').item(0).value) || (!pForm.php_upload_limit.value)) 
     6                return ExpressoLivre.form(pForm); 
     7 
     8        if (parseInt(document.getElementsByName('newsettings[expressoMail_Max_attachment_size]').item(0).value) > parseInt(pForm.php_upload_limit.value)) 
     9        { 
     10                alert(pForm.valida_alert.value); 
     11                return false; 
     12        } 
     13        else 
     14                return ExpressoLivre.form(pForm); 
     15} 
     16</script> 
     17<form method="POST" action="{action_url}" onsubmit="return valida( this );"> 
     18<input type="hidden" name="php_upload_limit" value="{php_upload_limit}" /> 
    319<table border="0" align="center"> 
    420   <tr bgcolor="{th_bg}"> 
     
    7591    <td>{lang_Max_attachment_size}</td>                   
    7692    <td>                  
    77     <input size="1" name="newsettings[expressoMail_Max_attachment_size]" value="{value_expressoMail_Max_attachment_size}">&nbsp;Mb 
     93    <input size="1" name="newsettings[expressoMail_Max_attachment_size]" value="{value_expressoMail_Max_attachment_size}">&nbsp;Mb<span style='position:relative; left:20px;'>Max: {php_upload_limit}Mb.</span> 
     94    <input type="hidden" name="valida_alert" value="{lang_Value_exceeds_the_PHP_upload_limit_for_this_server}" /> 
    7895    </td>                 
    7996    </tr>  
Note: See TracChangeset for help on using the changeset viewer.