Dotclear

Changeset 1512:ef727a109ce6 for plugins


Ignore:
Timestamp:
08/21/13 10:17:59 (12 years ago)
Author:
Franck Paul <carnet.franck.paul@…>
Branch:
default
Parents:
1508:60c4414bcd87 (diff), 1511:b8a3b61d4b84 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merged in pascalchevrel/dotclear/ticket1515 (pull request #46) - Fixes 1515: move hardcoded css from antispam filters to css file

Location:
plugins/antispam/filters
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • plugins/antispam/filters/class.dc.filter.ip.php

    r1454 r1512  
    1717     public $has_gui = true; 
    1818 
    19      private $style_list = 'height: 200px; overflow: auto; margin-bottom: 1em; '; 
    20      private $style_p = 'margin: 1px 0 0 0; padding: 0.2em 0.5em; '; 
    21      private $style_global = 'background: #ccff99; '; 
    22  
    2319     private $con; 
    2420     private $table; 
     
    151147               '<form action="'.html::escapeURL($url).'" method="post">'. 
    152148               '<h3>' . __('IP list') . '</h3>'. 
    153                '<div style="'.$this->style_list.'">'; 
     149               '<div class="antispam">'; 
    154150 
    155151               $res_global = ''; 
     
    163159 
    164160                    $disabled_ip = false; 
    165                     $p_style = $this->style_p; 
     161                    $p_style = ''; 
    166162                    if (!$rs->blog_id) { 
    167163                         $disabled_ip = !$core->auth->isSuperAdmin(); 
    168                          $p_style .= $this->style_global; 
     164                         $p_style .= ' global'; 
    169165                    } 
    170166 
    171167                    $item = 
    172                     '<p style="'.$p_style.'"><label class="classic" for="'.$type.'-ip-'.$rs->rule_id.'">'. 
     168                    '<p class="'.$p_style.'"><label class="classic" for="'.$type.'-ip-'.$rs->rule_id.'">'. 
    173169                    form::checkbox(array('delip[]',$type.'-ip-'.$rs->rule_id),$rs->rule_id,false,'','',$disabled_ip).' '. 
    174170                    html::escapeHTML($pattern). 
  • plugins/antispam/filters/class.dc.filter.ip.php

    r1510 r1512  
    120120 
    121121          '<form action="'.html::escapeURL($url).'" method="post" class="fieldset">'. 
     122 
     123          '<p>'. 
    122124          form::hidden(array('ip_type'),$type). 
    123           '<label class="classic" for="addip_'.$type.'">'.__('Add an IP address: ').' '. 
    124           form::field(array('addip', 'addip_'.$type),18,255). 
    125           '</label>'; 
    126           if ($core->auth->isSuperAdmin()) { 
    127                $res .= '<label class="classic" for="globalip_'.$type.'">'.form::checkbox(array('globalip', 'globalip_'.$type),1).' '. 
    128                __('Global IP (used for all blogs)').'</label> '; 
    129           } 
     125          '<label class="classic" for="addip_'.$type.'">'.__('Add an IP address: ').'</label> '. 
     126          form::field(array('addip', 'addip_'.$type),18,255); 
     127               if ($core->auth->isSuperAdmin()) { 
     128                    $res .= '<label class="classic" for="globalip_'.$type.'">'.form::checkbox(array('globalip', 'globalip_'.$type),1).' '. 
     129                    __('Global IP (used for all blogs)').'</label> '; 
     130               } 
    130131 
    131132          $res .= 
  • plugins/antispam/filters/class.dc.filter.words.php

    r1454 r1512  
    1717     public $name = 'Bad Words'; 
    1818 
    19      private $style_list = 'height: 200px; overflow: auto; margin-bottom: 1em; '; 
    20      private $style_p = 'margin: 1px 0 0 0; padding: 0.2em 0.5em; '; 
    21      private $style_global = 'background: #ccff99; '; 
    22  
    2319     private $con; 
    2420     private $table; 
     
    143139               '<form action="'.html::escapeURL($url).'" method="post" class="fieldset">'. 
    144140               '<h3>' . __('List of bad words') . '</h3>'. 
    145                '<div style="'.$this->style_list.'">'; 
     141               '<div class="antispam">'; 
    146142 
    147143               $res_global = ''; 
     
    150146               { 
    151147                    $disabled_word = false; 
    152                     $p_style = $this->style_p; 
     148 
     149                    $p_style = ''; 
     150 
    153151                    if (!$rs->blog_id) { 
    154152                         $disabled_word = !$core->auth->isSuperAdmin(); 
    155                          $p_style .= $this->style_global; 
     153                         $p_style .= ' global'; 
    156154                    } 
    157155 
    158                     $item = '<p style="'.$p_style.'"><label class="classic" for="word-'.$rs->rule_id.'">'. 
     156                    $item = '<p class="'.$p_style.'"><label class="classic" for="word-'.$rs->rule_id.'">'. 
    159157                         form::checkbox(array('swd[]', 'word-'.$rs->rule_id),$rs->rule_id,false,'','',$disabled_word).' '. 
    160158                         html::escapeHTML($rs->rule_content). 
  • plugins/antispam/filters/class.dc.filter.words.php

    r1510 r1512  
    116116          $res .= 
    117117          '<form action="'.html::escapeURL($url).'" method="post" class="fieldset">'. 
    118           '<p><label class="classic" for="swa">'.__('Add a word ').' '.form::field('swa',20,128).'</label>'; 
     118          '<p><label class="classic" for="swa">'.__('Add a word ').'</label> '.form::field('swa',20,128); 
    119119 
    120120          if ($core->auth->isSuperAdmin()) { 
    121                $res .= '<label class="classic" for="globalsw">'.form::checkbox('globalsw',1).' '. 
    122                __('Global word (used for all blogs)').'</label> '; 
     121               $res .= '<label class="classic" for="globalsw">'.form::checkbox('globalsw',1).'</label> '. 
     122               __('Global word (used for all blogs)'); 
    123123          } 
    124124 
Note: See TracChangeset for help on using the changeset viewer.

Sites map