use SL::User;
$form = new Form;
+$form->{"root"} = "root login";
$locale = new Locale $language, "admin";
if ($form->{action}) {
+
$subroutine = $locale->findsub($form->{action});
if ($subroutine eq 'login') {
<th>| . $locale->text('Password') . qq|</th>
<td><input type=password name=rpw></td>
<td><input type=submit class=submit name=action value="|
- . $locale->text('Login')
- . qq|"></td>
+ . $locale->text('Login') . qq|"></td>
</tr>
<input type=hidden name=action value=login>
-<input type=hidden name=root value="root login">
<input type=hidden name=path value=$form->{path}>
</table>
}
$myconfig->{vclimit} = 200;
+ $myconfig->{"countrycode"} = "de";
+ $myconfig->{"numberformat"} = "1000,00";
+ $myconfig->{"dateformat"} = "dd.mm.yy";
+
&form_header;
&form_footer;
print qq|
-<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}">
-<input type=hidden name=root value="$form->{root}">
+<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&rpw=$form->{rpw}">
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
foreach $key (sort keys %member) {
$href =
- "$script?action=edit&login=$key&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}";
+ "$script?action=edit&login=$key&path=$form->{path}&rpw=$form->{rpw}";
$href =~ s/ /%20/g;
$member{$key}{templates} =~ s/^$templates\///;
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
-<input type=hidden name=root value="$form->{root}">
<br><input type=submit class=submit name=action value="|
. $locale->text('Add User') . qq|">
| . $locale->text('Click on login name to edit!') . qq|
<br>
|
- . $locale->text('To add a user to a group edit a name, change the login name and save. A new user with the same variables will then be saved under the new login name.')
+ . $locale->text(
+ 'To add a user to a group edit a name, change the login name and save. A new user with the same variables will then be saved under the new login name.'
+ )
. qq|
<p>
<th align=right>| . $locale->text('Password') . qq|</th>
<td><input class=login type=password name=password></td>
<td><input type=submit name=action value="|
- . $locale->text('Login')
- . qq|"></td>
+ . $locale->text('Login') . qq|"></td>
</tr>
<input type=hidden name=path value=$form->{path}>
</table>
%countrycodes = User->country_codes;
$countrycodes = "";
foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} }
- keys %countrycodes) {
+ keys %countrycodes
+ ) {
$countrycodes .=
($myconfig->{countrycode} eq $key)
? "<option selected value=$key>$countrycodes{$key}"
closedir TEMPLATEDIR;
@allhtml = sort grep /\.html/, @all;
- @alldir = grep !/\.(html|tex)$/, @all;
+ @alldir = grep !/\.(html|tex|sty|odt)$/, @all;
+ @alldir = grep !/^(webpages|\.svn)$/, @alldir;
@allhtml = reverse grep !/Default/, @allhtml;
push @allhtml, 'Default';
$item =~ s/-.*//g;
if ($item ne $lastitem) {
- $mastertemplates .= qq|<option>$item\n|;
+ my $selected = $item eq "German" ? " selected" : "";
+ $mastertemplates .= qq|<option$selected>$item\n|;
$lastitem = $item;
}
}
$form->header;
+ if ($myconfig->{menustyle} eq "neu") { $neu = "checked"; }
+ else { $old = "checked"; }
+
print qq|
<body class=admin>
</tr>
<tr valign=top>
<th align=right>| . $locale->text('Ust-IDNr') . qq|</th>
- <td><input name=ustid size=14 value="$myconfig->{ustid}"></td>
+ <td><input name=co_ustid size=14 value="$myconfig->{co_ustid}"></td>
</tr>
<tr valign=top>
<th align=right>| . $locale->text('DUNS-Nr') . qq|</th>
<th align=right>| . $locale->text('Setup Templates') . qq|</th>
<td><select name=mastertemplates>$mastertemplates</select></td>
</tr>
+ <tr>
+ <th align=right>| . $locale->text('Setup Menu') . qq|</th>
+ <td><input name=menustyle type=radio class=radio value=neu $neu> New
+ <input name=menustyle type=radio class=radio value=old $old> Old</td>
+ </tr>
<input type=hidden name=templates value=$myconfig->{templates}>
</table>
</td>
# copy templates to the directory
opendir TEMPLATEDIR, "$templates/." or $form - error("$templates : $!");
- @templates = grep /$form->{mastertemplates}.*?\.(html|tex)$/,
+ @templates = grep /$form->{mastertemplates}.*?\.(html|tex|sty)$/,
readdir TEMPLATEDIR;
closedir TEMPLATEDIR;
if (-d "$dir") {
unlink <$dir/*.html>;
unlink <$dir/*.tex>;
+ unlink <$dir/*.sty>;
rmdir "$dir";
}
}
. $locale->text('Password')
. qq|</b> <input type=password name=password size=8>
-<input type=hidden name=root value="$form->{root}">
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
$root->save_member($memberfile);
$form->{callback} =
- "$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$root->{password}";
+ "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}";
$form->redirect($locale->text('Password changed!'));
}
sub check_password {
-
$root = new User "$memberfile", $form->{root};
- if ($root->{password}) {
- if ($root->{password} ne $form->{rpw}) {
- $form->error($locale->text('Incorrect Password!'));
- }
+ if (!defined($root->{password}) || ($root->{password} ne $form->{rpw})) {
+ $form->error($locale->text('Incorrect Password!'));
}
}
&dbdriver_defaults;
$msg{Pg} =
- $locale->text('Leave host and port field empty unless you want to make a remote connection.');
+ $locale->text(
+ 'Leave host and port field empty unless you want to make a remote connection.'
+ );
$msg{Oracle} =
- $locale->text('You must enter a host and port for local and remote connections!');
+ $locale->text(
+ 'You must enter a host and port for local and remote connections!');
$form->{title} =
"Lx-Office ERP / " . $locale->text('Database Administration');
</td></tr>
</table>
-<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}">
-<input type=hidden name=root value="$form->{root}">
+<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&rpw=$form->{rpw}">
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
</table>
<p>|
- . $locale->text('This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!')
+ . $locale->text(
+ 'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!'
+ )
. qq|
<br>$msg{$form->{dbdriver}}
<input name=dbupdate type=hidden value="$form->{dbupdate}">
-<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}">
+<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&rpw=$form->{rpw}">
-<input type=hidden name=root value="$form->{root}">
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
<tr>
<th align=right nowrap>|
- . $locale->text('Create Chart of Accounts')
- . qq|</th>
+ . $locale->text('Create Chart of Accounts') . qq|</th>
<td>@charts</td>
</tr>
<input type=hidden name=dbpasswd value=$form->{dbpasswd}>
<input type=hidden name=dbdefault value=$form->{dbdefault}>
-<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}">
+<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&rpw=$form->{rpw}">
-<input type=hidden name=root value="$form->{root}">
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
. qq|
-<input type=hidden name=root value="$form->{root}">
<input type=hidden name=path value="$form->{path}">
<input type=hidden name=rpw value="$form->{rpw}">
<input type=hidden name=dbpasswd value=$form->{dbpasswd}>
<input type=hidden name=dbdefault value=$form->{dbdefault}>
-<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}">
+<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&rpw=$form->{rpw}">
-<input type=hidden name=root value="$form->{root}">
<input type=hidden name=path value="$form->{path}">
<input type=hidden name=rpw value="$form->{rpw}">
. qq|
-<input type=hidden name=root value="$form->{root}">
<input type=hidden name=path value="$form->{path}">
<input type=hidden name=rpw value="$form->{rpw}">
unlink "$userspath/nologin";
$form->{callback} =
- "$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$root->{password}";
+ "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}";
$form->redirect($locale->text('Lockfile removed!'));
close(FH);
$form->{callback} =
- "$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$root->{password}";
+ "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}";
$form->redirect($locale->text('Lockfile created!'));