0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-20 03:36:20 +02:00
Commit Graph

377 Commits

Author SHA1 Message Date
Christian Boltz
74130b478c list-virtual.tpl: add missing "download as CSV" for mailboxes
Reported by Dan <dannyro @SF> in
https://sourceforge.net/p/postfixadmin/patches/135/

Note that I'm using a completely different patch to fix it.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1880 a1433add-5e2c-0410-b055-b7f2511e0802
2016-11-01 19:31:41 +00:00
Christian Boltz
52a7df2b3a Add CSRF protection for POST requests
Add the CSRF token to all forms, and validate it when those forms are
submitted.

https://sourceforge.net/p/postfixadmin/bugs/372/



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1842 a1433add-5e2c-0410-b055-b7f2511e0802
2016-05-20 20:42:04 +00:00
Christian Boltz
530c489ec4 editform.tpl:
- add {if} block for description column to make customization for
  special fields/cases easier


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1829 a1433add-5e2c-0410-b055-b7f2511e0802
2016-03-11 21:19:14 +00:00
Christian Boltz
2102c1baa8 list.tpl:
- 'itemkey' escaping again. I found another corner case that was broken
  with |escape:"html". Therefore switch to the exact htmlentities() call
  that we use in smarty.inc.php.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1827 a1433add-5e2c-0410-b055-b7f2511e0802
2016-02-14 01:02:18 +00:00
Christian Boltz
48dde6468a list.tpl:
- getting the key from $RAW_item.$id_field turned out to be broken in
  corner cases, leading to empty output. The better (and simpler) fix is
  to just let the foreach loop set 'itemkey'.
- the example for special handling of a specific table and field
  contained a superfluous </tr>




git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1826 a1433add-5e2c-0410-b055-b7f2511e0802
2016-02-14 00:46:14 +00:00
Christian Boltz
ba46282f92 use smarty html_options instead of select_options()
list-virtual and viewlog were the last users of select_options()

smarty.inc.php:
- drop (now unused) select_options()



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1822 a1433add-5e2c-0410-b055-b7f2511e0802
2015-12-06 23:27:45 +00:00
Christian Boltz
085e7e4bfb list.tpl:
- base edit, editactive and delete links on $RAW_item to avoid double
  escaping ($items is already html-escaped, and we url-escape it for
  links). This fixes the remaining part of
  http://sourceforge.net/p/postfixadmin/bugs/356/
- simplify displaying "html" fields by using $RAW_item. This also fixes
  problems with funny[tm] item names that differ when html-encoded (like
  the ' char)



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1812 a1433add-5e2c-0410-b055-b7f2511e0802
2015-10-03 08:58:21 +00:00
Christian Boltz
680e96b590 list-virtual_alias_domain:
- also assign RAW_items (from $RAW_tAliasDomains)



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1811 a1433add-5e2c-0410-b055-b7f2511e0802
2015-10-02 18:52:17 +00:00
Christian Boltz
7cf10f81a7 list*.tpl
- display the "Go" button only if javascript is disabled (the dropdowns
  have an onchange event defined, which makes the "Go" button superfluous)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1780 a1433add-5e2c-0410-b055-b7f2511e0802
2015-04-06 22:27:00 +00:00
Christian Boltz
993c0ec2b6 list.tpl:
- improve headline:
  - in search mode, display the search term instead of the last selected
    domain (which isn't useful at all when displaying search results)
  - display number of aliases and mailboxes only in domain mode (they
    are useless/wrong in search mode)



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1779 a1433add-5e2c-0410-b055-b7f2511e0802
2015-04-06 22:21:41 +00:00
Christian Boltz
d2a80adedc list-virtual.tpl:
- update/fix search part of subnav links (all/mailboxes/aliases/alias domains)
  for $search[_]


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1778 a1433add-5e2c-0410-b055-b7f2511e0802
2015-04-06 22:16:52 +00:00
Christian Boltz
37bba15625 Use list.tpl to display the alias list
list-virtual.php:
- use list.tpl for aliases
- move show_gen_status handling for aliases to AliasHandler

AliasHandler:
- initStruct():
  - add 'status' column (hidden by default)
  - hide 'created'
  - move 'active' after 'modified' to match old list-virtual.php layout
- initMsg: add list_header
- webformConfig(): if $CONF[show_status], set display_in_list for
  'status' column. Also set a (whitespace) label to make sure it's
  displayed
- db_read_from_db_postprocess(): if 'status' column is requested, call
  gen_show_status() for each row

list-virtual.tpl
- remove alias table header and create alias button (which should have
  been in list-virtual_alias.tpl)

list-virtual_alias.tpl:
- replace code to generate the alias table with {include 'list.tpl'}
  (and some variable assignments)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1777 a1433add-5e2c-0410-b055-b7f2511e0802
2015-04-06 22:09:18 +00:00
Christian Boltz
adc038e218 list.tpl:
- add support for list_header (like ":: Alias" in list-virtual)

PFAHandler:
- add empty default for $msg['list_header']


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1776 a1433add-5e2c-0410-b055-b7f2511e0802
2015-04-06 21:58:58 +00:00
Christian Boltz
35fad174f7 smarty.inc.php:
- assign(): additionally provide the unsanitized values as RAW_$key

PFAHandler.php:
- document 'html' field type (used for raw html), including a big warning

list.tpl:
- add handling to display raw html fields

This is a preparation to use the status markers with list.tpl without
introducing too big changes.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1775 a1433add-5e2c-0410-b055-b7f2511e0802
2015-04-06 21:09:54 +00:00
Christian Boltz
3a72203de4 AliasHandler:
- initStruct(): replace (wrong) 'editable' with '_can_edit' and '_can_delete'
- read_from_db_postprocess(): disable _can_edit and _can_delete for
  default aliases if special_alias_control is off and not superadmin

list.tpl:
- use $item._can_edit instead of $check_alias_owner

list-virtual.php:
- drop $check_alias_owner variable and check_alias_owner() call
  (replaced by the code added in AliasHandler)
- drop unused $sql_domain

functions.inc.php:
- delete no longer used check_alias_owner() function



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1774 a1433add-5e2c-0410-b055-b7f2511e0802
2015-04-06 20:35:19 +00:00
Christian Boltz
8043515fdf migrate search input field to use search[_], and use list.tpl for alias domains
User-visible changes:
- alias domain list can be downloaded as CSV
- no more search highlighting for alias domains

list-virtual.php:
- expect $search to be an array
- change alias domain handling to use list.php instead of
  list-virtual_alias_domain.tpl, and move some logic from the template
  to list-virtual.php. (The template file is kept as list.tpl wrapper.)
- adopt mailbox and alias search to $search[_]
- adopt pagebrowser to $search[_]

list-virtual_alias_domain.tpl:
- replace custom output generation with {include 'list.php'} and some
  variable assignments

PFAHandler.php:
- add $this->id_field to $this->msg (avoids another smarty template
  variable)

configs/menu.conf:
- change input name to search[_]

list-virtual_alias.tpl, list-virtual_mailbox.tpl:
- adopt to $search[_] by setting $search in a backwards-compatible way

list.tpl:
- add special handling for aliasdomain.target_domain linking



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1773 a1433add-5e2c-0410-b055-b7f2511e0802
2015-04-06 14:17:25 +00:00
Christian Boltz
4ce0a57e83 PFAHandler:
- add protected $searchfields = array(); - list of fields to search by
  default, if just a search term is given. This will be done with
  $search['_'], but that code is not implemented yet.
- add $this->msg['show_simple_search'] (true if $searchfields is non-empty)

list.tpl:
- display search input box and search overview only if $searchfields is
  not empty

AliasdomainHandler:
- add 'alias_domain' and 'target_domain' to $searchfields

MailboxHandler:
- add 'username' to $searchfields

AliasHandler:
- add 'address' and 'goto' to $searchfields

This effectively means that the search input box is no longer displayed
in list.php for admin, domain and fetchmail listings.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1770 a1433add-5e2c-0410-b055-b7f2511e0802
2015-04-05 20:23:38 +00:00
Christian Boltz
6e5c8f8054 add 'can_create' flag
PFAHandler:
- add $msg['can_create'] (true by default)

DomainHandler:
- set $msg['can_create'] based on is_superadmin

list.tpl:
- display 'create' button only if $msg['can_create'] is true

Note: This is only an optical improvement, not a permission check.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1769 a1433add-5e2c-0410-b055-b7f2511e0802
2015-04-05 19:21:15 +00:00
Christian Boltz
4322486b21 delete fetchmail.php and templates/fetchmail.tpl
(replaced by FetchmailHandler)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1765 a1433add-5e2c-0410-b055-b7f2511e0802
2015-04-04 14:23:46 +00:00
Christian Boltz
dd43f12e9b delete list-admin.php and its template, use list.php instead
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1754 a1433add-5e2c-0410-b055-b7f2511e0802
2015-03-17 22:37:34 +00:00
Christian Boltz
64c6e9f0a0 list.tpl:
- fix displaying list and txtl fields


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1751 a1433add-5e2c-0410-b055-b7f2511e0802
2015-03-17 22:06:48 +00:00
Christian Boltz
eb7e40cf94 PFAHandler, editform.tpl:
- add support for 'b64p' fields (passwords stored base64-encoded)
  as preparation to migrate fetchmail.php to FetchmailHandler


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1750 a1433add-5e2c-0410-b055-b7f2511e0802
2015-03-17 21:19:36 +00:00
Christian Boltz
86dc74fd86 menu.tpl:
- display "view log" menu entry only if logging is enabled
  https://sourceforge.net/p/postfixadmin/patches/127/


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1748 a1433add-5e2c-0410-b055-b7f2511e0802
2015-03-15 00:38:23 +00:00
Christian Boltz
6e82a41121 delete list-domain.php and its templates
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1747 a1433add-5e2c-0410-b055-b7f2511e0802
2015-02-28 22:45:58 +00:00
Christian Boltz
1d35ba80ab model/DomainHandler.php:
- initStruct():
  - add optical quota indicators for aliases, mailboxes, domain quota
  - some adjustments to get nice output with list.php (mostly following
    list-domain.php)
- webformConfig(): switch listview to list.php

configs/menu.conf, templates/adminlistadmin.tpl:
- switch list-domain.php to list.php?table=domain



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1745 a1433add-5e2c-0410-b055-b7f2511e0802
2015-02-28 22:42:11 +00:00
Christian Boltz
4bc2d5f691 list.tpl, default.css:
- format unlimited/disabled quota similar to x/y, but no border


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1743 a1433add-5e2c-0410-b055-b7f2511e0802
2015-02-28 22:26:14 +00:00
Christian Boltz
6051729458 list.tpl:
- make "active" a link only if the record is editable


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1741 a1433add-5e2c-0410-b055-b7f2511e0802
2015-02-28 21:55:54 +00:00
Christian Boltz
03b0c869dd list.php:
- add search support:
  - new parameters:
    - search[$field] - value to search for
    - searchmode[$field] - search mode (=, <, > etc.)
    - reset_search - if given, empty $search and $searchmode
  - remember $search and $searchmode via session
  - display errormsg and infomsg from $handler, if any
 
list.tpl:
- display current search parameters and a "[x]" link to remove all
  search parameters

This change doesn't add a search form, but you can use ?search[field]=
and ?searchmode[field]= URL parameters


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1732 a1433add-5e2c-0410-b055-b7f2511e0802
2014-11-02 23:04:15 +00:00
Christian Boltz
d2490f6153 list.tpl:
- add support for $struct[linkto]



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1727 a1433add-5e2c-0410-b055-b7f2511e0802
2014-11-02 21:47:31 +00:00
Christian Boltz
7a23b3cda8 list.tpl:
- add handling for quota fields (visual quota indicator)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1726 a1433add-5e2c-0410-b055-b7f2511e0802
2014-11-02 21:39:13 +00:00
Christian Boltz
a826564962 list.php:
- add CSV export

list.tpl:
- add "export as CSV" link

*.lang:
- new text 'download_csv'


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1725 a1433add-5e2c-0410-b055-b7f2511e0802
2014-11-02 21:32:25 +00:00
Christian Boltz
1e35c579b6 list.php, list.tpl:
- use smarty-style dropdown for admin dropdown instead of select_options()
- only display admin dropdown if more than one admin is available
  (which basically means hiding it for domain admins)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1723 a1433add-5e2c-0410-b055-b7f2511e0802
2014-11-02 21:14:16 +00:00
Christian Boltz
b5a6417a6e add list.php and list.tpl - generic files to display lists
(will replace list-admin, list-domain etc.)

list.php:
- generic list view, select *Handler with ?table=

list.tpl:
- display list view
- columns based on $struct (every column with display_in_list and 
  non-empty label will be displayed)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1722 a1433add-5e2c-0410-b055-b7f2511e0802
2014-11-02 21:05:22 +00:00
Christian Boltz
1ad0d6832b editform.tpl:
- display cleartext value instead of key for readonly enma fields


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1721 a1433add-5e2c-0410-b055-b7f2511e0802
2014-11-01 21:26:27 +00:00
Christian Boltz
3d58d1f092 editform.tpl:
- add handling for 'enma' fields (see PFAHandler r1711)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1720 a1433add-5e2c-0410-b055-b7f2511e0802
2014-11-01 21:22:30 +00:00
Christian Boltz
e670bcd5b8 list-virtual_mailbox.tpl:
- fix: display quota if $CONF[used_quotas] == NO
  https://sourceforge.net/p/postfixadmin/bugs/307/



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1674 a1433add-5e2c-0410-b055-b7f2511e0802
2014-05-18 22:30:21 +00:00
Christian Boltz
9913a446fc header.tpl:
- add page-{$smarty_template} and page-{$smarty_template}-{$table} 
  classes to allow more targeted CSS styling


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1656 a1433add-5e2c-0410-b055-b7f2511e0802
2014-03-16 19:33:52 +00:00
Christian Boltz
c2752782a2 header.tpl:
- remove isset() - this re-introduces the risk to produce an "undefined"
  notice if someone uses an outdated config.inc.php, but also avoids 
  <link ... href=""> (notice the empty href) if $CONF[theme_custom_css]
  is set, but empty


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1634 a1433add-5e2c-0410-b055-b7f2511e0802
2014-01-21 22:11:58 +00:00
Christian Boltz
0cf9d7e53c templates/editform.tpl:
- change all field names to "value[$key]" instead of just "$key"
  to keep the main "namespace" clean

edit.php:
- adjust POST handling code to changed form field names ("value[$key]")



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1629 a1433add-5e2c-0410-b055-b7f2511e0802
2014-01-21 18:24:25 +00:00
David Goodwin
c2cfd6fe04 templates/header.tpl : check for existance of thing before trying to use it
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1624 a1433add-5e2c-0410-b055-b7f2511e0802
2014-01-14 16:01:11 +00:00
Christian Boltz
4a653e0da6 footer.tpl:
- do not escape $CONF.footer_text - it is already escaped


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1620 a1433add-5e2c-0410-b055-b7f2511e0802
2014-01-04 19:02:01 +00:00
Christian Boltz
8c139c95d6 vacation:
restrict reply type to a list of options ($CONF[vacation_choice_of_reply]),
remove input field for custom interval


config.inc.php:
- change $CONF['vacation_choice_of_reply'] to [seconds] => [$PALANG label]
  (note: reply to every mail is commented by default because it can be
  annoying. Admins will have to explicitely add/enable it in their config.)
- remove $CONF[vacation_replytype_default]
- update comment about dovecot:* for $CONF[encrypt]

*.lang:
- add texts for reply types

VacationHandler.php:
- remove reply_type at various places
- set_away(): remove reply_type from list of function parameters

templates/vacation.tpl:
- update reply type dropdown for the changed $CONF['vacation_choice_of_reply']
- remove the input fields for custom reply delay

vacation.php:
- restrict reply type to a list of options ($CONF[vacation_choice_of_reply])
- if vacation is disabled, but old values are stored in the database,
  change the activeFrom and activeUntil date to today to avoid users
  have to scroll through the calendar a lot

xmlrpc.php:
- update set_away() call to match the removed parameter

upgrade.php:
- comment out upgrade_1345_mysql() which created the reply_type and 
  interval_time fields in the vacation table in mysql
- add upgrade_1610() to add the vacation.interval_time field


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1610 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-22 16:50:55 +00:00
Christian Boltz
60297e483c *.lang:
- rename pAdminCreate_admin_username_text to email_address
- rename pAdminEdit_admin_super_admin to super_admin

AdminHandler.php - initStruct(): 
- adopt to the renamed $PALANG texts
- remove some TODOs
- whitespace changes

setup.php, adminlistadmin.tpl:
- adopt to the renamed $PALANG texts


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1580 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-14 22:33:56 +00:00
Christian Boltz
b871b47709 As a side effect of the previous commit (r1568), we can use login.php
for logout.

This means:
- change logout URL to login.php in menu.conf and users_main.tpl
- delete logout.php and users/logout.php



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1569 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-11 00:13:31 +00:00
Christian Boltz
e079e85461 editactive.php:
- new, small script to change the 'active' status
- also include CSRF protection token

edit.php:
- remove handling of 'active' to make it more readable

*list*.tpl:
- change links to use editactive.php, add CSRF token

configs/menu.conf
- add url_editactive


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1566 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-10 22:22:22 +00:00
Christian Boltz
1a79b2798e delete.php:
- require token for CSRF protection, see
  https://sourceforge.net/p/postfixadmin/bugs/269/

login.php, users/login.php:
- create token and store it in $_SESSION

templates/*:
- add token to all delete.php links

templates/list-virtual_alias_domain.tpl:
- change delete confirmation dialog to contain "from->target"


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1564 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-10 21:17:17 +00:00
Christian Boltz
4847173755 delete.php:
- use *Handler for deletion
  (which also means delete.php only has 17 lines of code now - 130 lines 
  less than before :-)

templates/list-virtual_*.tpl:
- remove now superfluous "domain" parameter in delete.php link


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1563 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-10 19:52:49 +00:00
Christian Boltz
2dc71b6c9f templates/index.tpl:
- replace {php} usage (which is no longer allowed since switching
  from SmartyBC to Smarty) with $smarty.server

fixes https://sourceforge.net/p/postfixadmin/bugs/303/


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1552 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-01 13:35:09 +00:00
Christian Boltz
ee90f4a74e smarty.inc.php:
- move header() calls from index.tpl to smarty.inc.php, which means 
  we no longer need to use SmartyBC class
- use Smarty instead of SmartyBC class
- eval_size(): use Config::Lang instead of $PALANG

templates/header.tpl:
- move header() calls to smarty.inc.php, and drop {php} usage



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1544 a1433add-5e2c-0410-b055-b7f2511e0802
2013-10-19 20:12:02 +00:00
Christian Boltz
f02b781376 backup.php:
- move "unmaintained" warning to templates/backupwarning.tpl (that's 
  the easiest way to have working HTML tags) 
- remove <p> tag from pgsql error message

templates/backupwarning.tpl
- new file, contains the "unmaintained" warning for backup.php


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1542 a1433add-5e2c-0410-b055-b7f2511e0802
2013-10-19 18:58:59 +00:00
Christian Boltz
b985816baa fetchmail: add sslcertck, sslcertpath, sslfingerprint
ADDITIONS/fetchmail.pl
- add sslcertck, sslcertpath and sslfingerprint to fetchmail config
- some whitespace fixes

fetchmail.php
- add sslcertck, sslcertpath, sslfingerprint fields
  (sslcertpath and sslfingerprint require $CONF[fetchmail_extra_options]
  because they don't have input validation)

languages/*.lang
- add new texts needed for the added fields

templates/fetchmail.tpl:
- add the new fields
- also add extra_options and mda fields - they were not displayed yet

upgrade.php
- fix _db_add_field() to call _db_field_exists() with correct table name
- upgrade_1519(): add sslcertck, sslcertpath, sslfingerprint fields to the
  fetchmail table


Most parts of this commit are based on the work of Lars Engelhard
(modified files sent on the mailinglist 2013-07-30)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1519 a1433add-5e2c-0410-b055-b7f2511e0802
2013-08-18 18:40:57 +00:00
Christian Boltz
08c9b4e49f *.lang:
- renamed some $PALANG texts:
  - pOverview_button => go
  - pOverview_mailbox_name => name
  - pSendmail_admin => from
  - pAdminEdit_admin_username => admin
  - pEdit_alias_goto => to 
- deleted obsolete or duplicate $PALANG texts:
  - pOverview_alias_goto
  - pCreate_alias_goto
  - pEdit_alias_button
  - pEdit_mailbox_name
  - pEdit_mailbox_button
  - pViewlog_username
  - pViewlog_button
  - pAdminList_admin_username
  - pAdminList_virtual_button
  - pAdminList_virtual_alias_address
  - pAdminList_virtual_alias_goto
  - pAdminList_virtual_mailbox_name
  - pAdminEdit_domain_button
  - pAdminEdit_admin_button
  - pBroadcast_from
  - pBroadcast_send

model/*, setup.php, templates/*, users/edit-alias.php:
- update to use the renamed $PALANG texts


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1513 a1433add-5e2c-0410-b055-b7f2511e0802
2013-07-29 22:08:07 +00:00
Christian Boltz
76f66ac8db *.lang:
- rename some $PALANG variables once more because smarty breaks when
  using "-"
  - add-alias => add_alias
  - add-alias-domain => add_alias_domain
  - add-mailbox => add_mailbox
  - email-address-already-exists => email_address_already_exists
  - change-password => change_password
  - password-again => password_again

model/*, setup.php, templates/*
- update to use the changed $PALANG variables


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1511 a1433add-5e2c-0410-b055-b7f2511e0802
2013-07-28 22:51:28 +00:00
Christian Boltz
9c0004a431 *.lang:
- rename various $PALANG texts:
  - pMenu_create_alias => add-alias
  - pMenu_create_alias_domain => add-alias-domain
  - pMenu_create_mailbox => add-mailbox
  - pOverview_get_mailboxes => mailboxes
  - pPassword_button => change-password
  - pAdminList_domain_description => description
  - pAdminList_domain_aliases => aliases
  - pAdminEdit_domain_transport => transport
  - pAdminEdit_admin_password2 => password-again
- remove duplicate or unused $PALANG texts:
  - pOverview_alias_alias_count
  - pOverview_alias_mailbox_count
  - pOverview_get_aliases
  - pCreate_alias_domain_button
  - pCreate_alias_welcome
  - pCreate_alias_button
  - pCreate_mailbox_password2
  - pCreate_mailbox_quota_text_error
  - pCreate_mailbox_button
  - pAdminMenu_viewlog
  - pAdminMenu_create_alias
  - pAdminMenu_create_mailbox
  - pAdminList_domain_mailboxes
  - pAdminList_domain_transport
  - pAdminList_virtual_welcome
  - pAdminList_virtual_alias_alias_count
  - pAdminList_virtual_alias_mailbox_count
  - pAdminList_virtual_mailbox_username
  - pAdminList_virtual_mailbox_quota
  - pAdminEdit_domain_description
  - pAdminEdit_domain_aliases
  - pAdminEdit_domain_mailboxes
  - pAdminEdit_domain_mailboxes_text
  - pUsersMenu_password

model/*, seetup.php, templates/*
- use changed $PALANG texts


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1510 a1433add-5e2c-0410-b055-b7f2511e0802
2013-07-28 22:33:35 +00:00
Christian Boltz
61c5920c46 *.lang:
- rename $PALANG['pUsersVacation_body'] to $PALANG['message']
- remove duplicate $PALANG['pBroadcast_message']

templates/*:
- use $PALANG['message'] everywhere


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1509 a1433add-5e2c-0410-b055-b7f2511e0802
2013-07-28 20:34:30 +00:00
Christian Boltz
2c96ba8827 *.lang:
- rename -$PALANG['pSendmail_subject'] to +$PALANG['subject']
- remove duplicate -$PALANG['pUsersVacation_subject'] and
  -$PALANG['pBroadcast_subject'] = 'Subject';

templates/*:
- use $PALANG['subject']


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1508 a1433add-5e2c-0410-b055-b7f2511e0802
2013-07-28 20:27:53 +00:00
Christian Boltz
7bf10e6b91 *.lang:
- rename $PALANG['pEdit_alias_address'] to $PALANG['alias']
  - remove duplicate $PALANG['pOverview_alias_edit']

model/*, templates/*:
- use $PALANG['alias'] everywhere


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1507 a1433add-5e2c-0410-b055-b7f2511e0802
2013-07-28 20:22:05 +00:00
Christian Boltz
80591f97bc *.lang:
- add $PALANG['password'] to replace duplicate texts
  -$PALANG['pLogin_password']
  -$PALANG['pCreate_mailbox_password']
  -$PALANG['pAdminEdit_admin_password']
- set $PALANG['pFetchmail_field_src_password']= $PALANG['password']; 
  (needed until fetchmail is migrated into FetchmailHandler)

model/*, setup.php, templates/*:
- use $PALANG['password'] everywhere	  


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1504 a1433add-5e2c-0410-b055-b7f2511e0802
2013-07-28 19:46:50 +00:00
Christian Boltz
a1646f84b6 *.lang:
- add $PALANG['active'] = 'Active' to replace various duplicates:
  -$PALANG['pOverview_alias_active']
  -$PALANG['pOverview_alias_domain_active']
  -$PALANG['pOverview_mailbox_active']
  -$PALANG['pCreate_alias_active']
  -$PALANG['pEdit_alias_active']
  -$PALANG['pCreate_mailbox_active']
  -$PALANG['pAdminList_admin_active']
  -$PALANG['pAdminList_domain_active']
  -$PALANG['pAdminList_virtual_mailbox_active']
  -$PALANG['pAdminEdit_domain_active']
  -$PALANG['pAdminEdit_admin_active']

model/*, templates/*:
- use $PALANG['active'] everywhere


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1503 a1433add-5e2c-0410-b055-b7f2511e0802
2013-07-28 19:24:00 +00:00
Christian Boltz
bf0a5c02f4 *.lang:
- add $PALANG['domain'] = 'Domain'; which replaces duplicate texts:
  -$PALANG['pOverview_get_domain']
  -$PALANG['pViewlog_domain']
  -$PALANG['pAdminList_admin_domain']
  -$PALANG['pAdminList_domain_domain']
  -$PALANG['pAdminEdit_domain_domain']
  -$PALANG['pAdminCreate_admin_address']

model/*, templates/*:
- update to use $PALANG['domain']  


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1502 a1433add-5e2c-0410-b055-b7f2511e0802
2013-07-28 18:25:43 +00:00
Christian Boltz
3fedee3074 *.lang and various templates:
- use PALANG['last_modified'] everywhere
- get rid of various duplicate texts for "Last modified":
  -$PALANG['pOverview_alias_modified']
  -$PALANG['pOverview_alias_domain_modified']
  -$PALANG['pOverview_mailbox_modified']
  -$PALANG['pOverview_get_modified']
  -$PALANG['pAdminList_admin_modified']
  -$PALANG['pAdminList_virtual_alias_modified']
  -$PALANG['pAdminList_virtual_mailbox_modified']
- add a translator note to some *.lang if the texts were not exact duplicates


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1501 a1433add-5e2c-0410-b055-b7f2511e0802
2013-07-28 18:13:37 +00:00
Christian Boltz
fcee414740 *.lang and various other files:
- rename $PALANG['pAdminList_domain_modified'] to $PALANG['last_modified']


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1500 a1433add-5e2c-0410-b055-b7f2511e0802
2013-07-27 21:52:52 +00:00
Christian Boltz
1d94a89424 templates/vacation.tpl:
- replace $PALANG.pUsersLogin_username with $PALANG.pLogin_username

languages/*.lang:
- remove obsolete pUsersLogin_username
- add translator notes in some languages


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1496 a1433add-5e2c-0410-b055-b7f2511e0802
2013-06-24 20:56:34 +00:00
Christian Boltz
3d092324b6 edit-mailbox.tpl:
- delete no longer needed template (handled by edit.php/editform.tpl 
  since some time)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1466 a1433add-5e2c-0410-b055-b7f2511e0802
2013-05-01 19:39:25 +00:00
Christian Boltz
c64768727d list-virtual_mailbox.tpl:
- replace edit-active.php with edit.php?...&active=

edit-active.php:
- finally unused after the above change -> delete


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1450 a1433add-5e2c-0410-b055-b7f2511e0802
2013-04-01 20:25:33 +00:00
Christian Boltz
b4823b9e04 Finally replace create-mailbox.php with edit.php?table=mailbox :-)
configs/menu.conf:
- change url_create_mailbox to edit.php?table=mailbox

templates/list-virtual.tpl:
- replace hardcoded create-mailbox.php with {#url_create_mailbox#}

functions.inc.php:
- delete functions that are now part of MailboxHandler:
  - check_mailbox()
  - multiply_quota()
- add some TODO notes

config.inc.php:
- rewrite a comment that referenced create-mailbox.php

create-mailbox.php:
- delete - no longer needed


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1433 a1433add-5e2c-0410-b055-b7f2511e0802
2013-02-19 23:08:01 +00:00
Christian Boltz
efb98c24c5 header.tpl:
- link header logo to main.php
  https://sourceforge.net/tracker/?func=detail&atid=937967&aid=3601801&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1421 a1433add-5e2c-0410-b055-b7f2511e0802
2013-01-27 18:24:03 +00:00
Christian Boltz
8c408cfc49 list-virtual_mailbox.tpl:
- use edit.php to edit mailboxes

edit-mailbox.php:
- delete, obsoleted by edit.php + MailboxHandler


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1416 a1433add-5e2c-0410-b055-b7f2511e0802
2012-12-29 00:13:57 +00:00
Christian Boltz
c38a9ef0b6 create-alias-domain.tpl:
- deleted - unused since exactly one year (r1275 | 2011-11-13)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1412 a1433add-5e2c-0410-b055-b7f2511e0802
2012-11-13 16:59:32 +00:00
Christian Boltz
f317ab41a7 footer.tpl:
- replace link to postfixadmin.com with postfixadmin.sf.net


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1401 a1433add-5e2c-0410-b055-b7f2511e0802
2012-06-21 19:54:39 +00:00
Christian Boltz
ded2dcb640 templates/list-virtual_alias.tpl:
- use edit.php to enable/disable aliases (instead of edit-active.php)
- merge/simplify conditions for "editable"/check_alias_owner
- use {#url_create_alias#} instead of hardcoded edit.php
- some whitespace changes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1380 a1433add-5e2c-0410-b055-b7f2511e0802
2012-04-29 16:37:37 +00:00
David Goodwin
ef80736445 Merge jan-kruis's vacation interval reply behaviour - see SF patch 3508083 - https://sourceforge.net/tracker/?func=detail&aid=3508083&group_id=191583&atid=937966 ; Thank you
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1373 a1433add-5e2c-0410-b055-b7f2511e0802
2012-04-19 21:55:36 +00:00
Christian Boltz
489f7a4155 templates/list-virtual_alias_domain.tpl,
templates/list-virtual_alias.tpl:
- remove limit={$current_limit|escape:"url"} which isn't set anywhere


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1363 a1433add-5e2c-0410-b055-b7f2511e0802
2012-04-09 17:56:21 +00:00
Christian Boltz
e9d8fa1ff9 remove obsolete functions from AliasHandler (part 2/2)
AliasHandler.php:
- remove obsolete functions update(), is_mailbox_alias(), 
  is_vacation_address(), hasAliasRecord()
- updated delete() to use new *Handler syntax (most of it should be
  moved to PFAHandler, but that's another story ;-)

users/edit-alias.php:
- replace $ah->update with $ah->set / $ah->store
- use 0/1 for $fForward_and_store instead of YES/NO
- use safepost instead of isset()

templates/users_edit-alias.tpl:
- use 0/1 for $fForward_and_store instead of YES/NO

xmlrpc.php:
- replace $ah->update with new *Handler syntax

Note: the changes in xmlrpc.php are untested again ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1358 a1433add-5e2c-0410-b055-b7f2511e0802
2012-04-09 01:48:04 +00:00
Christian Boltz
27ebaa1ce4 list-virtual.php:
- use AliasHandler instead of direct SQL queries

templates/list-virtual_alias.tpl:
- goto is an array now, not a comma-separated string


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1354 a1433add-5e2c-0410-b055-b7f2511e0802
2012-04-08 23:11:46 +00:00
Christian Boltz
d03e239515 list-virtual.php:
- use AliasdomainHander instead of doing direct database queries
- add search support for alias domains
- display "create alias domain" button only if this is possible
- always assign $tAliasDomains smarty variable (even if empty) to avoid warnings
- always escape $fDomain (even if it comes from $list_domains)
- rename $SESSID_USERNAME to $admin_username

templates/list-virtual_alias_domain.tpl:
- remove reference to non-existing variable $tTargetDomain


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1352 a1433add-5e2c-0410-b055-b7f2511e0802
2012-04-08 22:20:55 +00:00
Christian Boltz
9aebf298d3 templates/list-virtual_alias.tpl, templates/list-virtual_mailbox.tpl:
- change edit-alias.php links to edit.php?table=alias

edit-alias.php, templates/edit-alias.tpl:
- now obsolete :-) -> deleted



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1350 a1433add-5e2c-0410-b055-b7f2511e0802
2012-04-08 21:18:27 +00:00
Christian Boltz
e3b242e4d8 flash_error.tpl:
- html-escape flash_info() / flash_error() messages to fix XSS if the
  message contains user-supplied input
  (thanks to Filippo Cavallarin for the report)

Note: This will cause ugly output for some german error messages which
contain &uuml; etc., and the warning message in backup.php (with some
HTML tags included) will also look totally ugly.
Nevertheless, that's still better than XSS attacks ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1331 a1433add-5e2c-0410-b055-b7f2511e0802
2012-01-11 21:46:41 +00:00
Christian Boltz
e719c6c4dd create-alias.php:
- deleted, obsoleted by edit.php?table=alias

functions.inc.php:
- drop function check_alias() - it was only used by create-alias.php
  (AliasHandler has a similar function create_allowed(), which is a
  copy of check_alias() with superfluous {...} removed)

configs/menu.conf
- replace create-alias.php with edit.php?table=alias
- append "?" to url_create_mailbox to avoid temporary change in menu.tpl
  (create-mailbox is the only one which still needs ? instead of &)

templates/list-virtual.tpl:
- use {#url_create_alias#} instead of hardcoded create-alias.php

templates/menu.tpl:
- $url_domain: url-escape domain, use & instead of ?



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1317 a1433add-5e2c-0410-b055-b7f2511e0802
2012-01-10 00:30:01 +00:00
Christian Boltz
d39a802d00 AliasHandler now works with edit.php in many cases
(TODO: catchall handling, mailbox and vacation aliases)

AliasHandler.php
- drop unused $username
- set $domain_field
- initStruct():
  - use correct labels
  - set 'domain' field options to allowed domains
  - add (virtual) 'localpart' field
  - add comments for more virtual fields
- add webformConfig() (note: modifies $struct on $new - otherwise we 
  couldn't use the domain dropdown in the web interface)
- add mergeId to merge localpart and domain to address (called by 
  edit.php _before_ ->init)
- add validate_new_id() (doesn't work for catchall yet)
- add setmore() to 
  - fill 'domain' based on 'address'
  - convert $values[goto] from array to comma-separated string
- add read_from_db_postprocess to split goto to an array
  (TODO: handling of mailbox and vacation aliases)
- add _field_goto() validator
- add empty, commented dummy delete() that will replace the "old" 
  delete function one day
- make hasAliasRecord() private (only used internally)
- mark all "old" functions as obsolete

edit.php:
- add handling of txtl field (convert textarea to array)
- call $handler->mergeId if $id_field is editable, but not displayed 
  in form (usecase: merge localpart + domain to address)

editform.tpl:
- add handling of txtl fields (textarea, filled by array)

PFAHandler.php:
- add setmore() hook function - runs at the end of set()

AdminHandler.php:
- add a comment for 'txtl' (array of one line texts, like alias goto)




git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1311 a1433add-5e2c-0410-b055-b7f2511e0802
2011-12-27 18:13:32 +00:00
Christian Boltz
0c42306267 list-virtual_alias_domain.tpl:
- use edit.php to switch active status for alias domains

edit-active.php:
- remove now superfluous handling of alias domains

configs/menu.conf:
- remove now superfluous url_edit_active (templates for list-mailbox
  and list-alias use hardcoded 'edit-active.php')



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1308 a1433add-5e2c-0410-b055-b7f2511e0802
2011-12-26 16:26:30 +00:00
Christian Boltz
5416e93e5a adminlistadmin.tpl:
- use edit.php to switch active status for domains

edit-active-admin.php:
- deleted, obsoleted by using edit.php

configs/menu.conf:
- remove now superfluous url_edit_active_admin



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1307 a1433add-5e2c-0410-b055-b7f2511e0802
2011-12-26 16:08:24 +00:00
Christian Boltz
91f613db5f adminlistdomain.tpl:
- use edit.php to switch active status for domains
- display backupmx and active status as yes/no instead of 1/0

edit-active-domain.php
- deleted, obsoleted by using edit.php

configs/menu.conf
- remove now superfluous url_edit_active_domain



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1306 a1433add-5e2c-0410-b055-b7f2511e0802
2011-12-26 16:02:14 +00:00
Christian Boltz
f6425e025b Delete the now unused files
- edit-admin.php
- create-admin.php
- templates/admin_edit-admin.tpl

Total: about 300 lines deleted


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1300 a1433add-5e2c-0410-b055-b7f2511e0802
2011-12-20 00:06:11 +00:00
Christian Boltz
25abbafd20 configs/menu.conf, templates/adminlistadmin.tpl:
- use edit.php?table=admin instead of create-admin.php and edit-admin.php


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1299 a1433add-5e2c-0410-b055-b7f2511e0802
2011-12-19 23:51:47 +00:00
Christian Boltz
76befc69ff editform.tpl:
- implement handling of password fields (type=password, and never
  fill the value)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1292 a1433add-5e2c-0410-b055-b7f2511e0802
2011-11-28 00:37:41 +00:00
Christian Boltz
9104b0652a editform.tpl:
- implement handling of 'list' fields (<select> with multiple choices 
  allowed)
- also include alternative implementation with checkboxes (commented out)
- change {$value_{$key}} to $value_{$key} for 'enum' to stay in sync 
  with 'list' ('list' fails with the additional {...} because it converts
  the array to the string "Array") (seems to be new behaviour in Smarty 
  3.1.5 - IIRC 3.0.7 required the additional {...})


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1290 a1433add-5e2c-0410-b055-b7f2511e0802
2011-11-28 00:11:03 +00:00
Christian Boltz
6f9d520262 list-admin.php:
- use AdminHandler
- move displaying the superadmin flag to the template

templates/adminlistadmin.tpl:
- update to the fieldnames provided by AdminHandler (name->username)
- move displaying the superadmin flag to the template

functions.inc.php:
- delete function get_admin_properties() (was only used by list-admin
  and is not needed anymore) -> 48 lines less :-)
- add TODO to list_admins() to use AdminHandler


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1282 a1433add-5e2c-0410-b055-b7f2511e0802
2011-11-26 01:09:38 +00:00
Christian Boltz
8f267c1b7f Use edit.php to create/edit domains
model/DomainHandler.php:
- add webformConfig()

configs/menu.conf:
- change url_edit_domain to edit.php?table=domain
- drop url_create_domain (use url_edit_domain instead)

templates/*:
- replace #url_create_domain# with #url_edit_domain#
- replace ? with &

create-domain.php:
- deleted :-)



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1276 a1433add-5e2c-0410-b055-b7f2511e0802
2011-11-13 22:59:21 +00:00
Christian Boltz
9cf7c7799a Use edit.php to edit/create for alias domains
(yes, we get edit mode "for free")

model/AliasdomainHandler.php:
- add webformConfig()

configs/menu.conf:
- change url_create_alias_domain to edit.php?table=aliasdomain

templates/list-virtual_alias_domain.tpl
- change ?target_domain to &target_domain 
  (TODO: this is currently ignored by edit.php)
- add edit link (TODO: add log action to avoid the error message)

create-alias-domain.php:
- deleted :-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1275 a1433add-5e2c-0410-b055-b7f2511e0802
2011-11-13 22:48:22 +00:00
Christian Boltz
7ed5f7e471 Several changes to make edit.php a generic edit form
edit.php:
- use ?table= parameter to decide what will be edited
- generate (and validate) Handler classname based on ?table=
- read handler-specific configuration from $handler->webformConfig()
  and use it at various places
- add option to run $handler->init() early. Useful for $new in case
  of AliasdomainHandler which might fail if all domains are already
  aliased.
- always redirect to edit.php?table=$table after adding an item to
  ensure correct initialization for next item

templates/editform.tpl:
- add hidden field "table"


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1274 a1433add-5e2c-0410-b055-b7f2511e0802
2011-11-13 22:34:40 +00:00
Christian Boltz
3f0e77e6ab editform.tpl:
- replace hardcoded $value_transport with {$value_{$key}


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1270 a1433add-5e2c-0410-b055-b7f2511e0802
2011-11-13 00:11:45 +00:00
Christian Boltz
e21e843c8d templates/create-alias-domain.tpl:
- use PALANG.pAdminEdit_domain_active instead of 
  PALANG.pCreate_alias_domain_active

languages/*.lang
- mark $PALANG['pCreate_alias_domain_active'] as obsolete



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1263 a1433add-5e2c-0410-b055-b7f2511e0802
2011-11-05 18:20:19 +00:00
Christian Boltz
d065179993 create-domain.php, templates/editform.tpl:
- move handling of displaying checkboxes to editform.tpl.
  This means: One switch block less in create-domain.php



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1262 a1433add-5e2c-0410-b055-b7f2511e0802
2011-11-04 21:26:25 +00:00
Christian Boltz
def9c22fb1 create-domain.php, templates/editform.tpl:
- move special handling for enum fields from PHP select_options() to 
  the template using smarty {html_options}


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1260 a1433add-5e2c-0410-b055-b7f2511e0802
2011-10-31 21:45:00 +00:00
Christian Boltz
7ac37cfbff templates/editform.tpl:
- new file
- generic edit form template that uses $struct to render the form

templates/admin_edit-domain.tpl:
- deleted, obsoleted by editform.tpl

create-domain.php
- use new editform.tpl
- use $errormsg array instead of join't $errortext
- store/move errors related to a display_in_form field in $fielderror
  (they will be displayed next to the field)
- display remaining error messages (not related to a field) with 
  flash_error()
- use "value_$key" instead of "t$Key" as smarty variable name for field 
  values

model/DomainHandler.php
- store error messages in $this->errormsg[$field] (instead of $this->errormsg[])
- fix label for default_aliases

model/PFAHandler.php:
- store error messages in $this->errormsg[$field] (instead of $this->errormsg[])



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1252 a1433add-5e2c-0410-b055-b7f2511e0802
2011-10-30 20:27:08 +00:00
Christian Boltz
5ba826b067 create-domain.php, templates/admin_edit-domain.tpl:
- move some logic to select the correct labels to create-domain.php



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1251 a1433add-5e2c-0410-b055-b7f2511e0802
2011-10-30 18:56:11 +00:00
David Goodwin
25675e9377 use isset to check existance of a variable
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1238 a1433add-5e2c-0410-b055-b7f2511e0802
2011-10-24 22:25:10 +00:00
David Goodwin
89f66053a9 fix undefined var check before login - sessid is not set etc
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1237 a1433add-5e2c-0410-b055-b7f2511e0802
2011-10-24 22:24:49 +00:00
Christian Boltz
2f52a8402d edit-domain.php:
- deleted (obsoleted by create-domain.php)

create-domain.php:
- fixed wrong variable name that broke saving an edited domain

configs/menu.conf, templates/adminlistdomain.tpl
- changed to use create-domain.php?edit= instead of edit-domain?domain=



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1226 a1433add-5e2c-0410-b055-b7f2511e0802
2011-10-19 21:26:31 +00:00
Christian Boltz
24836cf3ad Add edit mode to create-domain.php
create-domain.php:
- add edit mode (use ?edit=example.com)
- use $id_field instead of hardcoded 'domain'
- redirect to list-domain after saving in edit mode
- rename some variables

edit-domain.php:
- rename some smarty variables

templates/admin_edit-domain.tpl:
- rename some smarty variables
- add two hidden fields "edit" and "domain", both contain $tDomain
  (only in edit mode)



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1225 a1433add-5e2c-0410-b055-b7f2511e0802
2011-10-19 21:09:54 +00:00
Christian Boltz
7fd57740cd create-domain.php:
- assign $values to smarty in a foreach loop

edit-domain.php, templates/admin_edit-domain.tpl:
- rename some smarty variables to match column name


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1221 a1433add-5e2c-0410-b055-b7f2511e0802
2011-10-18 23:25:14 +00:00
Christian Boltz
95bf0161c6 Make create-domain.php even shorter (109 -> 89 lines) ;-)
create-domain.php
- replace old $form_fields with $handler->getStruct()
- rewrite handling POST data to make it easier to understand
  - move reading POST input to the section handling POST
  - remove condition on POST (we are in the POST block now)
  - check if editing of a field is allowed (use default value if not)
- move validation of 'enum' fields to PFAHandler
- allow changing the "active" state (instead of hardcoding it)

model/PFAHandler.php:
- add check for 'enum' fields

model/DomainHandler.php:
- change default for "active" and "default_aliases" to 1

templates/admin_edit-domain.tpl:
- don't hide the "Active" checkbox on new


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1220 a1433add-5e2c-0410-b055-b7f2511e0802
2011-10-18 22:56:33 +00:00
Christian Boltz
5c5c79e8a9 Make create-domain.php shorter (164 -> 109 lines) ;-)
create-domain.php:
- rename "fField" form fields to just "field" to match the column names 
  in the database
- remove list of template and POST variables in the header - the code is
  self-documenting on this, one useless comment block less to maintain ;-)
- rename $default to $field - matches the usage better
- use $values[$key] instead $$key (this also avoids the need to fill
  $values before calling $handler->set)
- remove some validation that is already done in DomainHandler
- use $handler->set even if creating $handler results in an error to
  make error messages for all fields visible
- set $values to defaults at the end of the file if $error == 0 (and
  use a foreach loop) instead of doing it for GET at the beginning and
  again after successful POST
- remove some unused variables
- various other changes

edit-domain.php, templates/admin_edit-domain.tpl:
- rename "fField" form fields to just "field" to match the column names 
  in the database



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1218 a1433add-5e2c-0410-b055-b7f2511e0802
2011-10-18 21:15:11 +00:00
Christian Boltz
a11d8c3dda Sometimes short commit messages are the best ones - see the message
for create-domain.php...

create-domain.php:
- finally: use DomainHandler :-))

edit-domain.php, create-domain.php, 
templates/admin_edit-domain.tpl:
- use 0/1 instead of off/on for checkboxes



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1217 a1433add-5e2c-0410-b055-b7f2511e0802
2011-10-18 00:00:26 +00:00
Christian Boltz
1033c950fa vacation.php:
- split off $fDomain from ?username= (admin mode)
- basic sanity check for ?username= (admin mode)
- urlencode $fDomain for $Return_url (admin mode)
- don't split off domain from username in users mode (not needed)
- added various TODO notes
- some whitespace fixes near the end of the file (2*3 lines)

list-virtual_mailbox.tpl
- don't include domain in link to vacation.php (no longer needed)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1172 a1433add-5e2c-0410-b055-b7f2511e0802
2011-08-21 21:28:13 +00:00
Christian Boltz
9bee8d89c1 Merge users/vacation.php and edit-vacation.php into vacation.php
vacation.php
- result of merging edit-vacation.php and users/vacation.php
- vacation.php comes with the svn history of edit-vacation.php
- display "vacation already active" (only) in user mode if vacation is active
  (would be useful in admin mode too, but needs a text change)
- various comment updates
- add username in $PALANG[pVacation_result_removed] and
  $PALANG[pVacation_result_added] using sprintf
- change compared to Jan Kruis' patch:
  - set return url for users to main.php instead of users/main.php
  - set return url for admins after setting $fDomain. Otherwise the return url
    does not contain the domain.
  - removed unused variable $tDomain

users/vacation.php:
- require(../vacation.php)
- remove everything else
- whitespace changes in the license header
- note: this is completely different from Jan Kruis' patch - his intention was
  to remove this file and use ../vacation.php. However, with his way all links
  in the users menu would point to the wrong place/directory

edit-vacation.php:
- deleted

templates/vacation.tpl
- display username only in admin mode

templates/list-virtual_mailbox.tpl
- link changed to merged vacation.php

languages/en.lang
- add username in $PALANG[pVacation_result_removed] and
  $PALANG[pVacation_result_added] as sprintf variable
- (comments added by Jan Kruis' patch are not part of this commit)

languages/nl.lang
- translation updates
- already contains the sprintf variable in $PALANG[pVacation_result_removed]
  and $PALANG[pVacation_result_added]

(updates for other *.lang files follow in another commit)

The following parts of Jan Kruis' patch are not part of this commit:
- rejected:
  - variables.inc.php: don't add $Admin_role and $Return_url
    If we initialize them, it should be done directly in (edit-)vacation.php,
    but the current code always sets them already in all cases.
  - templates/users_main.tpl: do not change url for vacation.php
- postponed:
  - added comments in en.lang about obsolete texts


Most parts of this commit (see exceptions above) were provided as patch 
by Jan Kruis (jan-kruis@SF), see
https://sourceforge.net/tracker/?func=detail&aid=3383236&group_id=191583&atid=937966



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1169 a1433add-5e2c-0410-b055-b7f2511e0802
2011-08-14 23:12:20 +00:00
Valkum
dbf7d1aa74 added quota level percentage display
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1168 a1433add-5e2c-0410-b055-b7f2511e0802
2011-08-08 18:39:03 +00:00
Christian Boltz
1695f1a7b2 Merged edit-vacation.tpl and users_vacation.tpl.
Prepare merging of edit-vacation.php and users/vacation.php

users/vacation.php, edit-vacation.php:
- first step of merging
- renamed some variables to fit vacation.tpl
- some code sorting and cleanup
- replaced JS redirect on cancel with handling in PHP

users_vacation.tpl, edit-vacation.tpl:
- deleted (merged to vacation.tpl)

vacation.tpl:
- new file, result of merging edit-vacation.tpl and users_vacation.tpl
- display mail address to users also (to be discussed)

Thanks to J.Kruis (jan-kruis@SF) for the patch,
https://sourceforge.net/tracker/?func=detail&aid=3383236&group_id=191583&atid=937966


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1163 a1433add-5e2c-0410-b055-b7f2511e0802
2011-08-05 20:01:35 +00:00
Christian Boltz
57d25d3d41 Merge edit-mailbox.tpl and edit-mailbox.tpl:
edit-mailbox.tpl:
- merged with create-mailbox.tpl
- added various {if $mode = ...}
- use $PALANG.pCreate_mailbox_password (text: "Password") instead of
  $PALANG.pEdit_mailbox_password text (text: "New password") for edit mode

create-mailbox.tpl:
- deleted

edit-mailbox.php:
- add smarty mode = edit variable

create-mailbox.php
- add smarty mode = create variable

*.lang:
- marked pEdit_mailbox_password and pEdit_mailbox_password2 as obsolete


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1154 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-31 15:22:17 +00:00
Christian Boltz
e5c68e2450 Merge edit-alias.tpl and create-alias.tpl
edit-alias.tpl:
- merge with create-alias.tpl
- added various {if $mode = ...}
- for edit mode: used "multiple targets" help text right of textarea
  (instead of having it under the headline)
- use $fGoto instead of array in textarea

create-alias.tpl
- deleted

edit-alias.php:
- fixed $tGoto to contain unmodified $_POST value on error
- dropped $array smarty variable that was used instead of $tGoto
- added mode = edit smarty variable
- add empty pCreate_alias_address_text_error smarty variable to avoid
  "undefined" warning

create-alias.php:
- added mode = create smarty variable
- switched to edit-alias template

*.lang
- marked $PALANG['pCreate_alias_address'] as obsolete


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1153 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-31 15:05:33 +00:00
Christian Boltz
6c35590eb7 Merge admin_edit-domain.tpl and admin_create-domain.tpl
admin_edit-domain.tpl:
- merged with admin_create-domain.tpl
- added various {if $mode = ...}
- added 4th column for error messages

admin_create-domain.tpl:
- deleted

edit-domain.php:
- added mode = edit smarty variable
- added pAdminCreate_domain_domain_text_error smarty variable to avoid
  "undefined variable" warning

create-domain.php
- added mode = create smarty variable
- switch to admin_edit-domain template


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1152 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-31 14:32:51 +00:00
Christian Boltz
0fe45bca8a Merge admin_edit-admin.tpl and admin_create-admin.tpl
create-admin.php
- switch to edit-admin template
- rename a smarty variable
- add smarty mode = create variable

edit-admin.php:
- rename a smarty variable
- add smarty mode = edit variable

admin_edit-admin.tpl:
- merge with admin_create-admin.tpl
- add some {if $mode == '...'} switches 
- change <form> name to "admin"
- rename a smarty variable

admin_create-admin.tpl:
- deleted

*.lang:
- mark some $PALANG texts as obsolete:
  - $PALANG['pAdminCreate_admin_username']
  - $PALANG['pAdminCreate_admin_password'
  - $PALANG['pAdminCreate_admin_password2']


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1151 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-31 14:09:16 +00:00
Christian Boltz
8f2a3f00ad admin_create-domain.tpl:
- replaced lots of PALANG[pAdminCreate_*] with PALANG[pAdminEdit_*]
- this will make merging with the edit-domain template easier

*.lang
- marked several $PALANG variables as obsolete:
  - pAdminCreate_domain_domain
  - pAdminCreate_domain_description
  - pAdminCreate_domain_aliases
  - pAdminCreate_domain_aliases_text
  - pAdminCreate_domain_mailboxes
  - pAdminCreate_domain_mailboxes_text
  - pAdminCreate_domain_maxquota
  - pAdminCreate_domain_maxquota_text
  - pAdminCreate_domain_transport
  - pAdminCreate_domain_transport_text
  - pAdminCreate_domain_backupmx
- added some "please check" translator notes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1149 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-30 00:19:32 +00:00
Christian Boltz
a81f3d6506 edit-mailbox.php, edit-mailbox.tpl:
- fixed undefined variables


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1147 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-29 23:37:56 +00:00
Christian Boltz
94dbfa2bb4 Mostly merge edit-mailbox.tpl and create-mailbox.tpl
edit-mailbox.php
- report password errors next to the password field instead of flash_error()
- small changes to smarty variables

create-mailbox.php:
- small changes to smarty variables

edit-mailbox.tpl, create-mailbox.tpl:
- merge as good as possible (everything that is still left will probably
  need an {if}
- renamed some smarty variables
- use colspan=3 for buttons

*.lang:
- mark pCreate_mailbox_username, pCreate_mailbox_name, pCreate_mailbox_quota,
  pCreate_mailbox_quota_text and pEdit_mailbox_name_text as obsolete
- added some "please check" notes for translators



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1146 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-29 23:30:54 +00:00
Christian Boltz
0a2f73e51a password.tpl:
- removed a superfluous </td>


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1143 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-29 21:47:21 +00:00
Christian Boltz
3dcd56c77a Replaced motd*.txt with $CONF[motd_*] options
config.inc.php:
- new config options $CONF['motd_user'], $CONF['motd_admin'] and
  $CONF['motd_superadmin']

templates/index.tpl:
- added $CONF[motd_*] handling

css/default.css:
- new style #motd

templates/users_menu.tpl, templates/menu.tpl:
- removed inclusion of motd-users.txt / $motd_file

smarty.inc.php:
- removed handling for motd*.txt files

templates/motd-users.txt, templates/motd.txt:
- deleted


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1142 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-29 20:34:36 +00:00
Christian Boltz
ab636c92e5 Merge password.tpl and users_password.tpl
users/password.php:
- use SESSID_USERNAME instead of USERID_USERNAME to match the smarty
  variable name in the password module for admins
- switch to 'password' template
 
templates/password.tpl:
- display "exit" button if logged in as user
- change form name to something more useful

templates/users_password.tpl:
- deleted


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1140 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-29 19:48:17 +00:00
Christian Boltz
656b0b0897 index.tpl:
- use $authentication_has_role instead of checking if $smarty_template
  contains "users_". This makes the code cleaner and avoids problems
  when merging templates to names without "users_".
- check for login template without using needle - that's possible after
  merging the login and users_login template to login.tpl


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1139 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-29 19:42:46 +00:00
Christian Boltz
b065366a91 Merge template for admin login and user login
login.php, users/login.php:
- set logintype=admin/user smarty variable
- cleanup: move smarty assignments outside of GET/POST handling - it's
  the same for both

users/login.php:
- do not pre-fill username on failed login

templates/login.tpl:
- merge in users_login.tpl
- add some {if} to handle the differences between admin and user login

templates/users_login.tpl:
- deleted

*.lang:
- mark pUsersLogin_username, pUsersLogin_password, pUsersLogin_language 
  and pUsersLogin_button as obsolete
- add some notes if pLogin_* and pUsersLogin differ


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1137 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-29 18:04:09 +00:00
Christian Boltz
e4c76696de edit-mailbox.php, edit-mailbox.tpl, variables.inc.php
- removed always empty variable $pEdit_mailbox_password_text
- replaced "static" variable $pEdit_mailbox_quota_text with its
  PALANG content in the template


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1133 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-25 23:49:58 +00:00
Christian Boltz
1479fd9e65 create-mailbox.php, variables.inc.php, create-mailbox.tpl
- removed always empty variable $pCreate_mailbox_username_text
- replaced "static" variables $pCreate_mailbox_password_text and
  $pCreate_mailbox_quota_text with their PALANG content in the template


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1132 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-25 23:43:12 +00:00
Christian Boltz
032a795795 templates/edit-vacation.tpl, templates/users_vacation.tpl:
- replaced hardcoded background-color with class=readonly

css/default.css:
- new style .readonly for vacation start/end input fields


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1129 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-25 23:18:52 +00:00
Christian Boltz
0e33c90fa1 message.tpl:
- remove $tMessage - it is no longer used/filled anywhere
- replaced with a TODO note that message.tpl usage and the file itsself
  has to be removed (not part of Dale's patch)

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1126 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-25 22:19:50 +00:00
Christian Boltz
ee5c1cc239 create-alias.tpl:
- add "multiple targets" help text


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1121 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-23 20:40:59 +00:00
Christian Boltz
cd894a7835 list-virtual.tpl:
- change <h3> to <th>

list-virtual_alias_domain.tpl
- style "create new" link as button

These changes were forgotten by Dale :-P


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1115 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-22 21:37:40 +00:00
Christian Boltz
043fd5520d list-virtual.tpl:
- replace & with &amp; in links
- replaced <h3> with <th>
- style "create new" links as button

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1114 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-22 21:27:57 +00:00
Christian Boltz
767faf95b2 menu.tpl, users_menu.tpl:
- add class="logout" to logout menu item to allow special styling

menu.tpl:
- remove <br clear=all>

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1113 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-22 21:24:56 +00:00
Christian Boltz
3de3aaefff adminlistadmin.tpl, adminlistdomain.tpl:
- style "create new" links as button

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1112 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-22 21:22:24 +00:00
Christian Boltz
2991a1334f fetchmail.tpl:
- change <h3> to <th>
- style "new fetchmail entry" link as button
- changes compared to Dale's patch:
  - do not change colspan +2 to +4 in <th>
  - use colspan=2 instead of 4 in empty cell of <th>
  (both changes were wrong and don't match the table body)

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1111 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-22 21:19:49 +00:00
Christian Boltz
4d33437cd2 variables.inc.php,
admin_edit-domain.tpl, create-alias-domain.tpl, edit-alias.tpl, 
edit-vacation.tpl, password.tpl:
- remove now unused $tMessage
  (the change in variables.inc.php was not contained in Dale's patch)

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1110 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-22 21:08:33 +00:00
Christian Boltz
dc782512a3 overview-get.tpl, viewlog.tpl:
- changed <h3> to <th>

overview-get.tpl:
- removed class="flat" from domain dropdown

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1109 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-22 20:59:41 +00:00
Christian Boltz
7203639886 create-mailbox.php:
- renamed $pCreate_mailbox_*_text to $pCreate_mailbox_*_text_error
- replaced $tMessage with flash_error() / flash_info()

templates/create-mailbox.tpl:
- added 4th column for error messaegs
- replaced <h3> with <th>
- marked lables with <label>
- aligned button with input fields
- removed tMessage

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1107 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-22 20:25:06 +00:00
Christian Boltz
99dce81fa3 create-alias.php:
- fixed syntax error introduced in the last revision
- removed $pCreate_alias_goto_text and $pCreate_alias_address_text
  (replaced by PALANG texts in the template)

templates/create-alias.tpl:
- removed colspan to allow helptext in "alias" row
- moved PALANG.pCreate_alias_catchall_text to alias row
- removed pCreate_alias_address_text (always empty)
- replaced PALANG.pCreate_alias_help (empty) with PALANG.pCreate_alias_goto_text
- some whitespace fixes

variables.inc.php
- removed now unused $pCreate_alias_address_text and $pCreate_alias_goto_text

(These changes are _not_ part of Dale's patch ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1105 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-22 19:56:04 +00:00
Christian Boltz
1467a959ed create-alias.php:
- renamed $pCreate_alias_address_text to $pCreate_alias_address_text_error
- replaced $tMessage with flash_error() / flash_info()
- changes compared to Dale's patch:
  - do not add $fAddress and $fGoto to $PALANG['pCreate_alias_goto_text_error']
    error message

templates/create-alias.tpl:
- added 4th column for error messages
- replace <h3> with <th>
- mark labels with <label>
- aligned button with input fields
- added $PALANG[pCreate_alias_help]
- removed tMessage

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1104 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-22 18:36:21 +00:00
Christian Boltz
12694a420f create-domain.php:
- renamed $pAdminCreate_domain_domain_text to $pAdminCreate_domain_domain_text_error 
- replaced $tMessage with flash_error(), flash_info() and 
  $pAdminCreate_domain_domain_text_error 
- differences to Dale's patch:
  - removed now always empty smarty->assign for $pAdminCreate_domain_domain_text

templates/admin_create-domain.tpl:
- added 4th column for error messages
- marked labels as <label>
- aligned button to input fields
- removed tMessage
- differences to Dale's patch:
  - removed now unused $pAdminCreate_domain_domain_text

variables.inc.php:
- removed now unused $pAdminCreate_domain_domain_text
  (this was not part of Dale's patch)

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1102 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-21 22:20:25 +00:00
Christian Boltz
5f4f20accf edit-mailbox.php:
- replace $tMessaeg with flash_error()
- use pEdit_mailbox_quota_text_error instead of pEdit_mailbox_quota_text
  for error message

templates/edit-mailbox.tpl:
- added 4th column for error messages
- replaced <h3> with <th>
- marked labels with <label>
- marked non-editable fields with <em>
- aligned buttons with input fields
- removed tMessage

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1101 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-20 23:38:42 +00:00
Christian Boltz
310d22bb6e create-admin.php
- renamed $pAdminCreate_admin_username_text to $pAdminCreate_admin_username_text_error
- renamed $pAdminCreate_admin_password_text to $pAdminCreate_admin_password_text_error
- replaced $tMessage with $infoMessage (displayed via flash_info)
- additional change compared to Dale's patch: removed unused variable 
  $pAdminCreate_admin_username_text

variables.inc.php:
- removed now unused variables $pAdminCreate_admin_password_text and
  $pAdminCreate_admin_username_text

templates/admin_create-admin.tpl:
- added 4th column for error messages
- replaced <h3> with <th>
- marked labels with <label>
- align button with input fields
- remove tMessage

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1099 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-20 23:19:17 +00:00
Christian Boltz
1786099b17 edit-admin.php:
- use additional column for error messages
- renamed $pAdminEdit_admin_password_text to $pAdminEdit_admin_password_text_error
- removed $tMessage

variables.inc.php:
- remove now unused $pAdminEdit_admin_password_text
  (this change was not contained in Dale's patch)

templates/admin_edit-admin.tpl
- added a 4th column for error messages
- HTML cleanup
- changed <h3> to <th>
- marked labels as <label>
- removed tMessage

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1098 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-20 22:39:31 +00:00
Christian Boltz
6e5deede3b edit-alias.tpl:
(forgot to include this one in r1095, same commit message)
- replaced <h3> with <th>
- marked labels with <label>
- marked non-editable fields with <em>
- align buttons with input fields
- note: removal of tMessage intentionally postponed

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1096 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-19 22:17:40 +00:00
Christian Boltz
b648510548 admin_edit-domain.tpl create-alias-domain.tpl, edit-vacation.tpl,
list-virtual_alias_domain.tpl, password.tpl:
- replaced <h3> with <th>
- marked labels with <label>
- marked non-editable fields with <em>
- align buttons with input fields
- note: removal of tMessage intentionally postponed

password.tpl:
- move error message formatting to template (language changes will follow
  in a later commit)
  - difference to Dale's patch: use <td class="error_msg"> instead of 
    <td><span class="error_msg">

edit-vacation.tpl:
- added language="JavaScript to <script> tags
- removed reference to calendar.css (now @import'ed in default.css)
- added class="flat" to activefrom and activeuntil input fields

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1095 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-19 22:08:07 +00:00
Christian Boltz
f0a153f0fc sendmail.php, broadcast-message.php:
- use smtp_get_admin_email() to determinate the mail sender
- rename $SESSID_USERNAME to $smtp_from_email
- replaced tMessage with flash_error() / flash_info()

sendmail.php:
- changes compared to Dale's patch:
  - use flash_info() for $PALANG['pSendmail_result_success']

broadcast-message.php:
- use flash_error() for $PALANG['pBroadcast_error_empty'] instead of
  hardcoding it in the template


sendmail.tpl,templates/broadcast-message.tpl:
- replace <h3> with <th>
- replaced $SESSID_USERNAME / $CONF[admin_email] with $smtp_from_email
- mark labels with <label>
- mark non-editable fields with <em>
- align buttons with input fields
- remove tMessage

sendmail.tpl:
- changes compared to Dale's patch:
  - fixed colspan for buttons cell

templates/broadcast-message.tpl:
- remove hardcoded error message (see broadcast-message.php change above)
- changes compared to Dale's patch:
  - fixed colspan for <th>

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1094 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-19 21:41:37 +00:00
Christian Boltz
75a9aabc70 config.inc.php:
- new config option $CONF['theme_custom_css']. This allows to add another
  CSS file that is loaded after $CONF['theme_css']. Useful if someone wants to
  do some small changes, but doesn't want to edit default.css
 
templates/header.tpl:
- include $CONF[theme_custom_css] if set

Changes compared to Dale's patch:
- $CONF['theme_custom_css'] is empty by default
- only include $CONF[theme_custom_css] if not empty

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1092 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-19 20:24:41 +00:00
Christian Boltz
8e9b423120 users_main.tpl:
- do not display username on main page. The user should know who he is ;-)
  and even if not, his name is displayed in the footer

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1091 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-19 20:01:57 +00:00
Christian Boltz
ce5f6ce559 users_edit-alias.tpl, users_password.tpl, users_vacation.tpl:
- replaced <h3> with <th>
- marked labels as <label>
- mark non-editable fields with <em>
- removed tMessage
- aligned buttons with input fields

users_password.tpl:
- put class=error_msg in template (will be removed from $PALANG strings)
  - change compared to Dale's patch: use <td class="error_msg"> instead of
    <td><span class="error_msg">

users_vacation.tpl:
- added class="flat" to fActiveFrom and fActiveUntil
- added language="JavaScript" to <script>
- removed reference to calendar.css (now included via default.css)

default.css
- added @import calendar.css

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1090 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-19 19:55:42 +00:00
Christian Boltz
2b1f3e4102 login.tpl, users_login.tpl:
- changed <h4> to <th>
- mark labels with <label>
- added a label to the language selector
- removed tMessage

languages/*:
- added PALANG[pLogin_language]

changes compared to Dale's patch:
- users_login.tpl:
  - do not add the <div class="field_container"> ... </div> wraps
  - use PALANG[pLogin_language] instead of PALANG[pUsersLogin_language]
    to avoid a superfluous string/translation
- login.tpl:
  - removed wrong colspan for language selector and login button
- de.lang: added german translation for PALANG[pLogin_language]

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1089 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-19 19:34:11 +00:00
Christian Boltz
3f46cdfc13 footer.tpl:
- swapped order of "update check" and "logged in as" to be more logical
  (we now have $version | update check | logged in as | $CONF['footer_text'])
- added a </div>

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1087 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-18 23:23:24 +00:00
Christian Boltz
27ce979678 header.tpl, index.tpl, flash_error.tpl:
- move flash_error and flash_info output from header.tpl to separate 
  flash_error.tpl file
- some HTML whitespace fixing in header.tpl

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1077 a1433add-5e2c-0410-b055-b7f2511e0802
2011-07-18 21:56:08 +00:00
Christian Boltz
5451b536d3 The link target of the "Main" menu item in users/ was configurable in
$CONF['user_footer_link']. This doesn't really make sense - it should
always be a link to users/main.php.

configs/menu.conf:
- added url_user_main = main.php

templates/users_menu.tpl:
- replaced $CONF.user_footer_link with #url_user_main#

config.inc.php:
- removed (now unused) $CONF['user_footer_link']


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1059 a1433add-5e2c-0410-b055-b7f2511e0802
2011-05-01 20:08:29 +00:00