phplist

NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1


View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002553phplist applicationConfigurationpublic08-02-05 04:2512-02-09 13:54
ReporterDamienMcKenna 
PriorityimmediateSeveritytweakReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.9.3 
Target VersionFixed in Version2.9.5 
Summary0002553: admin/spageedit.php: Clean up attributes list
DescriptionThe attributes list should be a regular column-based table rather than one table per attribute.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to 0003586closed Continuous overall improvement tasks 
related to 0002554closedmichiel commonlib/pages/attributes.php: clean up the UI 

-  Notes
(0003428)
DamienMcKenna (manager)
08-02-05 04:27
edited on: 08-02-05 04:37

Change lines 167 onwards from:

  while ($row = Sql_Fetch_Array($req)) {
    if (is_array($attributedata[$row["id"]])) {
      $checked[$row["id"]] = "checked";
      $bgcol = '#F7E7C2';
      $value = $attributedata[$row["id"]];
     } else {
      $value = $row;
      $bgcol = '#ffffff';
    }
  ?>
  <table border=1 width=100% bgcolor="<?php echo $bgcol?>">
  <tr><td colspan=2 width=150>Attribute:<?php echo $row["id"] ?></td><td colspan=2>Check this box to use this attribute in the page <input type="checkbox" name="attr_use[<? echo $row["id"] ?>]" value="1" <?=$checked[$row["id"]]?>></td></tr>
  <tr><td colspan=2>Name: </td><td colspan=2><h2><?php echo htmlspecialchars(stripslashes($row["name"])) ?></h2></td></tr>
  <tr><td colspan=2>Type: </td><td colspan=2><h2><?php echo $row["type"]?></h2></td></tr>
  <tr><td colspan=2>Default Value: </td><td colspan=2><input type=text name="attr_default[<?php echo $row["id"]?>]" value="<? echo htmlspecialchars(stripslashes($value["default_value"])) ?>" size=40></td></tr>
  <tr><td>Order of Listing: </td><td><input type=text name="attr_listorder[<?php echo $row["id"]?>]" value="<? echo $value["listorder"] ?>" size=5></td>
  <td>Is this attribute required?: </td><td><input type=checkbox name="attr_required[<?php echo $row["id"]?>]" value="1" <? echo $value["required"] ? "checked": "" ?>></td></tr>
  </table><hr>
<?php
  }


to:


  print "<table border=\"1\" width=\"100%\">\n";
    print " <tr>\n";
    print " <th>use?</th>\n";
    print " <th>name</th>\n";
    print " <th>type</th>\n";
    print " <th>default</th>\n";
    print " <th>required</th>\n";
    print " <th>order</th>\n";
    print " </tr>\n";

  while ($row = Sql_Fetch_Array($req)) {
    if (is_array($attributedata[$row["id"]])) {
      $checked[$row["id"]] = "checked";
      $bgcol = '#F7E7C2';
      $value = $attributedata[$row["id"]];
     } else {
      $value = $row;
      $bgcol = '#ffffff';
    }
  ?>
    <tr bgcolor="<?php echo $bgcol; ?>">
        <td><input type="checkbox" name="attr_use[<? echo $row["id"]; ?>]" value="1" <? echo $checked[$row["id"]]; ?> /></td>
        <td><?php echo htmlspecialchars(stripslashes($row["name"])); ?></td>
        <td><?php echo $row["type"]; ?></td>
        <td><input type="text" name="attr_default[<?php echo $row["id"]; ?>]" value="<? echo htmlspecialchars(stripslashes($value["default_value"])) ?>" size="15" /></td>
        <td><input type="checkbox" name="attr_required[<?php echo $row["id"]; ?>]" value="1" <? echo $value["required"] ? "checked": ""; ?> /></td>
        <td><input type="text" name="attr_listorder[<?php echo $row["id"]; ?>]" value="<? echo $value["listorder"]; ?>" size="5" /></td>
    </tr>
<?php
  }
    print "</table>\n";

(0003429)
DamienMcKenna (manager)
08-02-05 04:31

Waiting for insertion of code into CVS.
(0003572)
michiel (manager)
18-02-05 16:35

Made this part of 2.9.5, because with the translation stuff going in, it's not a simple cut-n-paste anymore.


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker