Dotclear


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/post.php

    r3627 r3639  
    649649               '<p class="col">'. 
    650650               '<label class="required no-margin bold" for="post_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label>'. 
    651                form::field('post_title',20,255,html::escapeHTML($post_title),'maximal'). 
     651               form::field('post_title',20,255,html::escapeHTML($post_title),'maximal','',false,'required placeholder="'.__('Title').'"'). 
    652652               '</p>', 
    653653 
     
    661661               '<p class="area" id="content-area"><label class="required bold" '. 
    662662               'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. 
    663                form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content)). 
     663               form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content), 
     664                    '','',false,'required placeholder="'.__('Content').'"'). 
    664665               '</p>', 
    665666 
     
    789790     '<div class="constrained">'. 
    790791     '<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Name:').'</label>'. 
    791      form::field('comment_author',30,255,html::escapeHTML($core->auth->getInfo('user_cn'))). 
     792     form::field('comment_author',30,255,html::escapeHTML($core->auth->getInfo('user_cn')), 
     793          '','',false,'required placeholder="'.__('Author').'"'). 
    792794     '</p>'. 
    793795 
     
    802804     '<p class="area"><label for="comment_content" class="required"><abbr title="'.__('Required field').'">*</abbr> '. 
    803805     __('Comment:').'</label> '. 
    804      form::textarea('comment_content',50,8,html::escapeHTML('')). 
     806     form::textarea('comment_content',50,8,html::escapeHTML(''),'','',false,'required placeholder="'.__('Comment').'"'). 
    805807     '</p>'. 
    806808 
Note: See TracChangeset for help on using the changeset viewer.

Sites map