Indefero

Indefero Git Source Tree

Root/src/IDF/Form/WikiConf.php

1<?php
2/* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3/*
4# ***** BEGIN LICENSE BLOCK *****
5# This file is part of InDefero, an open source project management application.
6# Copyright (C) 2008-2011 Céondo Ltd and contributors.
7#
8# InDefero is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# InDefero is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21#
22# ***** END LICENSE BLOCK ***** */
23
24
25/**
26 * Configuration of the labels etc. for the wiki pages.
27 */
28class IDF_Form_WikiConf extends Pluf_Form
29{
30 /**
31 * Defined as constants to easily access the value in the
32 * form in the case nothing is in the db yet.
33 */
34 const init_predefined = 'Featured = Listed on project home page
35Phase:Requirements = Project vision and requirements
36Phase:Design = Project design and key concerns
37Phase:Implementation = Developers\' guide
38Phase:QA = Testing plans and QA strategies
39Phase:Deploy = How to install and configure the program
40Phase:Support = Plans for user support and advocacy
41Deprecated = Most users should NOT reference this';
42
43 const init_one_max = '';
44
45 public function initFields($extra=array())
46 {
47 $this->fields['labels_wiki_predefined'] = new Pluf_Form_Field_Varchar(
48 array('required' => true,
49 'label' => __('Predefined documentation page labels'),
50 'initial' => self::init_predefined,
51 'widget_attrs' => array('rows' => 13,
52 'cols' => 75),
53 'widget' => 'Pluf_Form_Widget_TextareaInput',
54 ));
55
56 $this->fields['labels_wiki_one_max'] = new Pluf_Form_Field_Varchar(
57 array('required' => false,
58 'label' => __('Each documentation page may have at most one label with each of these classes'),
59 'initial' => self::init_one_max,
60 'widget_attrs' => array('size' => 60),
61 ));
62
63 }
64}
65
66
67

Archive Download this file