Commit Graph

5 Commits (06c2d414ef8898da38c6151d3fc26a0577853fd8)

Author SHA1 Message Date
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
13 years ago
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
13 years ago
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
13 years ago
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
13 years ago
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
13 years ago