Skip to content

Instantly share code, notes, and snippets.

View apeisa's full-sized avatar
🏠
Working from home

Antti Peisa apeisa

🏠
Working from home
View GitHub Profile
@apeisa
apeisa / ProcessRoskis.module
Created December 14, 2012 23:08
Adds admin page where clients can also see pages in trash on restore those. Also remembers the parent from where the page were removed, so it can be put into same place.
<?php
/**
* Roskis
*
* Adds custom trash view that can be also accessed by defined roles
* Pages in trash can be searched, sorted and restored.
*
*
* Copyright 2013 by Antti Peisa
$contact_form = Form('ao2', './')
->setRenderer( $r ) // Tells the form which renderer to use to generate its output.
//->_show_submitted(true) // Causes the form to show submitted values
//->_show_html(true) // Causes the form's renderer to expose the generated HTML for the form.
//->_show_form_elements(true) // Causes the form to show its internal structure
//->_show_form_errors(true)
//->match('myContactFormValidator') // Adds a validator to the form. You can use a form-level validator to add complex inter-item validation.
->onSuccess('MySuccessHandler')
->novalidate() // Stop FF doing client-side evaluation whilst testing.
/*
* Aloha Editor
* Author & Copyright (c) 2010 Gentics Software GmbH
* [email protected]
* Licensed unter the terms of http://www.aloha-editor.com/license.html
*/
define(
['aloha',
'aloha/jquery',
'aloha/plugin',
$f = PwForm('Contact', './')
->setRenderer( fxForm::BASIC )
->setPwTemplate ( 'contact_form' )
->setPwParent ( '/contact_us/' )
->add( PwInput()->name('fullname')->required() )
->add( PwInput('Email', 'Your email address')->type('email')->required() )
->add( PwInput()->name('body')->required() )
->add( Submit('Send') )