true # false => tools plugin ); public $scriptsAdded = array( 'date' => false, 'time' => false, 'maxLength' => false, 'autoComplete' => false ); public function __construct($View = null, $settings = array()) { if (($webroot = Configure::read('Asset.webroot')) !== null) { $this->settings['webroot'] = $webroot; } parent::__construct($View, $settings); } /** redirect **/ /** * TODO: make more generic * @param selectOptions: * - e.g: array('index'=>true/false, 'view'=>array('url'=>x, 'label'=>y), 'edit'=>'xyz', '/some/url'=>'some label') * 2010-05-02 ms */ public function redirect($selectOptions = array(), $tagOptions = array()) { $options = array('index'=>'Zurück zur Übersicht', 'view'=>__('View %s', __('Record')), '-1'=>'Auf dieser Seite bleiben'); foreach ($selectOptions as $key => $text) { if ($text === false) { # deactivate this one if (isset($options[$key])) { unset($options[$key]); } continue; } elseif ($text === true) { # leave it as it is } elseif (is_array($text)) { # own id and label? if (isset($text['url']) && isset($text['label'])) { if (isset($options[$key])) { unset($options[$key]); } $options[$text['url']] = $text['label']; } } else { # url => label $options[$key] = $text; } } //$options = array('4'=>'Zum Profil dieses Mitglieds'); //$options = array('edit'=>__('Edit %s', __('Record'))); //$options = array('add'=>'Einen weiteren Eintrag anlegen'); //$options[-1] = 'Auf dieser Seite bleiben'; return $this->input('Form.redirect', array('label'=>'Im Anschluss', 'options'=>$options), $tagOptions); } /** * Creates an HTML link, but accesses the url using DELETE method. * Requires javascript to be enabled in browser. * * This method creates a `