Changeset 23205


Ignore:
Timestamp:
06/14/13 14:59:53 (7 years ago)
Author:
mistic100
Message:

new "clear" theme + config

Location:
extensions/ContactForm
Files:
3 added
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • extensions/ContactForm/admin/config.php

    r18393 r23205  
    1515    'cf_mail_type' =>         $_POST['cf_mail_type'], 
    1616    'cf_redirect_url' =>      ($_POST['cf_redirect_url']!='http://') ? $_POST['cf_redirect_url'] : null, 
     17    'cf_theme' =>             $_POST['cf_theme'], 
    1718    ); 
    1819  $conf['ContactForm_before'] = $_POST['cf_before']; 
  • extensions/ContactForm/admin/template/config.tpl

    r18393 r23205  
    11{combine_css path=$CONTACT_FORM_PATH|@cat:"admin/template/style.css"} 
     2{include file='include/colorbox.inc.tpl'} 
     3 
     4{footer_script}{literal} 
     5jQuery("a.preview-box").colorbox(); 
     6 
     7jQuery("input[name='cf_theme']").change(function() { 
     8  jQuery("input[name='cf_theme']").parents(".themeBox").removeClass("themeDefault"); 
     9  jQuery(this).parents(".themeBox").addClass("themeDefault"); 
     10}); 
     11{/literal}{/footer_script} 
    212 
    313<div class="titrePage"> 
     
    7282   
    7383  <fieldset> 
     84    <legend>{'Theme'|@translate}</legend> 
     85     
     86    <div class="themeBoxes"> 
     87      <div class="themeBox {if $cf_theme=='clear'}themeDefault{/if}"> 
     88        <div class="themeName"><label> 
     89          <input type="radio" name="cf_theme" value="clear" {if $cf_theme=='clear'}checked{/if}> 
     90          Clear 
     91        </label></div> 
     92        <div class="themeShot"> 
     93          <a href="{$CONTACT_FORM_PATH}admin/template/prev-clear.jpg" class="preview-box"><img src="{$CONTACT_FORM_PATH}admin/template/prev-clear.jpg" width="150"/></a> 
     94        </div> 
     95      </div> 
     96      <div class="themeBox {if $cf_theme=='dark'}themeDefault{/if}"> 
     97        <div class="themeName"><label> 
     98          <input type="radio" name="cf_theme" value="dark" {if $cf_theme=='dark'}checked{/if}> 
     99          Dark 
     100        </label></div> 
     101        <div class="themeShot"> 
     102          <a href="{$CONTACT_FORM_PATH}admin/template/prev-dark.jpg" class="preview-box"><img src="{$CONTACT_FORM_PATH}admin/template/prev-dark.jpg" width="150"/></a> 
     103        </div> 
     104      </div> 
     105    </div> 
     106  </fieldset> 
     107   
     108  <fieldset> 
    74109    <legend>{'Text before the contact form'|@translate}</legend> 
    75110    <textarea rows="4" cols="80" class="description" name="cf_before">{$cf_before}</textarea> 
  • extensions/ContactForm/admin/template/style.css

    r18407 r23205  
    2626  border-radius:5px; 
    2727} 
     28 
     29.themeBox { 
     30  height:auto; 
     31  padding-bottom:5px; 
     32} 
  • extensions/ContactForm/include/install.inc.php

    r22257 r23205  
    3232      'cf_mail_type' => 'text/html', 
    3333      'cf_redirect_url' => null, 
     34      'cf_theme' => 'dark', 
    3435      )); 
    3536     
     
    8283       
    8384      // save config 
    84       $conf['ContactForm'] = serialize($new_conf); 
    8585      $conf['ContactForm_before'] = stripslashes(@$conf['persoformtop']); 
    8686      $conf['ContactForm_after'] = stripslashes(@$conf['persoformbottom']); 
    8787       
    88       conf_update_param('ContactForm', $conf['ContactForm']); 
    8988      conf_update_param('ContactForm_before', $conf['ContactForm_before']); 
    9089      conf_update_param('ContactForm_after', $conf['ContactForm_after']); 
     
    9291      pwg_query('DELETE FROM `'. CONFIG_TABLE .'` WHERE param IN("persoformtop", "persoformbottom") LIMIT 2;'); 
    9392    } 
     93     
     94    // new param 2.5.c 
     95    if (!isset($new_conf['cf_theme'])) 
     96    { 
     97      $new_conf['cf_theme'] = 'dark'; 
     98    } 
     99     
     100    // save config 
     101    $conf['ContactForm'] = serialize($new_conf); 
     102    conf_update_param('ContactForm', $conf['ContactForm']); 
    94103  } 
    95104} 
  • extensions/ContactForm/template/mail/style-dark.css

    r22255 r23205  
    22  margin:0px;  
    33  padding:0px; 
    4   font-family: Univers, Helvetica, Optima;  
     4  font-family:"Tahoma", "Verdana", sans-serif;  
    55  font-size:12px; 
    66  text-align:left; 
     
    1111a { 
    1212  color:#CE2E5A; 
     13  text-decoration:none; 
     14} 
     15 
     16a:hover { 
     17  text-decoration:underline; 
    1318} 
    1419  
     
    2126#the_header { 
    2227  background:#222; 
    23   border-top:5px solid #CE2E5A; 
     28  border-top:4px solid #CE2E5A; 
    2429  border-bottom:1px solid #111; 
    2530  font-size:16px; 
Note: See TracChangeset for help on using the changeset viewer.