[vhffs-dev] [955] I was sure I forgot something, group creation is now working again ;- ) |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 955
Author: gradator
Date: 2007-10-01 19:36:47 +0000 (Mon, 01 Oct 2007)
Log Message:
-----------
I was sure I forgot something, group creation is now working again ;-)
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Group.pm
trunk/vhffs-backend/src/pgsql/initdb.sql.in
trunk/vhffs-compat/4.0.sql.in
trunk/vhffs-panel/group/create.pl
trunk/vhffs-panel/templates/group/create.tmpl
trunk/vhffs-panel/templates/group/prefs.tmpl
trunk/vhffs-public/index.pl
Modified: trunk/vhffs-api/src/Vhffs/Group.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Group.pm 2007-09-30 18:12:15 UTC (rev 954)
+++ trunk/vhffs-api/src/Vhffs/Group.pm 2007-10-01 19:36:47 UTC (rev 955)
@@ -113,7 +113,7 @@
my $quota = $groupconf->{default_quota} || 10;
- my $query = 'INSERT INTO vhffs_groups(gid, groupname, realname, passwd, quota, quota_used, object_id) VALUES(?, ?, NULL, ?, 0, ?)';
+ my $query = 'INSERT INTO vhffs_groups(gid, groupname, realname, passwd, quota, quota_used, object_id) VALUES(?, ?, ?, NULL, ?, 0, ?)';
my $sth = $dbh->prepare( $query );
$sth->execute($gid, $groupname, $realname, $quota, $parent->get_oid);
Modified: trunk/vhffs-backend/src/pgsql/initdb.sql.in
===================================================================
--- trunk/vhffs-backend/src/pgsql/initdb.sql.in 2007-09-30 18:12:15 UTC (rev 954)
+++ trunk/vhffs-backend/src/pgsql/initdb.sql.in 2007-10-01 19:36:47 UTC (rev 955)
@@ -56,7 +56,7 @@
(
gid serial,
groupname varchar(50) NOT NULL,
- realname varchar(50),
+ realname varchar(100),
passwd varchar(20),
quota int4 NOT NULL,
quota_used int4 NOT NULL DEFAULT 0,
Modified: trunk/vhffs-compat/4.0.sql.in
===================================================================
--- trunk/vhffs-compat/4.0.sql.in 2007-09-30 18:12:15 UTC (rev 954)
+++ trunk/vhffs-compat/4.0.sql.in 2007-10-01 19:36:47 UTC (rev 955)
@@ -356,5 +356,5 @@
COMMIT;
-- add realname field to vhffs_groups
-ALTER TABLE vhffs_groups ADD COLUMN realname varchar(50);
+ALTER TABLE vhffs_groups ADD COLUMN realname varchar(100);
UPDATE vhffs_groups SET realname=groupname;
Modified: trunk/vhffs-panel/group/create.pl
===================================================================
--- trunk/vhffs-panel/group/create.pl 2007-09-30 18:12:15 UTC (rev 954)
+++ trunk/vhffs-panel/group/create.pl 2007-10-01 19:36:47 UTC (rev 955)
@@ -55,15 +55,12 @@
my $templatedir = $vhffs->get_config->get_templatedir;
my $submitted = defined($cgi->param('project_submit'));
-my $groupname;
-my $description;
-my $realname;
+my $groupname = $cgi->param('project_name');
+my $realname = $cgi->param('realname');
+my $description = $cgi->param('description');
if($submitted) {
# User posted the form, let's check it
- $groupname = $cgi->param('project_name');
- $description = $cgi->param('description');
- $realname = $cgi->param('realname');
if( $groupname !~ /^[a-z0-9]{3,12}$/ ) {
$panel->add_error( gettext('Groupname must contain between 3 and 12 characters, only letters or numbers in lower case') );
} elsif( $description =~ /^\s*$/ ) {
@@ -81,12 +78,15 @@
$panel->set_title( gettext('Create a Project') );
$template->param( PROJECT_NAME => gettext('Project Name') );
+ $template->param( PROJECT_NAME_EXPLAIN => gettext('with only lowercase alphanumerical letters, no space, from 3 to 12 characters') );
+ $template->param( REALNAME_TEXT => gettext('Project full name') );
$template->param( TEXT_OWNER => gettext('Owner') );
$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( REALNAME_VALUE => CGI::escapeHTML( $realname ) );
$template->param( DESCRIPTION_VALUE => CGI::escapeHTML( $description ) );
$panel->build( $template );
Modified: trunk/vhffs-panel/templates/group/create.tmpl
===================================================================
--- trunk/vhffs-panel/templates/group/create.tmpl 2007-09-30 18:12:15 UTC (rev 954)
+++ trunk/vhffs-panel/templates/group/create.tmpl 2007-10-01 19:36:47 UTC (rev 955)
@@ -10,8 +10,15 @@
<TMPL_VAR NAME="PROJECT_NAME">:
</label>
<input type="text" size="12" maxlength="12" name="project_name" id="project_name" value="<tmpl_var name="PROJECT_VALUE">"/>
+ <TMPL_VAR NAME="PROJECT_NAME_EXPLAIN">
</p>
<p>
+ <label for="realname">
+ <TMPL_VAR NAME="REALNAME_TEXT">:
+ </label>
+ <input type="text" size="30" maxlength="100" name="realname" id="realname" value="<tmpl_var name="REALNAME_VALUE">"/>
+ </p>
+ <p>
<label for="description">
<TMPL_VAR NAME="DESCRIPTION">:
</label>
Modified: trunk/vhffs-panel/templates/group/prefs.tmpl
===================================================================
--- trunk/vhffs-panel/templates/group/prefs.tmpl 2007-09-30 18:12:15 UTC (rev 954)
+++ trunk/vhffs-panel/templates/group/prefs.tmpl 2007-10-01 19:36:47 UTC (rev 955)
@@ -7,7 +7,7 @@
<label><tmpl_var name="TEXT_OWNER">:</label>
<tmpl_var name="VALUE_OWNER">
</p>
- <p><label for="realname" class="realname"><tmpl_var name="TEXT_REALNAME">:</label><input type="text" value="<tmpl_var name="VALUE_REALNAME">" name="realname" id="realname"/></p>
+ <p><label for="realname" class="realname"><tmpl_var name="TEXT_REALNAME">:</label><input type="text" size="30" maxlength="100" value="<tmpl_var name="VALUE_REALNAME">" name="realname" id="realname"/></p>
<p><label for="description" class="description"><tmpl_var name="TEXT_DESCRIPTION">:</label></p>
<p><textarea name="description" id="description" class="description" cols="45" rows="7"><tmpl_var name="VALUE_DESCRIPTION"></textarea></p>
<p class="button" id="buttonModify">
Modified: trunk/vhffs-public/index.pl
===================================================================
--- trunk/vhffs-public/index.pl 2007-09-30 18:12:15 UTC (rev 954)
+++ trunk/vhffs-public/index.pl 2007-10-01 19:36:47 UTC (rev 955)
@@ -71,7 +71,7 @@
$template->param( TEXT_LASTGROUPS => sprintf( gettext("Show me last groups on %s") , $hostname ) );
$template->param( TEXT_ALLGROUPS => sprintf( gettext("Show me all groups on %s") , $hostname ) );
$template->param( GROUPS_TITLE => gettext("Group public area") );
-$template->param( TEXT_SEARCH_GROUP => gettext("Show me this group according to this username") );
+$template->param( TEXT_SEARCH_GROUP => gettext("Show me this group according to this groupname") );
$template->param( TEXT_WEBSITES => gettext("Show me all websites") );
$template->param( WEBSITES_TITLE => gettext("Websites area") );