Dotclear

Changeset 3240:9d9ac74a3d59


Ignore:
Timestamp:
04/16/16 10:35:36 (9 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add placeholder option for search widget, closes #2185

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • locales/fr/plugins.po

    r3151 r3240  
    413413msgstr "Titre (optionnel)" 
    414414 
     415msgid "Placeholder (HTML5 only, optional):" 
     416msgstr "Texte indicatif (HTML5 seulement, optionnel) :" 
     417 
    415418msgid "All categories" 
    416419msgstr "Toutes les catégories" 
  • plugins/widgets/_default_widgets.php

    r2778 r3240  
    2020$__widgets->create('search',__('Search engine'),array('defaultWidgets','search'),null,'Search engine form'); 
    2121$__widgets->search->setting('title',__('Title (optional)').' :',__('Search')); 
     22$__widgets->search->setting('placeholder',__('Placeholder (HTML5 only, optional):'),''); 
    2223$__widgets->search->setting('homeonly',__('Display on:'),0,'combo', 
    2324     array(__('All pages') => 0, __('Home page only') => 1, __('Except on home page') => 2)); 
  • plugins/widgets/_widgets_functions.php

    r3030 r3240  
    3636               '<form action="'.$core->blog->url.'" method="get" role="search">'. 
    3737               '<fieldset>'. 
    38                '<p><input type="text" size="10" maxlength="255" id="q" name="q" value="'.$value.'" /> '. 
     38               '<p><input type="text" size="10" maxlength="255" id="q" name="q" value="'.$value.'" '. 
     39               ($w->placeholder ? 'placeholder="'.html::escapeHTML($w->placeholder).'"' : '').'/> '. 
    3940               '<input type="submit" class="submit" value="ok" /></p>'. 
    4041               '</fieldset>'. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map