Dotclear

Changeset 3639:fe9f4d94f86b for plugins


Ignore:
Timestamp:
12/29/17 14:17:26 (8 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add required attribute for mandatory fields

Location:
plugins
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • plugins/blogroll/edit.php

    r3297 r3639  
    116116 
    117117     '<p><label for="link_desc" class="required classic"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label> '. 
    118      form::field('link_desc',30,255,html::escapeHTML($link_desc)). 
     118     form::field('link_desc',30,255,html::escapeHTML($link_desc),'','',false,'required placeholder="'.__('Title').'"'). 
    119119 
    120120     form::hidden('edit',1). 
     
    134134 
    135135     '<p><label for="link_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label> '. 
    136      form::field('link_title',30,255,html::escapeHTML($link_title)).'</p>'. 
     136     form::field('link_title',30,255,html::escapeHTML($link_title),'','',false,'required placeholder="'.__('Title').'"').'</p>'. 
    137137 
    138138     '<p><label for="link_href" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('URL:').'</label> '. 
    139      form::field('link_href',30,255,html::escapeHTML($link_href)).'</p>'. 
     139     form::field('link_href',30,255,html::escapeHTML($link_href),'','',false,'required placeholder="'.__('URL').'"').'</p>'. 
    140140 
    141141     '<p><label for="link_desc">'.__('Description:').'</label> '. 
  • plugins/blogroll/index.php

    r3297 r3639  
    273273'<h3>'.__('Add a new link').'</h3>'. 
    274274'<p class="col"><label for="link_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label> '. 
    275 form::field('link_title',30,255,$link_title). 
     275form::field('link_title',30,255,$link_title,'','',false,'required placeholder="'.__('Title').'"'). 
    276276'</p>'. 
    277277 
    278278'<p class="col"><label for="link_href" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('URL:').'</label> '. 
    279 form::field('link_href',30,255,$link_href). 
     279form::field('link_href',30,255,$link_href,'','',false,'required placeholder="'.__('URL').'"'). 
    280280'</p>'. 
    281281 
     
    298298'<h3>'.__('Add a new category').'</h3>'. 
    299299'<p><label for="cat_title" class=" classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label> '. 
    300 form::field('cat_title',30,255,$cat_title).' '. 
     300form::field('cat_title',30,255,$cat_title,'','',false,'required placeholder="'.__('Title').'"').' '. 
    301301form::hidden(array('p'),'blogroll'). 
    302302$core->formNonce(). 
     
    312312     '<h3>'.__('Import links').'</h3>'. 
    313313     '<p><label for="links_file" class=" classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('OPML or XBEL File:').'</label> '. 
    314      '<input type="file" id="links_file" name="links_file" /></p>'. 
     314     '<input type="file" id="links_file" name="links_file" required /></p>'. 
    315315     '<p>'.form::hidden(array('p'),'blogroll'). 
    316316     $core->formNonce(). 
  • plugins/importExport/inc/class.dc.import.flat.php

    r3627 r3639  
    224224               echo 
    225225               '<p><label for="your_pwd" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Your password:').'</label>'. 
    226                form::password('your_pwd',20,255).'</p>'. 
     226               form::password('your_pwd',20,255,'','','',false,'required placeholder="'.__('Password').'"').'</p>'. 
    227227 
    228228               '<p>'. 
  • plugins/pages/page.php

    r3627 r3639  
    487487               '<p class="col">'. 
    488488               '<label class="required no-margin bold" for="post_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label>'. 
    489                form::field('post_title',20,255,html::escapeHTML($post_title),'maximal'). 
     489               form::field('post_title',20,255,html::escapeHTML($post_title),'maximal','',false,'required placeholder="'.__('Title').'"'). 
    490490               '</p>', 
    491491 
     
    499499               '<p class="area" id="content-area"><label class="required bold" '. 
    500500               'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. 
    501                form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content)). 
     501               form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content),'','',false,'required placeholder="'.__('Content').'"'). 
    502502               '</p>', 
    503503 
     
    664664     '<div class="constrained">'. 
    665665     '<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Name:').'</label>'. 
    666      form::field('comment_author',30,255,html::escapeHTML($core->auth->getInfo('user_cn'))). 
     666     form::field('comment_author',30,255,html::escapeHTML($core->auth->getInfo('user_cn')),'','',false,'required placeholder="'.__('Author').'"'). 
    667667     '</p>'. 
    668668 
     
    677677     '<p class="area"><label for="comment_content" class="required"><abbr title="'.__('Required field').'">*</abbr> '. 
    678678     __('Comment:').'</label> '. 
    679      form::textarea('comment_content',50,8,html::escapeHTML('')). 
     679     form::textarea('comment_content',50,8,'','','',false,'required placeholder="'.__('Comment').'"'). 
    680680     '</p>'. 
    681681 
  • plugins/simpleMenu/index.php

    r3582 r3639  
    230230                                   'descr' => $item_descr, 
    231231                                   'url' => $item_url, 
    232                                    'targetBlank'  => $item_targetBlank  
     232                                   'targetBlank'  => $item_targetBlank 
    233233                              ); 
    234                                
     234 
    235235                              // Save menu in blog settings 
    236236                              $core->blog->settings->system->put('simpleMenu',$menu); 
     
    480480               echo '<fieldset><legend>'.$item_type_label.($item_select_label != '' ? ' ('.$item_select_label.')' : '').'</legend>'; 
    481481               echo '<p class="field"><label for="item_label" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '. 
    482                     __('Label of item menu:').'</label>'.form::field('item_label',20,255,$item_label).'</p>'; 
     482                    __('Label of item menu:').'</label>'. 
     483                    form::field('item_label',20,255,$item_label,'','',false,'required placeholder="'.__('Label').'"'). 
     484                    '</p>'; 
    483485               echo '<p class="field"><label for="item_descr" class="classic">'. 
    484486                    __('Description of item menu:').'</label>'.form::field('item_descr',30,255,$item_descr).'</p>'; 
    485487               echo '<p class="field"><label for="item_url" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '. 
    486                     __('URL of item menu:').'</label>'.form::field('item_url',40,255,$item_url).'</p>'; 
     488                    __('URL of item menu:').'</label>'. 
     489                    form::field('item_url',40,255,$item_url,'','',false,'required placeholder="'.__('URL').'"'). 
     490                    '</p>'; 
    487491               echo form::hidden('item_type',$item_type).form::hidden('item_select',$item_select); 
    488492               echo '<p class="field"><label for="item_descr" class="classic">'. 
     
    537541     foreach ($menu as $i => $m) { 
    538542          echo '<tr class="line" id="l_'.$i.'">'; 
    539            
     543 
    540544          //because targetBlank can not exists. This value has been added after this plugin creation. 
    541545          if((isset($m['targetBlank'])) && ($m['targetBlank'])) { 
     
    546550               $targetBlankStr =''; 
    547551          } 
    548            
     552 
    549553          if (!$step) { 
    550554               $count++; 
     
    562566               echo '<td class="nowrap">'.html::escapeHTML($m['url']).'</td>'; 
    563567               echo '<td class="nowrap">'.$targetBlankStr.'</td>'; 
    564   
     568 
    565569          } 
    566570          echo '</tr>'; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map