Changeset 18999


Ignore:
Timestamp:
Nov 12, 2012, 10:38:09 PM (11 years ago)
Author:
Eric
Message:

bug 2788 fixed : Warning message on email exclusion no more remains if misconfiguration is fixed. But it's still necessary to refresh the current page once for the warning message to disappear.

Location:
extensions/UserAdvManager/trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/trunk/admin/UAM_admin.php

    r18239 r18999  
    152152                                if ($conf['obligatory_user_mail_address'])
    153153                                {
    154                                                         // Check if CR-LF exist at begining and end of mail exclusion list - If yes, removes them
    155                 // --------------------------------------------------------------------------------------
    156                 if (preg_match('/^[\s]+/', $_POST['UAM_MailExclusion_List']))
    157                 {
    158                 array_push($page['errors'], l10n('UAM_mail_exclusionlist_error'));
    159                 $UAM_Exclusionlist_Error = true;
    160                 }
    161                 }
    162                 elseif (!$conf['obligatory_user_mail_address'])
    163                 {
    164                 $_POST['UAM_MailExclusion_List'] = '';
    165                 }
     154          // Check if CR-LF exist at begining and end of mail exclusion list - If yes, removes them
     155          // --------------------------------------------------------------------------------------
     156                  if (preg_match('/^[\s]+/', $_POST['UAM_MailExclusion_List']))
     157                  {
     158                  array_push($page['errors'], l10n('UAM_mail_exclusionlist_error'));
     159                  $UAM_Exclusionlist_Error = true;
     160                  }
     161                  }
     162                  elseif (!$conf['obligatory_user_mail_address'])
     163                  {
     164                  $_POST['UAM_MailExclusion_List'] = '';
     165                  }
    166166
    167167    // Consistency check between ConfirmMail and AutoMail - We cannot use GTAutoMail if ConfirmMail is disabled
  • extensions/UserAdvManager/trunk/admin/template/global.tpl

    r18799 r18999  
    228228
    229229            <div class="uam_hide">
    230            
     230
    231231              <label for="UAM_MailExclusion_false"><input id="UAM_MailExclusion_false" value="false" {$UAM_MAILEXCLUSION_FALSE} name="UAM_MailExclusion" type="radio">
    232232                {'UAM_Disable'|@translate}
     
    235235                {'UAM_MailExclusion_true'|@translate}
    236236              </label>
    237            
     237
    238238            </div>
    239239          {else}
     
    242242            </label>
    243243
    244            
    245               <label for="UAM_MailExclusion_false"><input id="UAM_MailExclusion_false" value="false" {$UAM_MAILEXCLUSION_FALSE} name="UAM_MailExclusion" type="radio">
     244            <label for="UAM_MailExclusion_false"><input id="UAM_MailExclusion_false" value="false" {$UAM_MAILEXCLUSION_FALSE} name="UAM_MailExclusion" type="radio">
    246245                {'UAM_Disable'|@translate}
    247               </label>
    248               <label for="UAM_MailExclusion_true"><input id="UAM_MailExclusion_true" value="true" {$UAM_MAILEXCLUSION_TRUE} name="UAM_MailExclusion" type="radio">
     246            </label>
     247
     248            <label for="UAM_MailExclusion_true"><input id="UAM_MailExclusion_true" value="true" {$UAM_MAILEXCLUSION_TRUE} name="UAM_MailExclusion" type="radio">
    249249                {'UAM_MailExclusion_true'|@translate}
    250               </label>
    251            
    252 
    253           {if $UAM_ERROR_REPORTS1}     
    254             <div class="uam_leftmargin">
    255               <textarea class="uam_textfields" name="UAM_MailExclusion_List" id="UAM_MailExclusion_List" rows="3" style="color: red" {$TAG_INPUT_ENABLED}>{$UAM_MAILEXCLUSION_LIST}</textarea>
    256             </div>
    257            
    258           {else}
    259             <div class="uam_leftmargin">
    260               <textarea class="uam_textfields" name="UAM_MailExclusion_List" id="UAM_MailExclusion_List" rows="3" {$TAG_INPUT_ENABLED}>{$UAM_MAILEXCLUSION_LIST}</textarea>
    261             </div>
    262            
    263           {/if}
     250            </label>
     251
     252            {if $UAM_ERROR_REPORTS1}     
     253              <div class="uam_leftmargin">
     254                <textarea class="uam_textfields" name="UAM_MailExclusion_List" id="UAM_MailExclusion_List" rows="3" style="color: red" {$TAG_INPUT_ENABLED}>{$UAM_MAILEXCLUSION_LIST}</textarea>
     255              </div>
     256            {else}
     257              <div class="uam_leftmargin">
     258                <textarea class="uam_textfields" name="UAM_MailExclusion_List" id="UAM_MailExclusion_List" rows="3" {$TAG_INPUT_ENABLED}>{$UAM_MAILEXCLUSION_LIST}</textarea>
     259              </div>
     260            {/if}
    264261          {/if}
    265262          </li>
Note: See TracChangeset for help on using the changeset viewer.