Bugs: Browse | Submit New | Admin

[#25096] REFACTOR: Eliminate explicit use of <label> tags on all forms

Date:
2009-04-01 21:27
Priority:
1
Submitted By:
Steven Hines (stevenghines)
Assigned To:
Jeff Rickard (jrickard)
Category:
None
State:
Open
Severity:
Status:
Page/Area:
 
Summary:
REFACTOR: Eliminate explicit use of <label> tags on all forms

Detailed description
See app/views/dt/accounts/new.html.erb and app/views/dt/participants/new.html.erb for a better way to render form
labels

Add A Comment: Notepad

Please login


Followup

Message
Date: 2009-04-27 22:24
Sender: Jeff Rickard

It says: There are 479 in 31 files (searched 6033 files)
Date: 2009-04-27 22:23
Sender: Jeff Rickard

Here is a Perl script you can run in order to identify all the
changes:
#!/usr/bin/perl

@directories = split(/\n\n/, `ls -R1`);

my @filelist;
my $changeCount, $fileCount;

foreach $directory (@directories) {
    my @files = split(/\n/, $directory);

    my $dirname = shift(@files);
    $dirname =~ s/://;

    foreach $file (@files) {
        #if ($file =~ /rb$/) {
            push(@filelist, "$dirname/$file");
        #}
    }
}

foreach $file (@filelist) {
    open(INF, $file);
    @lines = <INF>;
    close(INF);

    my $formCount = 0;
    my $lineNumber = 0;
    my $changeCheck = 0;

    foreach $line (@lines) {
        $lineNumber++;

        if ($line =~ /\<form/) {
            $formCount++;
        }

        if ($line =~ /\<\/form/) {
            $formCount--;
        }

        if ($formCount > 0) {
            if ($line =~ /<label/) {
                $changeCount++;
                $changeCheck = 1;
                print "$file ($lineNumber): $line";
            }
        }
    }

    if ($changeCheck == 1) {
        $fileCount++;
    }
}

print "\nThere are $changeCount changes required in $fileCount
files (searched " . scalar(@filelist) . "
files)\n";

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
assigned_tostevenghines2009-04-24 17:41stevenghines
summaryREFACTOR: Eliminate explicit use of <label> tags on all forms2009-04-24 17:41stevenghines