Changeset 525

Show
Ignore:
Timestamp:
08/07/07 23:15:21 (1 year ago)
Author:
laurentj
Message:

added a css for jforms forms

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build/manifests/jelix-lib.mn

    r519 r525  
    352352  jelix.css 
    353353  tooltip.css 
     354  jform.css 
    354355cd lib/jelix-www/js 
    355356  tooltip.js 
  • trunk/build/manifests/jelix-lib.mn

    r519 r525  
    352352  jelix.css 
    353353  tooltip.css 
     354  jform.css 
    354355cd lib/jelix-www/js 
    355356  tooltip.js 
  • trunk/lib/jelix/forms/jFormsBuilderBase.class.php

    r523 r525  
    102102 
    103103    public function outputControlLabel($ctrl){ 
     104        $required = ($ctrl->required == ''?'':' jforms-required'); 
    104105        if($ctrl->type == 'output' || $ctrl->type == 'checkboxes' || $ctrl->type == 'radiobuttons'){ 
    105106            $hint = ($ctrl->hint == ''?'':' title="'.htmlspecialchars($ctrl->hint).'"'); 
    106             echo '<span class="jforms-label"',$hint,'>',htmlspecialchars($ctrl->label),'</span>'; 
     107            echo '<span class="jforms-label',$required,'"',$hint,'>',htmlspecialchars($ctrl->label),'</span>'; 
    107108        }else if($ctrl->type != 'submit'){ 
    108109            $id = $this->_name.'_'.$ctrl->ref; 
    109             echo '<label class="jforms-label" for="'.$id.'">'.htmlspecialchars($ctrl->label).'</label>'; 
     110            echo '<label class="jforms-label',$required,'" for="'.$id.'">'.htmlspecialchars($ctrl->label).'</label>'; 
    110111        } 
    111112    } 
  • trunk/lib/jelix/forms/jFormsBuilderBase.class.php

    r523 r525  
    102102 
    103103    public function outputControlLabel($ctrl){ 
     104        $required = ($ctrl->required == ''?'':' jforms-required'); 
    104105        if($ctrl->type == 'output' || $ctrl->type == 'checkboxes' || $ctrl->type == 'radiobuttons'){ 
    105106            $hint = ($ctrl->hint == ''?'':' title="'.htmlspecialchars($ctrl->hint).'"'); 
    106             echo '<span class="jforms-label"',$hint,'>',htmlspecialchars($ctrl->label),'</span>'; 
     107            echo '<span class="jforms-label',$required,'"',$hint,'>',htmlspecialchars($ctrl->label),'</span>'; 
    107108        }else if($ctrl->type != 'submit'){ 
    108109            $id = $this->_name.'_'.$ctrl->ref; 
    109             echo '<label class="jforms-label" for="'.$id.'">'.htmlspecialchars($ctrl->label).'</label>'; 
     110            echo '<label class="jforms-label',$required,'" for="'.$id.'">'.htmlspecialchars($ctrl->label).'</label>'; 
    110111        } 
    111112    } 
  • trunk/lib/jelix/plugins/tpl/html/block.form.php

    r522 r525  
    4949        $helpdecorator = $param[4]; 
    5050    else 
    51         $helpdecorator = "'jFormsErrorDecoratorAlert'"; 
     51        $helpdecorator = "'jFormsHelpDecoratorAlert'"; 
    5252 
    5353    $content = ' $t->_privateVars[\'__form\'] = '.$param[0].'; 
     
    5656if($GLOBALS[\'gJCoord\']->response!= null){ 
    5757    $GLOBALS[\'gJCoord\']->response->addJSLink($GLOBALS[\'gJConfig\']->urlengine[\'basePath\'].\'jelix/js/jforms.js\'); 
     58    $GLOBALS[\'gJCoord\']->response->addCSSLink($GLOBALS[\'gJConfig\']->urlengine[\'basePath\'].\'jelix/design/jforms.css\'); 
    5859} 
    5960'; 
  • trunk/lib/jelix/plugins/tpl/html/block.form.php

    r522 r525  
    4949        $helpdecorator = $param[4]; 
    5050    else 
    51         $helpdecorator = "'jFormsErrorDecoratorAlert'"; 
     51        $helpdecorator = "'jFormsHelpDecoratorAlert'"; 
    5252 
    5353    $content = ' $t->_privateVars[\'__form\'] = '.$param[0].'; 
     
    5656if($GLOBALS[\'gJCoord\']->response!= null){ 
    5757    $GLOBALS[\'gJCoord\']->response->addJSLink($GLOBALS[\'gJConfig\']->urlengine[\'basePath\'].\'jelix/js/jforms.js\'); 
     58    $GLOBALS[\'gJCoord\']->response->addCSSLink($GLOBALS[\'gJConfig\']->urlengine[\'basePath\'].\'jelix/design/jforms.css\'); 
    5859} 
    5960'; 
Download in other formats: Unified Diff Zip Archive