[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6350] trunk
- Subject: SF.net SVN: ledger-smb:[6350] trunk
- From: ..hidden..
- Date: Thu, 2 Jan 2014 15:01:05 +0000
Revision: 6350
http://sourceforge.net/p/ledger-smb/code/6350
Author: einhverfr
Date: 2014-01-02 15:01:03 +0000 (Thu, 02 Jan 2014)
Log Message:
-----------
Removing more unused user preferences code
Modified Paths:
--------------
trunk/bin/am.pl
Removed Paths:
-------------
trunk/UI/am-userconfig.html
Deleted: trunk/UI/am-userconfig.html
===================================================================
--- trunk/UI/am-userconfig.html 2014-01-02 14:58:44 UTC (rev 6349)
+++ trunk/UI/am-userconfig.html 2014-01-02 15:01:03 UTC (rev 6350)
@@ -1,68 +0,0 @@
-<?lsmb INCLUDE 'ui-header.html' ?>
-<?lsmb PROCESS elements.html ?>
-<body class="<?lsmb dojo_theme ?>">
-<form method="post" action="<?lsmb form.script ?>">
-
-<table width="100%">
- <tr><th class="listtop"><?lsmb form.title ?></th></tr>
- <tr><th class="info">
- <?lsmb text('Your password will expire in [_1]', password_expires) ?>
- <tr>
- <td>
- <table width="100%">
- <tr valign="top">
- <td>
- <table>
- <tr>
- <th align="right"><?lsmb text('Password') ?></th>
- <td><input type="password" name="new_password" size="10" value="<?lsmb user.password ?>" /></td>
- </tr>
- <tr>
- <th align="right"><?lsmb text('Confirm') ?></th>
- <td><input type="password" name="confirm_password" size="10" /></td>
- </tr>
- <tr>
- <th align="right"><?lsmb text('Date Format') ?></th>
- <td><?lsmb PROCESS select element_data=selects.dateformat ?></td>
- </tr>
- <tr>
- <th align="right"><?lsmb text('Number Format') ?></th>
- <td><?lsmb PROCESS select element_data=selects.numberformat ?></td>
- </tr>
- <tr>
- <th align="right"><?lsmb text('Language') ?></th>
- <td><?lsmb PROCESS select element_data=selects.countrycode?></td>
- </tr>
- <tr>
- <th align="right"><?lsmb text('Stylesheet') ?></th>
- <td><?lsmb PROCESS select element_data=selects.stylesheet?></td>
- </tr>
-<?lsmb IF selects.printer.defined ?>
- <tr>
- <th align="right"><?lsmb text('Printer') ?></th>
- <td><?lsmb PROCESS select element_data=selects.printer?></td>
- </tr>
-<?lsmb END ?>
-
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td><hr size="3" noshade="noshade" /></td>
- </tr>
-</table>
-
-<?lsmb FOREACH hidden IN hiddens.keys;
- PROCESS input element_data={
- type => 'hidden',
- name => hidden,
- value => hiddens.item(hidden)
- }; END ?>
-<button type="submit" class="submit" name="action" value="save_preferences"><?lsmb text('Save') ?></button>
- </form>
-
-</body>
-</html>
Modified: trunk/bin/am.pl
===================================================================
--- trunk/bin/am.pl 2014-01-02 14:58:44 UTC (rev 6349)
+++ trunk/bin/am.pl 2014-01-02 15:01:03 UTC (rev 6350)
@@ -1038,104 +1038,6 @@
}
-sub config {
-
- my %selects;
- $selects{dateformat} = {
- name => 'dateformat',
- default_values => $myconfig{dateformat},
- options => [],
- };
- foreach $item (qw(mm-dd-yy mm/dd/yy dd-mm-yy dd/mm/yy dd.mm.yy yyyy-mm-dd))
- {
- push @{$selects{dateformat}{options}}, {text => $item, value => $item};
- }
-
- $selects{numberformat} = {
- name => 'numberformat',
- default_values => $myconfig{numberformat},
- options => [],
- };
- my @formats = qw(1,000.00 1000.00 1.000,00 1000,00 1'000.00);
- push @formats, '1 000.00';
- foreach $item (@formats) {
- push @{$selects{numberformat}{options}}, {text => $item, value => $item};
- }
-
-## for (qw(name company address signature)) {
-## $myconfig{$_} = $form->quote( $myconfig{$_} );
-## }
- for (qw(address signature)) { $myconfig{$_} =~ s/\\n/\n/g }
-
- $selects{countrycode} = {
- name => 'countrycode',
- default_values => ($myconfig{countrycode})? $myconfig{countrycode}: 'en',
- options => [],
- };
- %countrycodes = LedgerSMB::User->country_codes;
- foreach $key ( sort { $countrycodes{$a} cmp $countrycodes{$b} }
- keys %countrycodes )
- {
- push @{$selects{countrycode}{options}}, {
- text => $countrycodes{$key},
- value => $key
- };
- }
-
- opendir CSS, $LedgerSMB::Sysconfig::fs_cssdir;
- @all = grep /.*\.css$/, readdir CSS;
- closedir CSS;
-
- $selects{stylesheet} = {
- name => 'usestylesheet',
- default_values => $myconfig{stylesheet},
- options => [],
- };
- foreach $item (@all) {
- push @{$selects{stylesheet}{options}}, {text => $item, value => $item};
- }
- push @{$selects{stylesheet}{options}}, {text => 'none', value => '0'};
-
- if ( %{LedgerSMB::Sysconfig::printer} && ${LedgerSMB::Sysconfig::latex} ) {
- $selects{printer} = {
- name => 'printer',
- default_values => $myconfig{printer},
- options => [],
- };
- foreach $item ( sort keys %{LedgerSMB::Sysconfig::printer} ) {
- push @{$selects{printer}{options}}, {text => $item, value => $item};
- }
- }
-
- $form->{title} =
- $locale->text( 'Edit Preferences for [_1]', $form->{login} );
-
-##SC: Temporary commenting out
-## if ( $form->{lynx} ) {
-## require "bin/menu.pl";
-## &menubar;
-## }
-
- my %hiddens = (
- path => $form->{path},
- login => $form->{login},
- sessionid => $form->{sessionid},
- type => 'preferences',
- role => $myconfig{role},
- old_password => $myconfig{password},
- );
- my $template = LedgerSMB::Template->new_UI(
- user => \%myconfig,
- locale => $locale,
- template => 'am-userconfig');
- $template->render({
- form => $form,
- user => \%myconfig,
- hiddens => \%hiddens,
- selects => \%selects,
- });
-}
-
sub save_taxes {
if ( AM->save_taxes( \%myconfig, \%$form ) ) {
@@ -1147,24 +1049,6 @@
}
-sub save_preferences {
-
- $form->{stylesheet} = $form->{usestylesheet};
-
- if ( $form->{new_password} ne $form->{old_password} ) {
- $form->error( $locale->text('Password does not match!') )
- if $form->{new_password} ne $form->{confirm_password};
- }
-
- if ( AM->save_preferences( \%myconfig, \%$form ) ) {
- $form->info( $locale->text('Preferences saved!') );
- }
- else {
- $form->error( $locale->text('Cannot save preferences!') );
- }
-
-}
-
sub add_warehouse {
$form->{title} = "Add";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits