diff options
author | Colin Fleming <cj_fleming@sky.com> | 2013-03-05 18:38:09 +0000 |
---|---|---|
committer | Colin Fleming <cj_fleming@sky.com> | 2013-03-05 18:38:09 +0000 |
commit | eabce399c51e3503b12b717ea66e84de77908197 (patch) | |
tree | dd3c2f15d3a7c70205e90088af49b6639925ca39 /usr/local/www/widgets | |
parent | bcab1b076d4a73bf2ffdb3aa527fe0157185a6cb (diff) | |
download | pfsense-eabce399c51e3503b12b717ea66e84de77908197.zip pfsense-eabce399c51e3503b12b717ea66e84de77908197.tar.gz |
Tidy up widget XHTML
Close input tags
Change target _NEW to _BLANK
Add ALT to img tags
Add CDATA sections to scipts.
Changed name in FORM tag to be different, not allowed to have the same
"name" in XHMTL
Diffstat (limited to 'usr/local/www/widgets')
-rw-r--r-- | usr/local/www/widgets/widgets/picture.widget.php | 15 | ||||
-rw-r--r-- | usr/local/www/widgets/widgets/rss.widget.php | 21 |
2 files changed, 19 insertions, 17 deletions
diff --git a/usr/local/www/widgets/widgets/picture.widget.php b/usr/local/www/widgets/widgets/picture.widget.php index 27b9df2..145768c 100644 --- a/usr/local/www/widgets/widgets/picture.widget.php +++ b/usr/local/www/widgets/widgets/picture.widget.php @@ -69,26 +69,27 @@ if($_POST) { ?> -<input type="hidden" id="picture-config" name="picture-config" value=""> +<input type="hidden" id="picture-config" name="picture-config" value="" /> -<div id="picture-settings" name="picture-settings" class="widgetconfigdiv" style="display:none;"> - </form> +<div id="picture-settings" class="widgetconfigdiv" style="display:none;"> <form action="/widgets/widgets/picture.widget.php" method="post" name="iforma" enctype="multipart/form-data"> - <input name="pictfile" type="file" class="formfld unknown" id="pictfile" size="20"></p> + <input name="pictfile" type="file" class="formfld unknown" id="pictfile" size="20" /> <input id="submita" name="submita" type="submit" class="formbtn" value="Upload" /><br/> <b>NOTE:</b> Best image size is 350x350 or smaller. </form> </div> <div id="picture-widgets" style="padding: 5px"> - <a href='/widgets/widgets/picture.widget.php?getpic=true' target='_new'> - <img border=0 width="350" height="350" src="/widgets/widgets/picture.widget.php?getpic=true"> + <a href='/widgets/widgets/picture.widget.php?getpic=true' target='_blank'> + <img border="0" width="350" height="350" src="/widgets/widgets/picture.widget.php?getpic=true" alt="picture" /> </a> </div> <!-- needed to show the settings widget icon --> -<script language="javascript" type="text/javascript"> +<script type="text/javascript"> +//<![CDATA[ selectIntLink = "picture-configure"; textlink = document.getElementById(selectIntLink); textlink.style.display = "inline"; +//]]> </script> diff --git a/usr/local/www/widgets/widgets/rss.widget.php b/usr/local/www/widgets/widgets/rss.widget.php index d7bbcbd..f955fcd 100644 --- a/usr/local/www/widgets/widgets/rss.widget.php +++ b/usr/local/www/widgets/widgets/rss.widget.php @@ -76,14 +76,13 @@ else ?> -<input type="hidden" id="rss-config" name="rss-config" value=""> +<input type="hidden" id="rss-config" name="rss-config" value="" /> -<div id="rss-settings" name="rss-settings" class="widgetconfigdiv" style="display:none;"> - </form> - <form action="/widgets/widgets/rss.widget.php" method="post" name="iforma"> - <textarea name=rssfeed class="formfld unknown" id="rssfeed" cols="40" rows="3"><?=$textarea_txt;?></textarea> +<div id="rss-settings" class="widgetconfigdiv" style="display:none;"> + <form action="/widgets/widgets/rss.widget.php" method="post" name="iformc"> + <textarea name="rssfeed" class="formfld unknown" id="rssfeed" cols="40" rows="3"><?=$textarea_txt;?></textarea> <br/> - <table> + <table summary="rss widget"> <tr> <td align="right"> Display number of items: @@ -131,7 +130,7 @@ else </td> <td> - <input id="submita" name="submita" type="submit" class="formbtn" value="Save" /> + <input id="submitc" name="submitc" type="submit" class="formbtn" value="Save" /> </td> </tr> </table> @@ -162,11 +161,11 @@ else foreach($feed->get_items() as $item) { $feed = $item->get_feed(); $feed->strip_htmltags(); - echo "<a target='_new' href='" . $item->get_permalink() . "'>" . $item->get_title() . "</a><br/>"; + echo "<a target='blank' href='" . $item->get_permalink() . "'>" . $item->get_title() . "</a><br/>"; $content = $item->get_content(); $content = strip_tags($content); echo textLimit($content, $rsswidgettextlength) . "<br/>"; - echo "Source: <a target='_new' href='" . $item->get_permalink() . "'><img src='" . $feed->get_favicon() . "' alt='" . $feed->get_title() . "' title='" . $feed->get_title() . "' border='0' width='16' height='16'></a><br/>"; + echo "Source: <a target='_blank' href='" . $item->get_permalink() . "'><img src='" . $feed->get_favicon() . "' alt='" . $feed->get_title() . "' title='" . $feed->get_title() . "' border='0' width='16' height='16' /></a><br/>"; $counter++; if($counter > $max_items) break; @@ -176,8 +175,10 @@ else </div> <!-- needed to display the widget settings menu --> -<script language="javascript" type="text/javascript"> +<script type="text/javascript"> +//<![CDATA[ selectIntLink = "rss-configure"; textlink = document.getElementById(selectIntLink); textlink.style.display = "inline"; +//]]> </script> |