Changeset 221


Ignore:
Timestamp:
Dec 18, 2006 5:47:34 PM (17 years ago)
Author:
quinn
Message:

Q - Fixed codebase css bug where class="error" was still being used for the FV. Fixed StrTime? bug.

Location:
tags/2.0.2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • tags/2.0.2/lib/FormValidator.inc.php

    r220 r221  
    491491    function validateStrDate($form_name, $msg='')
    492492    {
     493        if ('' == getFormData($form_name)) {
     494            // Empty string is okay
     495            return true;
     496        }
    493497        $timestamp = strtotime(getFormData($form_name, '0'));
    494498        if ($timestamp === -1 || $timestamp === false) {
  • tags/2.0.2/lib/Utilities.inc.php

    r220 r221  
    495495    // Translate the human string date into SQL-safe date format.
    496496    if (empty($date) || strpos($date, '0000-00-00') !== false || strtotime($date) === -1 || strtotime($date) === false) {
    497         return '0000-00-00';
     497        // Return a string of zero time, formatted the same as $format.
     498        return strtr($format, array(
     499            'Y' => '0000',
     500            'm' => '00',
     501            'd' => '00',
     502            'H' => '00',
     503            'i' => '00',
     504            's' => '00',
     505        ));
    498506    } else {
    499507        return date($format, strtotime($date));
  • tags/2.0.2/services/templates/admin_form.ihtml

    r185 r221  
    1313    </tr>
    1414    <tr>
    15         <td class="right"><label for="username"<?php $fv->err('username', ' class="error"') ?>><?php echo _("Username"); ?></label></td>
     15        <td class="right"><label for="username"<?php $fv->err('username') ?>><?php echo _("Username"); ?></label></td>
    1616        <td>
    1717            <input type="text" class="small" size="50" name="username" value="<?php echo oTxt($frm['username']); ?>" />
     
    1919    </tr>
    2020    <tr>
    21         <td class="right"><label for="userpass"<?php $fv->err('userpass', ' class="error"') ?>><?php echo _("Password"); ?></label></td>
     21        <td class="right"><label for="userpass"<?php $fv->err('userpass') ?>><?php echo _("Password"); ?></label></td>
    2222        <td>
    2323            <input type="password" class="small" size="50" name="userpass" value="<?php echo oTxt($frm['userpass']); ?>" />
     
    2525    </tr>
    2626    <tr>
    27         <td class="right"><label for="first_name"<?php $fv->err('first_name', ' class="error"') ?>><?php echo _("First name"); ?></label></td>
     27        <td class="right"><label for="first_name"<?php $fv->err('first_name') ?>><?php echo _("First name"); ?></label></td>
    2828        <td>
    2929            <input type="text" class="small" size="50" name="first_name" value="<?php echo oTxt($frm['first_name']); ?>" />
     
    3131    </tr>
    3232    <tr>
    33         <td class="right"><label for="last_name"<?php $fv->err('last_name', ' class="error"') ?>><?php echo _("Last name"); ?></label></td>
     33        <td class="right"><label for="last_name"<?php $fv->err('last_name') ?>><?php echo _("Last name"); ?></label></td>
    3434        <td>
    3535            <input type="text" class="small" size="50" name="last_name" value="<?php echo oTxt($frm['last_name']); ?>" />
     
    3737    </tr>
    3838    <tr>
    39         <td class="right"><label for="email"<?php $fv->err('email', ' class="error"') ?>><?php echo _("Email"); ?></label></td>
     39        <td class="right"><label for="email"<?php $fv->err('email') ?>><?php echo _("Email"); ?></label></td>
    4040        <td>
    4141            <input type="text" class="medium" size="50" name="email" value="<?php echo oTxt($frm['email']); ?>" />
     
    4343    </tr>
    4444    <tr>
    45         <td class="right"><label for="user_type"<?php $fv->err('user_type', ' class="error"') ?>><?php echo _("User type"); ?></label></td>
     45        <td class="right"><label for="user_type"<?php $fv->err('user_type') ?>><?php echo _("User type"); ?></label></td>
    4646        <td>
    4747            <select name="user_type" class="small">
  • tags/2.0.2/services/templates/password.ihtml

    r185 r221  
    66<table>
    77    <tr>
    8         <td class="right"><label for="oldpassword"<?php $fv->err('oldpassword', ' class="error"') ?>><?php echo _("Old password"); ?></label></td>
     8        <td class="right"><label for="oldpassword"<?php $fv->err('oldpassword') ?>><?php echo _("Old password"); ?></label></td>
    99        <td>
    1010            <input type="text" class="medium" size="50" name="oldpassword" />
     
    1212    </tr>
    1313    <tr>
    14         <td class="right"><label for="newpassword"<?php $fv->err('newpassword', ' class="error"') ?>><?php echo _("New password"); ?></label></td>
     14        <td class="right"><label for="newpassword"<?php $fv->err('newpassword') ?>><?php echo _("New password"); ?></label></td>
    1515        <td>
    1616            <input type="password" class="medium" size="50" name="newpassword" />
     
    1818    </tr>
    1919    <tr>
    20         <td class="right"><label for="newpassword2"<?php $fv->err('newpassword2', ' class="error"') ?>><?php echo _("New password again"); ?></label></td>
     20        <td class="right"><label for="newpassword2"<?php $fv->err('newpassword2') ?>><?php echo _("New password again"); ?></label></td>
    2121        <td>
    2222            <input type="password" class="medium" size="50" name="newpassword2" />
Note: See TracChangeset for help on using the changeset viewer.