Revision: 1648
http://mrbs.svn.sourceforge.net/mrbs/?rev=1648&view=rev
Author: cimorrison
Date: 2010-11-25 10:40:21 +0000 (Thu, 25 Nov 2010)
Log Message:
-----------
Changed the privacy and confirmation status fields to be radio buttons rather
than checkboxes to make it slightly clearer what they do.
Modified Paths:
--------------
mrbs/trunk/web/edit_entry.php
mrbs/trunk/web/edit_entry_handler.php
mrbs/trunk/web/lang.en
Modified: mrbs/trunk/web/edit_entry.php
===================================================================
--- mrbs/trunk/web/edit_entry.php 2010-11-25 09:18:20 UTC (rev 1647)
+++ mrbs/trunk/web/edit_entry.php 2010-11-25 10:40:21 UTC (rev 1648)
@@ -961,46 +961,42 @@
</div>
<?php
- // Status
- if ($private_enabled || $confirmation_enabled)
- {
- echo "<div id=\"div_status\">\n";
- echo "<label>" . get_vocab("status") . ":</label>\n";
+ // Confirmation status
+ if ($confirmation_enabled)
+ {
+ echo "<div id=\"div_confirmation_status\">\n";
+ echo "<label>" . get_vocab("confirmation_status") . ":</label>\n";
echo "<div class=\"group\">\n";
-
- // Privacy status
- if ($private_enabled)
- {
- echo "<input id=\"private\" class=\"checkbox\" name=\"private\"
type=\"checkbox\" value=\"yes\"";
- if ($private)
- {
- echo " checked=\"checked\"";
- }
- if ($private_mandatory)
- {
- echo " disabled=\"true\"";
- }
- echo ">\n";
- echo "<label for=\"private\">" . get_vocab("private") . "</label>\n";
- }
-
- // Confirmation status
- if ($confirmation_enabled)
- {
- echo "<input id=\"confirmed\" class=\"checkbox\" name=\"confirmed\"
type=\"checkbox\" value=\"yes\"";
- if ($confirmed)
- {
- echo " checked=\"checked\"";
- }
- echo ">\n";
- echo "<label for=\"confirmed\">" . get_vocab("confirmed") .
"</label>\n";
- }
-
+ echo "<label><input class=\"radio\" name=\"confirmed\" type=\"radio\"
value=\"1\"" .
+ (($confirmed) ? " checked=\"checked\"" : "") .
+ ">" . get_vocab("confirmed") . "</label>\n";
+ echo "<label><input class=\"radio\" name=\"confirmed\" type=\"radio\"
value=\"0\"" .
+ (($confirmed) ? "" : " checked=\"checked\"") .
+ ">" . get_vocab("tentative") . "</label>\n";
echo "</div>\n";
echo "</div>\n";
}
-
+ // Privacy status
+ if ($private_enabled)
+ {
+ // No need to pass through a hidden variable if disabled because the
handler will sort it out
+ echo "<div id=\"div_privacy_status\">\n";
+ echo "<label>" . get_vocab("privacy_status") . ":</label>\n";
+ echo "<div class=\"group\">\n";
+ echo "<label><input class=\"radio\" name=\"private\" type=\"radio\"
value=\"0\"" .
+ (($private) ? "" : " checked=\"checked\"") .
+ (($private_mandatory) ? " disabled=\"disabled\"" : "") .
+ ">" . get_vocab("public") . "</label>\n";
+ echo "<label><input class=\"radio\" name=\"private\" type=\"radio\"
value=\"1\"" .
+ (($private) ? " checked=\"checked\"" : "") .
+ (($private_mandatory) ? " disabled=\"disabled\"" : "") .
+ ">" . get_vocab("private") . "</label>\n";
+ echo "</div>\n";
+ echo "</div>\n";
+ }
+
+
// CUSTOM FIELDS
foreach ($fields as $field)
Modified: mrbs/trunk/web/edit_entry_handler.php
===================================================================
--- mrbs/trunk/web/edit_entry_handler.php 2010-11-25 09:18:20 UTC (rev
1647)
+++ mrbs/trunk/web/edit_entry_handler.php 2010-11-25 10:40:21 UTC (rev
1648)
@@ -149,7 +149,7 @@
}
else
{
- $isprivate = ((isset($private) && ($private == "yes")));
+ $isprivate = ($private) ? TRUE : FALSE;
}
// Check the user is authorised for this page
Modified: mrbs/trunk/web/lang.en
===================================================================
--- mrbs/trunk/web/lang.en 2010-11-25 09:18:20 UTC (rev 1647)
+++ mrbs/trunk/web/lang.en 2010-11-25 10:40:21 UTC (rev 1648)
@@ -101,6 +101,7 @@
$vocab["brief_description"] = "Brief Description.";
$vocab["useful_n-weekly_value"] = "useful n-weekly value.";
$vocab["status"] = "Status";
+$vocab["public"] = "Public";
$vocab["private"] = "Private";
$vocab["unavailable"] = "Private";
$vocab["is_mandatory_field"] = "is a mandatory field, please supply a value";
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits