[vhffs-dev] [795] Warn users to fill a correct description that is going to be displayed in the public area

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 795
Author:   gradator
Date:     2007-08-29 19:53:27 +0000 (Wed, 29 Aug 2007)

Log Message:
-----------
Warn users to fill a correct description that is going to be displayed in the public area

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Panel/Main.pm
    trunk/vhffs-panel/group/create.pl
    trunk/vhffs-panel/templates/group/create.tmpl
    trunk/vhffs-panel/templates/web/create.tmpl
    trunk/vhffs-panel/web/create.pl


Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2007-08-29 02:45:31 UTC (rev 794)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2007-08-29 19:53:27 UTC (rev 795)
@@ -84,7 +84,7 @@
 
     $panel->check_public;
 
-Checks that public area is available, if it's ot the case show a message and exits.
+Checks that public area is available, if it's not the case show a message and exits.
 
 =cut
 
@@ -105,6 +105,23 @@
 
 =pod
 
+
+=head2 is_public
+
+    $panel->is_public;
+
+Return 1 if public part is enabled, else return 0
+
+=cut
+
+sub is_public {
+    my $self = shift;
+    my $vhffs = $self->{vhffs};
+    return ( $vhffs->get_config->get_panel_public == 1 );
+}
+
+=pod
+
 =head2 check_modo
 
     $panel->check_modo

Modified: trunk/vhffs-panel/group/create.pl
===================================================================
--- trunk/vhffs-panel/group/create.pl	2007-08-29 02:45:31 UTC (rev 794)
+++ trunk/vhffs-panel/group/create.pl	2007-08-29 19:53:27 UTC (rev 795)
@@ -83,6 +83,7 @@
     $template->param( OWNER => $user->get_username );
     $template->param( SEND => gettext('Send') );
     $template->param( DESCRIPTION => gettext('Description') );
+    $template->param( WARNING_PUBLIC => gettext("Please consider that this description is going to be displayed in the public area. So you have to write it in impersonal form. You should take care to write it with correct grammar and tenses. Take all the time you need to fill it with the best content you are able to do.") ) if $panel->is_public;
     $template->param( PROJECT_VALUE => CGI::escapeHTML( $groupname ) );
     $template->param( DESCRIPTION_VALUE => CGI::escapeHTML( $description ) );
 

Modified: trunk/vhffs-panel/templates/group/create.tmpl
===================================================================
--- trunk/vhffs-panel/templates/group/create.tmpl	2007-08-29 02:45:31 UTC (rev 794)
+++ trunk/vhffs-panel/templates/group/create.tmpl	2007-08-29 19:53:27 UTC (rev 795)
@@ -17,6 +17,11 @@
 		</label>
 		<textarea name="description" id="description" cols="45" rows="7"><tmpl_var name="DESCRIPTION_VALUE"></textarea>
 	</p>
+	<tmpl_if name="WARNING_PUBLIC">
+	<p>
+		<TMPL_VAR NAME="WARNING_PUBLIC">
+	</p>
+	</tmpl_if>
 	<p class="button"  id="buttonSend">
 		<input type="submit" value="<TMPL_VAR NAME="SEND">" name="project_submit"/>
 	</p>

Modified: trunk/vhffs-panel/templates/web/create.tmpl
===================================================================
--- trunk/vhffs-panel/templates/web/create.tmpl	2007-08-29 02:45:31 UTC (rev 794)
+++ trunk/vhffs-panel/templates/web/create.tmpl	2007-08-29 19:53:27 UTC (rev 795)
@@ -20,6 +20,11 @@
 		</label>
 		<textarea name="description" id="description" cols="45" rows="7"><tmpl_var name="DESCRIPTION_VALUE"></textarea>
 	</p>
+	<tmpl_if name="WARNING_PUBLIC">
+	<p>
+		<TMPL_VAR NAME="WARNING_PUBLIC">
+	</p>
+	</tmpl_if>
 	<p class="button" id="buttonSend">
 		<input type="submit" value="<TMPL_VAR NAME="SEND">" name="web_submit" />
 	</p>

Modified: trunk/vhffs-panel/web/create.pl
===================================================================
--- trunk/vhffs-panel/web/create.pl	2007-08-29 02:45:31 UTC (rev 794)
+++ trunk/vhffs-panel/web/create.pl	2007-08-29 19:53:27 UTC (rev 795)
@@ -96,6 +96,7 @@
     $template->param( GROUP => $groupname );
     $template->param( SEND => gettext("Send") );
     $template->param( DESCRIPTION => gettext("Tell us what the use of this web space will be") );
+    $template->param( WARNING_PUBLIC => gettext("Please consider that this description is going to be displayed in the public area. So you have to write it in impersonal form. You should take care to write it with correct grammar and tenses. Take all the time you need to fill it with the best content you are able to do.") ) if $panel->is_public;
     $template->param( DESCRIPTION_VALUE => CGI::escapeHTML($description) );
 
     display Vhffs::Panel::Main($panel, $template->output);


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/