Index: www/controllers/textblock_edit.php
===================================================================
--- www/controllers/textblock_edit.php	(revision 1117)
+++ www/controllers/textblock_edit.php	(working copy)
@@ -33,7 +33,15 @@
     $values = array();
     $values['text'] = request('text', $page['text']);
     $values['title'] = request('title', $page['title']);
-    $values['security'] = request('security', $page['security']);
+
+    $security_values = array_map('trim', explode(':', $page['security']));
+    $values['security'] = request('security', $security_values[0]);
+    if (count($security_values) > 1) {
+        $values['security_special'] = request('security_special', $security_values[1]);
+    } else {
+        $values['security_special'] = request('security_special', '');
+    }
+
     $values['forum_topic'] = request('forum_topic', $page['forum_topic']);
     $values['tags'] = request('tags', tag_build_list("textblock", $page_name, "tag"));
     $values['creation_timestamp'] = getattr($page, 'creation_timestamp');
@@ -44,7 +52,14 @@
         $new_page['name'] = $page_name;
         $new_page['text'] = $values['text'];
         $new_page['title'] = $values['title'];
-        $new_page['security'] = $values['security'];
+
+        if ($values['security_special'] != '') {
+            $new_page['security'] = sprintf('%s: %s', $values['security'],
+                                            $values['security_special']);
+        } else {
+            $new_page['security'] = $values['security'];
+        }
+
         $new_page['forum_topic'] = $values['forum_topic'];
         $new_page['creation_timestamp'] = $values['creation_timestamp'];
         $new_page['timestamp'] = $values['timestamp'];
Index: www/static/css/screen.css
===================================================================
--- www/static/css/screen.css	(revision 1117)
+++ www/static/css/screen.css	(working copy)
@@ -1545,3 +1545,13 @@
     line-height: 1.5em;
     margin: 0 .5em .5em 2em;
 }
+
+/* Proper Security UI */
+.security_show {
+    display: inline;
+    margin-left: 0.5em;
+}
+
+.security_hide {
+    display: none;
+}
Index: www/views/textblock_edit.php
===================================================================
--- www/views/textblock_edit.php	(revision 1117)
+++ www/views/textblock_edit.php	(working copy)
@@ -16,6 +16,20 @@
 <?= html_escape($task_id) ?></a></h1>
 <?php } ?>
 
+<script type="text/javascript">
+    function toggleSpecial() {
+        var select = document.getElementById("security_select");
+        var option = select.options[select.selectedIndex].value;
+        var special = document.getElementById("special");
+
+        if (option == "round" || option == "task") {
+            special.className = "security_show";
+        } else {
+            special.className = "security_hide";
+        }
+    }
+</script>
+
 <form accept-charset="utf-8" action="<?= html_escape(url_textblock_edit($page_name)) ?>" method="post" id="form_wikiedit" <?= tag_form_event() ?>>
 <input type="hidden" id="form_page_name" value="<?= html_escape(isset($page_name) ? $page_name : '') ?>" />
 <input type="hidden" name="last_revision" value="<?=html_escape($last_revision)?>" />
@@ -59,8 +73,42 @@
     <?php if (array_key_exists('security', $form_values)) { ?>
     <li id="field_security">
         <label for="form_security">Nivel de securitate al paginii
-        <a href="<?= html_escape(url_textblock('documentatie/securitate')) ?>">(?)</a></label> 
-        <input type="text" name="security" value="<?= fval('security') ?>" id="form_security" />
+        <a href="<?= html_escape(url_textblock('documentatie/securitate')) ?>">(?)</a></label>
+
+        <select id="security_select" name="security" onchange="toggleSpecial()">
+        <?php
+            $options = array(
+                array('value' => 'public', 'html' => 'Public'),
+                array('value' => 'protected', 'html' => 'Protected'),
+                array('value' => 'private', 'html' => 'Private'),
+                array('value' => 'round', 'html' => 'Round'),
+                array('value' => 'task', 'html' => 'Task')
+            );
+
+            foreach ($options as $option) {
+                if ($option['value'] == fval('security')) {
+                    echo sprintf('<option value="%s" selected="selected">%s
+                                 </option>', $option['value'], $option['html']);
+                } else {
+                    echo sprintf('<option value="%s">%s</option>',
+                                 $option['value'], $option['html']);
+                }
+            }
+        ?>
+        </select>
+
+        <?php
+            if (in_array(fval('security'), array('round', 'task'))) {
+                $css_class = "security_show";
+            } else {
+                $css_class = "security_hide";
+            }
+
+            echo sprintf('<input name="security_special" id="special"
+                          type="text" value="%s" class="%s">',
+                          fval('security_special'), $css_class);
+        ?>
+
         <?= ferr_span('security') ?>
     </li>
     <?php } ?>
