initial commit of file from CVS for e-smith-formmagick on Wed 12 Jul 08:54:49 BST 2023

This commit is contained in:
Brian Read 2023-07-12 08:54:49 +01:00
parent 47ba82242b
commit 8bb8161aa1
24 changed files with 3744 additions and 2 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*.rpm
*.log
*spec-20*
*.tar.xz

21
Makefile Normal file
View File

@ -0,0 +1,21 @@
# Makefile for source rpm: e-smith-formmagick
# $Id: Makefile,v 1.1 2016/02/05 23:01:22 stephdl Exp $
NAME := e-smith-formmagick
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -1,3 +1,17 @@
# e-smith-formmagick
# <img src="https://www.koozali.org/images/koozali/Logo/Png/Koozali_logo_2016.png" width="25%" vertical="auto" style="vertical-align:bottom"> e-smith-formmagick
SMEServer Koozali developed git repo for e-smith-formmagick smeserver
SMEServer Koozali developed git repo for e-smith-formmagick smeserver
## Wiki
<br />https://wiki.koozali.org/
## Bugzilla
Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=e-smith-formmagick&product=SME%20Server%2010.X&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED)
## Description
<br />*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.*
*Once it has been checked, then this comment will be deleted*
<br />
E-Smith-FormMagick is a versatile software platform designed for creating forms, surveys and questionnaires. It allows users to quickly and easily create form-based web applications with great flexibility. It provides a graphical user interface for creating forms, managing data and tracking responses. The platform supports a wide range of question types, from single answer radio buttons to complex matrix questions. Users can also customize their forms with custom themes, branding and more. With its robust analytics tools, users can track performance and get insights into how their forms are doing. Additionally, e-Smith-FormMagick offers a range of API integrations, allowing users to link up their forms with other systems and services. All in all, e-Smith-FormMagick is an excellent choice for businesses looking for a powerful, user-friendly forms platform.

131
additional/Artistic Normal file
View File

@ -0,0 +1,131 @@
The "Artistic License"
Preamble
The intent of this document is to state the conditions under which a
Package may be copied, such that the Copyright Holder maintains some
semblance of artistic control over the development of the package,
while giving the users of the package the right to use and distribute
the Package in a more-or-less customary fashion, plus the right to make
reasonable modifications.
Definitions:
"Package" refers to the collection of files distributed by the
Copyright Holder, and derivatives of that collection of files
created through textual modification.
"Standard Version" refers to such a Package if it has not been
modified, or has been modified in accordance with the wishes
of the Copyright Holder as specified below.
"Copyright Holder" is whoever is named in the copyright or
copyrights for the package.
"You" is you, if you're thinking about copying or distributing
this Package.
"Reasonable copying fee" is whatever you can justify on the
basis of media cost, duplication charges, time of people involved,
and so on. (You will not be required to justify it to the
Copyright Holder, but only to the computing community at large
as a market that must bear the fee.)
"Freely Available" means that no fee is charged for the item
itself, though there may be fees involved in handling the item.
It also means that recipients of the item may redistribute it
under the same conditions they received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder. A Package
modified in such a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way, provided
that you insert a prominent notice in each changed file stating how and
when you changed that file, and provided that you do at least ONE of the
following:
a) place your modifications in the Public Domain or otherwise make them
Freely Available, such as by posting said modifications to Usenet or
an equivalent medium, or placing the modifications on a major archive
site such as uunet.uu.net, or by allowing the Copyright Holder to include
your modifications in the Standard Version of the Package.
b) use the modified Package only within your corporation or organization.
c) rename any non-standard executables so the names do not conflict
with standard executables, which must also be provided, and provide
a separate manual page for each non-standard executable that clearly
documents how it differs from the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
4. You may distribute the programs of this Package in object code or
executable form, provided that you do at least ONE of the following:
a) distribute a Standard Version of the executables and library files,
together with instructions (in the manual page or equivalent) on where
to get the Standard Version.
b) accompany the distribution with the machine-readable source of
the Package with your modifications.
c) give non-standard executables non-standard names, and clearly
document the differences in manual pages (or equivalent), together
with instructions on where to get the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of this
Package. You may charge any fee you choose for support of this
Package. You may not charge a fee for this Package itself. However,
you may distribute this Package in aggregate with other (possibly
commercial) programs as part of a larger (possibly commercial) software
distribution provided that you do not advertise this Package as a
product of your own. You may embed this Package's interpreter within
an executable of yours (by linking); this shall be construed as a mere
form of aggregation, provided that the complete Standard Version of the
interpreter is so embedded.
6. The scripts and library files supplied as input to or produced as
output from the programs of this Package do not automatically fall
under the copyright of this Package, but belong to whoever generated
them, and may be sold commercially, and may be aggregated with this
Package. If such scripts or library files are aggregated with this
Package via the so-called "undump" or "unexec" methods of producing a
binary executable image, then distribution of such an image shall
neither be construed as a distribution of this Package nor shall it
fall under the restrictions of Paragraphs 3 and 4, provided that you do
not represent such an executable image as a Standard Version of this
Package.
7. C subroutines (or comparably compiled subroutines in other
languages) supplied by you and linked into this Package in order to
emulate subroutines and variables of the language defined by this
Package shall not be considered part of this Package, but are the
equivalent of input as in Paragraph 6, provided these subroutines do
not change the language in any way that would cause it to fail the
regression tests for the language.
8. Aggregation of this Package with a commercial distribution is always
permitted provided that the use of this Package is embedded; that is,
when no overt attempt is made to make this Package's interfaces visible
to the end user of the commercial distribution. Such use shall not be
construed as a distribution of this Package.
9. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.
10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End

340
additional/Copying Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

33
additional/LICENSE Normal file
View File

@ -0,0 +1,33 @@
# Copyright 1999-2003 Mitel Networks Corporation
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
Perl Kit, Version 5.0
Copyright 1989-2001, Larry Wall
All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of either:
a) the GNU General Public License as published by the Free
Software Foundation; either version 1, or (at your option) any
later version, or
b) the "Artistic License" which comes with this Kit.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either
the GNU General Public License or the Artistic License for more details.
You should have received a copy of the Artistic License with this
Kit, in the file named "Artistic". If not, I'll be glad to provide one.
You should also have received a copy of the GNU General Public License
along with this program in the file named "Copying". If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307, USA or visit their web page on the internet at
http://www.gnu.org/copyleft/gpl.html.

View File

@ -0,0 +1,538 @@
# $Id: e-smith-formmagick.spec,v 1.23 2011/03/14 20:46:05 snetram Exp $
Summary: e-smith-formmagick Perl modules for web manager i18n
%define name e-smith-formmagick
Name: %{name}
%define version 2.4.0
%define release 1
Version: %{version}
Release: %{release}%{?dist}
License: Artistic
Group: Applications/CPAN
Source0: %{name}-%{version}.tar.xz
BuildRoot: /var/tmp/%{name}-{%version}-%{release}-buildroot/
Requires: perl-CGI-FormMagick >= 0.92-16.el4.sme
Requires: perl(WWW::Automate) >= 0.20
Requires: perl(Crypt::Cracklib)
Requires: perl(I18N::LangTags) >= 0.27
Requires: e-smith-lib >= 1.18.0-21
BuildRequires: e-smith-devtools >= 1.6.6
BuildArchitectures: noarch
%changelog
* Fri Jan 25 2013 Shad L. Lords <slords@mail.com> 2.4.0-1.sme
- Roll new stream for sme9
* Mon Mar 14 2011 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-6.sme
- Rephrase IP address error message [SME: 6544]
* Sun Mar 13 2011 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-5.sme
- Change IP address error message [SME: 6544]
* Tue Oct 19 2010 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-4.sme
- Revert previous change as it might cause regression in contribs [SME: 6296]
- Add additional locale string [SME: 6296]
* Sun Oct 17 2010 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-3.sme
- Update textbox description to also reflect the option of a FQDN [SME: 6296]
* Thu Feb 4 2010 Shad L. Lords <slords@mail.com> 2.2.0-2.sme
- Update path for 64-bit compatibility [SME: 5756]
* Tue Oct 7 2008 Shad L. Lords <slords@mail.com> 2.2.0-1.sme
- Roll new stream to separate sme7/sme8 trees [SME: 4633]
* Thu Aug 7 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.4.0-20
- Move RESET_PASSWORD_TITLE to general [SME: 4475]
- Reverting all *PASSWORD_NO_MATCH to *PASSWORD_VERIFY_ERROR locale keys [SME: 4476]
- Add YOUR_ACCOUNT_INVALID to general [SME: 4478]
* Tue Aug 5 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.4.0-19
- Revert previous invalid locale changes (reverting to 1.4.0-17) [SME: 4472]
* Mon Aug 4 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.4.0-18
- Reverting some locale changes
* Sun Jul 27 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.4.0-17
- Revert patch here and fix in e-smith-ibays instead because of multiple
dependencies and incorrect naming scheme
* Sun Jul 27 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.4.0-16
- Fix password verify entry text box description in ibays panel entry
in e-smith-formmagick's general [SME: 4460]
* Tue Jul 8 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.4.0-15
- Moving single occurence for HOSTTYPE back to e-smith-hosts
* Sat Jul 5 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.4.0-14
- Added missing entry to general [SME: 4289]
* Mon Apr 28 2008 Shad L. Lords <slords@mail.com> 1.4.0-13
- Bump release to allow rebuild
* Fri Apr 25 2008 Shad L. Lords <slords@mail.com> 1.4.0-12
- Update requires to really pull in perl-CGI-FormMagick [SME: 4269]
* Wed Apr 23 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.4.0-11
- And more common <base> entries to general [SME: 4289]
* Mon Mar 10 2008 Shad L. Lords <slords@mail.com> 1.4.0-10
- Default charset to UTF-8 unless specified [SME: 3858]
* Wed Feb 13 2008 Stephen Noble <support@dungog.net> 1.4.0-9
- And more common <base> entries to general [SME: 3886]
* Sun Feb 10 2008 Stephen Noble <support@dungog.net> 1.4.0-8
- Added more common <base> entries to general [SME: 3886]
* Sun Feb 10 2008 Stephen Noble <support@dungog.net> 1.4.0-7
- Added header <base> entries to general [SME: 3886]
* Thu Nov 08 2007 Gavin Weight <gweight@gmail.com> 1.4.0-6
- Remove/Fix Formmagick.pm.orig file. [SME: 3526]
* Fri Jun 1 2007 Shad L. Lords <slords@mail.com> 1.4.0-5
- pam_unix requires passwords >= 6 [SME: 3039]
* Sun Apr 29 2007 Shad L. Lords <slords@mail.com>
- Clean up spec so package can be built by koji/plague
* Thu Dec 07 2006 Shad L. Lords <slords@mail.com>
- Update to new release naming. No functional changes.
- Make Packager generic
* Wed Apr 5 2006 Gordon Rowell <gordonr@gormand.com.au> 1.4.0-03
- Revert last change [SME: 1193]
* Wed Apr 5 2006 Gordon Rowell <gordonr@gormand.com.au> 1.4.0-02
- Restrict passwords to 14 characters [SME: 1193]
* Wed Mar 15 2006 Charlie Brady <charlie_brady@mitel.com> 1.4.0-01
- Roll stable stream version. [SME: 1016]
* Thu Dec 15 2005 Gordon Rowell <gordonr@gormand.com.au> 1.3.2-03
- 'strong' passwords must meet both Cracklib and the standard password
mantra: Upper Case AND Lower Case AND Digits AND Special characters
AND at least seven characters long [SME: 161]
* Wed Nov 30 2005 Gordon Rowell <gordonr@gormand.com.au> 1.3.2-02
- Bump release number only
* Fri Oct 14 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.3.2-01]
- Remove L10Ns from base packages [SF: 1309520]
* Fri Oct 14 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.3.1-01]
- New dev stream before relocating L10Ns
* Fri Sep 30 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.3.0-13]
- Added Italian L10N - Thanks Filippo Carletti [SF: 1309266]
* Fri Sep 30 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.3.0-12]
- Added tag for unlocalised string - thanks Filippo Carletti [SF: 1309284]
* Mon Sep 26 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.3.0-11]
- Added German L10N - Thanks Dietmar Berteld [SF: 1293325]
* Mon Sep 5 2005 Tony Clayton <apc@e-smith.com>
- [1.3.0-10]
- Update requires to CGI::FormMagick >= 0.91-28
- Fix esmith::FormMagick constructor brokenness for IbayPlugin compatibility
* Mon Jul 18 2005 Charlie Brady <charlieb@e-smith.com>
- [1.3.0-09]
- Add english tags for formmagick validation [SF: 1157116 (Shad)]
* Wed Nov 10 2004 Charlie Brady <charlieb@e-smith.com>
- [1.3.0-08]
- Don't try to read lexicon files which aren't there. [charlieb MN00056737]
* Tue Nov 9 2004 Charlie Brady <charlieb@e-smith.com>
- [1.3.0-07]
- Move changelog to top of spec file. [charlieb]
- Don't try to read from unopened file handle in _lexicon_read()
[charlieb MN00056701]
- Replace deprecated Copyright header with License header. [charlieb]
* Fri Oct 1 2004 Michael Soulier <msoulier@e-smith.com>
- [1.3.0-06]
- Added an error to the top of all pages with errors in them, instructing the
user to scroll down for specifics. So far localised in English only.
[msoulier MN00046857]
* Tue Sep 28 2004 Michael Soulier <msoulier@e-smith.com>
- [1.3.0-05]
- Updated requires with new perl dependencies. [msoulier MN00040240]
* Thu Aug 5 2004 Michael Soulier <msoulier@e-smith.com>
- [1.3.0-04]
- Added patch to permit "permitpipes" in validation, to turn off automagick
addition of "nopipes". Thanks to Pascal Schirrmann <schirrms@schirrms.net>
for the idea and the preliminary patch.
[msoulier MN00044774]
* Wed Oct 22 2003 Michael Soulier <msoulier@e-smith.com>
- [1.3.0-03]
- Updated _lexicon_filename_list to return lexicon from the preferred
languages that exists, instead of referencing non-existant files.
[msoulier 10397]
* Fri Oct 10 2003 Michael Soulier <msoulier@e-smith.com>
- [1.3.0-02]
- Added display_error and display_success methods. [msoulier 9652]
* Fri Oct 10 2003 Michael Soulier <msoulier@e-smith.com>
- [1.3.0-01]
- roll to dev stream - 1.3.0
* Wed Sep 3 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.2.1-01]
- Rebuild [gordonr 1305]
* Wed Sep 3 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.2.0-03]
- Rebuild [gordonr 1305]
* Wed Sep 3 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.2.0-02]
- Adjusted Copyright [gordonr 1305]
* Thu Jun 26 2003 Charlie Brady <charlieb@e-smith.com>
- [1.2.0-01]
- Changing version to stable stream number - 1.2.0
* Fri Jun 20 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.2-02]
- Bring the icon and message closer (IE fix) [gordonr 9084]
* Thu Jun 19 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.2-01]
- Add icon for success/error [gordonr 9055]
* Fri May 9 2003 Tony Clayton <apc@e-smith.com>
- [1.1.1-17]
- Remove duplicate status message from print_status_message [tonyc 8289]
* Fri May 9 2003 Tony Clayton <apc@e-smith.com>
- [1.1.1-16]
- Updated Spanish lexicon - thanks Alejandro [gordonr 3793]
* Tue May 6 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-15]
- Fixed syntax error in WIP code, and hid it [gordonr 3793]
* Tue May 6 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-14]
- Replaced "MDP" with mot de passe in FormMagick general lexicon [gordonr 3793]
- Added Spanish FM general lexicon [gordonr 3793]
* Thu May 1 2003 Tony Clayton <apc@e-smith.com>
- [1.1.1-13]
- print a sectionbar (hr) after status_message if not decorated [tonyc 8289]
* Thu Apr 17 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-12]
- Default status message to undecorated until we modify everyone to
using $fm->error() and $fm->success() [gordonr 8289]
* Tue Apr 8 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-11]
- Default status message to error type, not success type [gordonr 7919]
* Thu Apr 3 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-10]
- Added default error string of "ERROR" in error() method [gordonr 7919]
* Thu Apr 3 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-09]
- Apply div.success and div.error automatically around the status
message in print_status_message as long as panels calls
$self->error() or $self->success() [gordonr 7919]
* Thu Apr 3 2003 Lijie Deng <lijied@e-smith.com>
- [1.1.1-08]
- Added sub routine to validate the description [lijied 5054]
* Fri Mar 28 2003 Lijie Deng <lijied@e-smith.com>
- [1.1.1-07]
- Modified French lexicon to use lang="fr", rename the lexicon
directory to fr [lijied 6787]
* Fri Mar 14 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-06]
- Suppress missing languages line if none missing [gordonr 7677]
* Fri Mar 14 2003 Mark Knox <markk@e-smith.com>
- [1.1.1-05]
- Fixed a missing quote, and a subtle circular dependency in lexicon
loader [markk 7677]
* Fri Mar 14 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-04]
- Ensure that the fallback_language is in the list of languages back from
get_languages(). Log one "missing languages" line [gordonr 7677]
* Tue Mar 11 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-03]
- Override get_languages() to only return languages for which we have
lexica [gordonr 6787]
* Thu Mar 6 2003 Mike Dickson <miked@e-smith.com>
- [1.1.1-02]
- reverted to old cron system for this server package [miked 6734]
* Thu Mar 6 2003 Mike Dickson <miked@e-smith.com>
- [1.1.1-01]
- moved cron job to crontab [miked6724]
* Tue Feb 25 2003 Michael Soulier <msoulier@e-smith.com>
- [1.1.0-08]
- Added success and error methods to standardize panels. [msoulier 5517]
* Thu Jan 16 2003 Mark Knox <markk@e-smith.com>
- [1.1.0-07]
- Moved locale-specific date generation code into esmith::FormMagick as
gen_locale_date_string [markk 3357]
* Wed Jan 15 2003 Mark Knox <markk@e-smith.com>
- [1.1.0-06]
- Removed globs from lexicon file finder [markk 6574]
* Fri Dec 27 2002 Mike Dickson <miked@e-smith.com>
- [1.1.0-05]
- removed debugging messages inserted during UI update [miked 5494]
* Mon Dec 9 2002 Mike Dickson <miked@e-smith.com>
- [1.1.0-04]
- ui update {miked 5494]
* Mon Dec 2 2002 Mike Dickson <miked@e-smith.com>
- [1.1.0-03]
- ui update [miked 5494
* Thu Nov 21 2002 Mike Dickson <miked@e-smith.com>
- [1.1.0-02]
- update to new UI system [miked 5494]
* Wed Nov 20 2002 Mike Dickson <miked@e-smith.com>
- [1.1.0-01]
- Changing to development stream to 1.1.0
* Tue Oct 15 2002 Charlie Brady <charlieb@e-smith.com>
- [1.0.1-01]
- Roll new version to fix tagging problem
* Fri Oct 11 2002 Charlie Brady <charlieb@e-smith.com>
- [1.0.0-01]
- Roll to maintained version number to 1.0.0
* Wed Sep 25 2002 Mark Knox <markk@e-smith.com>
- [0.3.3-01]
- Rolling version to fix patching problems
* Wed Sep 25 2002 Mark Knox <markk@e-smith.com>
- [0.3.2-05]
- Don't export methods we don't provide [markk 4909]
* Fri Sep 6 2002 Mark Knox <markk@e-smith.com>
- [0.3.2-04]
- Added French localisation of NO_PIPES_ALLOWED [markk 3807]
* Thu Sep 5 2002 Mark Knox <markk@e-smith.com>
- [0.3.2-03]
- Corrected a broken test. All tests now pass. [markk 3807]
* Wed Sep 4 2002 Charlie Brady <charlieb@e-smith.com>
- [0.3.2-02]
- Add setting of $ENV{'HOME'} to BEGIN in esmith::FormMagick, specifically
so that mysql can find ~root/.my.cnf. [charlieb 4778]
* Mon Jun 24 2002 Kirrily Robert <skud@e-smith.com>
- [0.3.2-01]
- Removed now-superfluous nonblank() validation routine (it checked for
nopipes as well, but that's now automatic) [skud 3807]
* Mon Jun 24 2002 Kirrily Robert <skud@e-smith.com>
- [0.3.1-01]
- Nopipes validation is now forced for all fields [skud 3807]
* Wed Jun 5 2002 Charlie Brady <charlieb@e-smith.com>
- [0.3.0-01]
- Changing version to development stream number to 0.3.0
* Fri May 31 2002 Charlie Brady <charlieb@e-smith.com>
- [0.2.0-01]
- Changing version to maintained stream number to 0.2.0
* Fri May 31 2002 Mark Knox <markk@e-smith.com>
- [0.1.30-01]
- Forgot to export the new sub [markk 3752]
* Fri May 31 2002 Mark Knox <markk@e-smith.com>
- [0.1.29-01]
- Override nonblank to not allow pipes in field data [markk 3752]
* Mon May 27 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.28-01]
- Fix filelist generation for access restriction [gordonr 2187]
* Mon May 27 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.27-01]
- Restrict access to FormMagick session cache [gordonr 2187]
* Thu May 23 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.26-01]
- RPM rebuild forced by cvsroot2rpm
* Thu May 23 2002 Mark Knox <markk@e-smith.com>
- [0.1.25-01]
- Change test to expect correct results [markk 3618]
* Wed May 22 2002 Charlie Brady <charlieb@e-smith.com>
- [0.1.24-01]
- Set PATH to /bin:/usr/bin:/usr/local/bin rather than to empty.
* Wed May 22 2002 Mark Knox <markk@e-smith.com>
- [0.1.23-01]
- Localise "it's WAY too short" cracklib message -> fr-ca [markk 3592]
* Wed May 22 2002 Mark Knox <markk@e-smith.com>
- [0.1.22-01]
- Added validate_password method: checks a password using one of cracklib,
FormMagick validator, or none. [markk 3592]
- Added localisations for password validation messages [markk 3592]
* Thu May 16 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.21-01]
- Renamed en and fr locale directories to en-us and fr-ca [skud 3446]
* Thu May 16 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.20-01]
- Added OPERATION_STATUS_REPORT localisation [skud 3446]
* Tue May 14 2002 Tony Clayton <apc@e-smith.com>
- [0.1.19-01]
- grrr.. fix typo in charset fix [tonyc 3027/3462]
* Tue May 14 2002 Tony Clayton <apc@e-smith.com>
- [0.1.18-01]
- Re-add fix from 0.1.13-01: pass charset option to fm constructor
[tonyc 3027]
- Re-add export_to_level line in esmith::formmagick::import
[tonyc 3027]
* Mon May 13 2002 Tony Clayton <apc@e-smith.com>
- [0.1.17-01]
- Fix esmith::FormMagick::new to pass empty subclass test [tonyc 3109]
* Wed May 8 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.16-01]
- left/right trim heading/description entries after localisation [gordonr 3223]
* Thu Apr 25 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.15-01]
- Moved FormMagick session cookies to /var/cache/e-smith/formmagick/sessions
- Added added tmpwatch (daily, >8 hours old) for above directory [gordonr 3213]
* Wed Apr 24 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.14-01]
- Allow FM files in the html directory for {index,initial}.html [gordonr 3201]
* Tue Apr 23 2002 Mark Knox <markk@e-smith.com>
- [0.1.13-01]
- Allow user to specify XML charset, default to ISO-8859-1 [markk 3209]
* Fri Apr 19 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.12-01]
- Again set fallback_language("en-us") [gordonr 3031]
- fix undefined value bug in FormMagick.pm when no external lexicons exist
[tonyc]
* Tue Apr 16 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.10-01]
- Set fallback_language("en-us") [gordonr 3031]
- Added optional filename=>"/path/to/script" to new() [gordonr 3155]
- Added parsing of navigation headers [gordonr 3155]
* Mon Apr 15 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.10-01]
- Re-do symlink resolution using knowledge of e-smith hierarchy. The old
one was ugly and would break in the general case anyway [gordonr #3031]
* Fri Apr 12 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.9-01]
- Resolve $0 when it turns up as a symlink [gordonr #3031]
* Fri Apr 12 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.8-01]
- Now looks for lexicons in /etc/e-smith/locale [skud #3031]
* Fri Mar 15 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.7-01]
- Changed to BuildArchitectures: to noarch
* Wed Mar 13 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.6-01]
- Fixed importing so that esmith::FormMagick exported functions are
exported all the way out to scripts using subclasses [skud]
* Thu Feb 28 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.5-01]
- Updated dependencies to more recent Perl libraries and devtools [skud]
* Tue Feb 26 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.4-01]
- added print_status_message() routine
* Tue Feb 26 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.3-01]
- added full path to buildtests directive
* Thu Feb 21 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.2-01]
- cleanup of test scripts
* Thu Feb 21 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.1-01]
- improved tests (skud)
- improved documentation (skud)
- print_button() now exported (skud)
- security settings are now automatic (skud)
* Mon Feb 18 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.0-01]
- Initial release of 0.1.0.
%description
e-smith-formmagick provides a set of Perl modules containing various
convenience functions used to create SMEServer server-manager panels.
%prep
%setup -q -n %{name}-%{version}
%build
# build the test suite from embedded tests
/sbin/e-smith/buildtests 20e-smith-formmagick
mkdir -p root/var/cache/e-smith/formmagick/sessions
%clean
rm -rf $RPM_BUILD_ROOT
%install
rm -rf $RPM_BUILD_ROOT
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
rm -f %{name}-%{version}-%{release}-filelist
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
| grep -v /var/cache/e-smith/formmagick/sessions \
>%{name}-%{version}-%{release}-filelist
echo '%dir %attr(0700,root,root) /var/cache/e-smith/formmagick/sessions' \
>>%{name}-%{version}-%{release}-filelist
echo "%doc Copying" >> %{name}-%{version}-%{release}-filelist
echo "%doc Artistic" >> %{name}-%{version}-%{release}-filelist
echo "%doc LICENSE" >> %{name}-%{version}-%{release}-filelist
%files -f %{name}-%{version}-%{release}-filelist
%defattr(-,root,root)

1
contriborbase Normal file
View File

@ -0,0 +1 @@
sme10

568
e-smith-formmagick.spec Normal file
View File

@ -0,0 +1,568 @@
# $Id: e-smith-formmagick.spec,v 1.6 2021/04/17 02:05:55 jpp Exp $
Summary: e-smith-formmagick Perl modules for web manager i18n
%define name e-smith-formmagick
Name: %{name}
%define version 2.6.0
%define release 7
Version: %{version}
Release: %{release}%{?dist}
License: Artistic
Group: Applications/CPAN
Source0: %{name}-%{version}.tar.xz
BuildRoot: /var/tmp/%{name}-{%version}-%{release}-buildroot/
Requires: perl-CGI-FormMagick >= 0.92-16.el4.sme
Requires: perl(WWW::Automate) >= 0.20
Requires: perl(Crypt::Cracklib)
Requires: perl(I18N::LangTags) >= 0.27
Requires: e-smith-lib >= 1.18.0-21
BuildRequires: e-smith-devtools >= 1.6.6
BuildArchitectures: noarch
%changelog
* Wed Jul 12 2023 cvs2git.sh aka Brian Read <brianr@koozali.org> 2.6.0-7.sme
- Roll up patches and move to git repo [SME: 12338]
* Wed Jul 12 2023 BogusDateBot
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
by assuming the date is correct and changing the weekday.
* Fri Apr 16 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.6.0-6.sme
- fix wrong PATH which makes fail grub reconfiguration [SME: 11556]
* Sat Mar 06 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-5.sme
- increase CSRF timeout from 120s to 180s [SME: 10902]
added property httpd-admin{csrfTimeout} in second to override
added hability to ovarride the Timeout from panel to panel
* Tue Jan 05 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-4.sme
- add update event [SME: 11136]
* Sun Jan 27 2019 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-3.sme
- add locale for CSRF [SME: 10626]
* Sun Jan 27 2019 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-2.sme
- add CSRF patch [SME: 10626] - thank you to Daniel Berteaud
* Sat Feb 06 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 2.6.0-1.sme
- Initial release to sme10
* Fri Jan 25 2013 Shad L. Lords <slords@mail.com> 2.4.0-1.sme
- Roll new stream for sme9
- Perl module rpms moved to /usr/share/perl5/vendor_perl [SME: 7223]
* Mon Mar 14 2011 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-6.sme
- Rephrase IP address error message [SME: 6544]
* Sun Mar 13 2011 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-5.sme
- Change IP address error message [SME: 6544]
* Tue Oct 19 2010 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-4.sme
- Revert previous change as it might cause regression in contribs [SME: 6296]
- Add additional locale string [SME: 6296]
* Sun Oct 17 2010 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-3.sme
- Update textbox description to also reflect the option of a FQDN [SME: 6296]
* Thu Feb 4 2010 Shad L. Lords <slords@mail.com> 2.2.0-2.sme
- Update path for 64-bit compatibility [SME: 5756]
* Tue Oct 7 2008 Shad L. Lords <slords@mail.com> 2.2.0-1.sme
- Roll new stream to separate sme7/sme8 trees [SME: 4633]
* Thu Aug 7 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.4.0-20
- Move RESET_PASSWORD_TITLE to general [SME: 4475]
- Reverting all *PASSWORD_NO_MATCH to *PASSWORD_VERIFY_ERROR locale keys [SME: 4476]
- Add YOUR_ACCOUNT_INVALID to general [SME: 4478]
* Tue Aug 5 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.4.0-19
- Revert previous invalid locale changes (reverting to 1.4.0-17) [SME: 4472]
* Mon Aug 4 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.4.0-18
- Reverting some locale changes
* Sun Jul 27 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.4.0-17
- Revert patch here and fix in e-smith-ibays instead because of multiple
dependencies and incorrect naming scheme
* Sun Jul 27 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.4.0-16
- Fix password verify entry text box description in ibays panel entry
in e-smith-formmagick's general [SME: 4460]
* Tue Jul 8 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.4.0-15
- Moving single occurence for HOSTTYPE back to e-smith-hosts
* Sat Jul 5 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.4.0-14
- Added missing entry to general [SME: 4289]
* Mon Apr 28 2008 Shad L. Lords <slords@mail.com> 1.4.0-13
- Bump release to allow rebuild
* Fri Apr 25 2008 Shad L. Lords <slords@mail.com> 1.4.0-12
- Update requires to really pull in perl-CGI-FormMagick [SME: 4269]
* Wed Apr 23 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.4.0-11
- And more common <base> entries to general [SME: 4289]
* Mon Mar 10 2008 Shad L. Lords <slords@mail.com> 1.4.0-10
- Default charset to UTF-8 unless specified [SME: 3858]
* Wed Feb 13 2008 Stephen Noble <support@dungog.net> 1.4.0-9
- And more common <base> entries to general [SME: 3886]
* Sun Feb 10 2008 Stephen Noble <support@dungog.net> 1.4.0-8
- Added more common <base> entries to general [SME: 3886]
* Sun Feb 10 2008 Stephen Noble <support@dungog.net> 1.4.0-7
- Added header <base> entries to general [SME: 3886]
* Thu Nov 08 2007 Gavin Weight <gweight@gmail.com> 1.4.0-6
- Remove/Fix Formmagick.pm.orig file. [SME: 3526]
* Fri Jun 1 2007 Shad L. Lords <slords@mail.com> 1.4.0-5
- pam_unix requires passwords >= 6 [SME: 3039]
* Sun Apr 29 2007 Shad L. Lords <slords@mail.com>
- Clean up spec so package can be built by koji/plague
* Thu Dec 07 2006 Shad L. Lords <slords@mail.com>
- Update to new release naming. No functional changes.
- Make Packager generic
* Wed Apr 5 2006 Gordon Rowell <gordonr@gormand.com.au> 1.4.0-03
- Revert last change [SME: 1193]
* Wed Apr 5 2006 Gordon Rowell <gordonr@gormand.com.au> 1.4.0-02
- Restrict passwords to 14 characters [SME: 1193]
* Wed Mar 15 2006 Charlie Brady <charlie_brady@mitel.com> 1.4.0-01
- Roll stable stream version. [SME: 1016]
* Thu Dec 15 2005 Gordon Rowell <gordonr@gormand.com.au> 1.3.2-03
- 'strong' passwords must meet both Cracklib and the standard password
mantra: Upper Case AND Lower Case AND Digits AND Special characters
AND at least seven characters long [SME: 161]
* Wed Nov 30 2005 Gordon Rowell <gordonr@gormand.com.au> 1.3.2-02
- Bump release number only
* Fri Oct 14 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.3.2-01]
- Remove L10Ns from base packages [SF: 1309520]
* Fri Oct 14 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.3.1-01]
- New dev stream before relocating L10Ns
* Fri Sep 30 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.3.0-13]
- Added Italian L10N - Thanks Filippo Carletti [SF: 1309266]
* Fri Sep 30 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.3.0-12]
- Added tag for unlocalised string - thanks Filippo Carletti [SF: 1309284]
* Mon Sep 26 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.3.0-11]
- Added German L10N - Thanks Dietmar Berteld [SF: 1293325]
* Mon Sep 5 2005 Tony Clayton <apc@e-smith.com>
- [1.3.0-10]
- Update requires to CGI::FormMagick >= 0.91-28
- Fix esmith::FormMagick constructor brokenness for IbayPlugin compatibility
* Mon Jul 18 2005 Charlie Brady <charlieb@e-smith.com>
- [1.3.0-09]
- Add english tags for formmagick validation [SF: 1157116 (Shad)]
* Wed Nov 10 2004 Charlie Brady <charlieb@e-smith.com>
- [1.3.0-08]
- Don't try to read lexicon files which aren't there. [charlieb MN00056737]
* Tue Nov 9 2004 Charlie Brady <charlieb@e-smith.com>
- [1.3.0-07]
- Move changelog to top of spec file. [charlieb]
- Don't try to read from unopened file handle in _lexicon_read()
[charlieb MN00056701]
- Replace deprecated Copyright header with License header. [charlieb]
* Fri Oct 1 2004 Michael Soulier <msoulier@e-smith.com>
- [1.3.0-06]
- Added an error to the top of all pages with errors in them, instructing the
user to scroll down for specifics. So far localised in English only.
[msoulier MN00046857]
* Tue Sep 28 2004 Michael Soulier <msoulier@e-smith.com>
- [1.3.0-05]
- Updated requires with new perl dependencies. [msoulier MN00040240]
* Thu Aug 5 2004 Michael Soulier <msoulier@e-smith.com>
- [1.3.0-04]
- Added patch to permit "permitpipes" in validation, to turn off automagick
addition of "nopipes". Thanks to Pascal Schirrmann <schirrms@schirrms.net>
for the idea and the preliminary patch.
[msoulier MN00044774]
* Wed Oct 22 2003 Michael Soulier <msoulier@e-smith.com>
- [1.3.0-03]
- Updated _lexicon_filename_list to return lexicon from the preferred
languages that exists, instead of referencing non-existant files.
[msoulier 10397]
* Fri Oct 10 2003 Michael Soulier <msoulier@e-smith.com>
- [1.3.0-02]
- Added display_error and display_success methods. [msoulier 9652]
* Fri Oct 10 2003 Michael Soulier <msoulier@e-smith.com>
- [1.3.0-01]
- roll to dev stream - 1.3.0
* Wed Sep 3 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.2.1-01]
- Rebuild [gordonr 1305]
* Wed Sep 3 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.2.0-03]
- Rebuild [gordonr 1305]
* Wed Sep 3 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.2.0-02]
- Adjusted Copyright [gordonr 1305]
* Thu Jun 26 2003 Charlie Brady <charlieb@e-smith.com>
- [1.2.0-01]
- Changing version to stable stream number - 1.2.0
* Fri Jun 20 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.2-02]
- Bring the icon and message closer (IE fix) [gordonr 9084]
* Thu Jun 19 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.2-01]
- Add icon for success/error [gordonr 9055]
* Fri May 9 2003 Tony Clayton <apc@e-smith.com>
- [1.1.1-17]
- Remove duplicate status message from print_status_message [tonyc 8289]
* Fri May 9 2003 Tony Clayton <apc@e-smith.com>
- [1.1.1-16]
- Updated Spanish lexicon - thanks Alejandro [gordonr 3793]
* Tue May 6 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-15]
- Fixed syntax error in WIP code, and hid it [gordonr 3793]
* Tue May 6 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-14]
- Replaced "MDP" with mot de passe in FormMagick general lexicon [gordonr 3793]
- Added Spanish FM general lexicon [gordonr 3793]
* Thu May 1 2003 Tony Clayton <apc@e-smith.com>
- [1.1.1-13]
- print a sectionbar (hr) after status_message if not decorated [tonyc 8289]
* Thu Apr 17 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-12]
- Default status message to undecorated until we modify everyone to
using $fm->error() and $fm->success() [gordonr 8289]
* Tue Apr 8 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-11]
- Default status message to error type, not success type [gordonr 7919]
* Thu Apr 3 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-10]
- Added default error string of "ERROR" in error() method [gordonr 7919]
* Thu Apr 3 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-09]
- Apply div.success and div.error automatically around the status
message in print_status_message as long as panels calls
$self->error() or $self->success() [gordonr 7919]
* Thu Apr 3 2003 Lijie Deng <lijied@e-smith.com>
- [1.1.1-08]
- Added sub routine to validate the description [lijied 5054]
* Fri Mar 28 2003 Lijie Deng <lijied@e-smith.com>
- [1.1.1-07]
- Modified French lexicon to use lang="fr", rename the lexicon
directory to fr [lijied 6787]
* Fri Mar 14 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-06]
- Suppress missing languages line if none missing [gordonr 7677]
* Fri Mar 14 2003 Mark Knox <markk@e-smith.com>
- [1.1.1-05]
- Fixed a missing quote, and a subtle circular dependency in lexicon
loader [markk 7677]
* Fri Mar 14 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-04]
- Ensure that the fallback_language is in the list of languages back from
get_languages(). Log one "missing languages" line [gordonr 7677]
* Tue Mar 11 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.1.1-03]
- Override get_languages() to only return languages for which we have
lexica [gordonr 6787]
* Thu Mar 6 2003 Mike Dickson <miked@e-smith.com>
- [1.1.1-02]
- reverted to old cron system for this server package [miked 6734]
* Thu Mar 6 2003 Mike Dickson <miked@e-smith.com>
- [1.1.1-01]
- moved cron job to crontab [miked6724]
* Tue Feb 25 2003 Michael Soulier <msoulier@e-smith.com>
- [1.1.0-08]
- Added success and error methods to standardize panels. [msoulier 5517]
* Thu Jan 16 2003 Mark Knox <markk@e-smith.com>
- [1.1.0-07]
- Moved locale-specific date generation code into esmith::FormMagick as
gen_locale_date_string [markk 3357]
* Wed Jan 15 2003 Mark Knox <markk@e-smith.com>
- [1.1.0-06]
- Removed globs from lexicon file finder [markk 6574]
* Fri Dec 27 2002 Mike Dickson <miked@e-smith.com>
- [1.1.0-05]
- removed debugging messages inserted during UI update [miked 5494]
* Mon Dec 9 2002 Mike Dickson <miked@e-smith.com>
- [1.1.0-04]
- ui update {miked 5494]
* Mon Dec 2 2002 Mike Dickson <miked@e-smith.com>
- [1.1.0-03]
- ui update [miked 5494
* Thu Nov 21 2002 Mike Dickson <miked@e-smith.com>
- [1.1.0-02]
- update to new UI system [miked 5494]
* Wed Nov 20 2002 Mike Dickson <miked@e-smith.com>
- [1.1.0-01]
- Changing to development stream to 1.1.0
* Tue Oct 15 2002 Charlie Brady <charlieb@e-smith.com>
- [1.0.1-01]
- Roll new version to fix tagging problem
* Fri Oct 11 2002 Charlie Brady <charlieb@e-smith.com>
- [1.0.0-01]
- Roll to maintained version number to 1.0.0
* Wed Sep 25 2002 Mark Knox <markk@e-smith.com>
- [0.3.3-01]
- Rolling version to fix patching problems
* Wed Sep 25 2002 Mark Knox <markk@e-smith.com>
- [0.3.2-05]
- Don't export methods we don't provide [markk 4909]
* Fri Sep 6 2002 Mark Knox <markk@e-smith.com>
- [0.3.2-04]
- Added French localisation of NO_PIPES_ALLOWED [markk 3807]
* Thu Sep 5 2002 Mark Knox <markk@e-smith.com>
- [0.3.2-03]
- Corrected a broken test. All tests now pass. [markk 3807]
* Wed Sep 4 2002 Charlie Brady <charlieb@e-smith.com>
- [0.3.2-02]
- Add setting of $ENV{'HOME'} to BEGIN in esmith::FormMagick, specifically
so that mysql can find ~root/.my.cnf. [charlieb 4778]
* Mon Jun 24 2002 Kirrily Robert <skud@e-smith.com>
- [0.3.2-01]
- Removed now-superfluous nonblank() validation routine (it checked for
nopipes as well, but that's now automatic) [skud 3807]
* Mon Jun 24 2002 Kirrily Robert <skud@e-smith.com>
- [0.3.1-01]
- Nopipes validation is now forced for all fields [skud 3807]
* Wed Jun 5 2002 Charlie Brady <charlieb@e-smith.com>
- [0.3.0-01]
- Changing version to development stream number to 0.3.0
* Fri May 31 2002 Charlie Brady <charlieb@e-smith.com>
- [0.2.0-01]
- Changing version to maintained stream number to 0.2.0
* Fri May 31 2002 Mark Knox <markk@e-smith.com>
- [0.1.30-01]
- Forgot to export the new sub [markk 3752]
* Fri May 31 2002 Mark Knox <markk@e-smith.com>
- [0.1.29-01]
- Override nonblank to not allow pipes in field data [markk 3752]
* Mon May 27 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.28-01]
- Fix filelist generation for access restriction [gordonr 2187]
* Mon May 27 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.27-01]
- Restrict access to FormMagick session cache [gordonr 2187]
* Thu May 23 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.26-01]
- RPM rebuild forced by cvsroot2rpm
* Thu May 23 2002 Mark Knox <markk@e-smith.com>
- [0.1.25-01]
- Change test to expect correct results [markk 3618]
* Wed May 22 2002 Charlie Brady <charlieb@e-smith.com>
- [0.1.24-01]
- Set PATH to /bin:/usr/bin:/usr/local/bin rather than to empty.
* Wed May 22 2002 Mark Knox <markk@e-smith.com>
- [0.1.23-01]
- Localise "it's WAY too short" cracklib message -> fr-ca [markk 3592]
* Wed May 22 2002 Mark Knox <markk@e-smith.com>
- [0.1.22-01]
- Added validate_password method: checks a password using one of cracklib,
FormMagick validator, or none. [markk 3592]
- Added localisations for password validation messages [markk 3592]
* Thu May 16 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.21-01]
- Renamed en and fr locale directories to en-us and fr-ca [skud 3446]
* Thu May 16 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.20-01]
- Added OPERATION_STATUS_REPORT localisation [skud 3446]
* Tue May 14 2002 Tony Clayton <apc@e-smith.com>
- [0.1.19-01]
- grrr.. fix typo in charset fix [tonyc 3027/3462]
* Tue May 14 2002 Tony Clayton <apc@e-smith.com>
- [0.1.18-01]
- Re-add fix from 0.1.13-01: pass charset option to fm constructor
[tonyc 3027]
- Re-add export_to_level line in esmith::formmagick::import
[tonyc 3027]
* Mon May 13 2002 Tony Clayton <apc@e-smith.com>
- [0.1.17-01]
- Fix esmith::FormMagick::new to pass empty subclass test [tonyc 3109]
* Wed May 8 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.16-01]
- left/right trim heading/description entries after localisation [gordonr 3223]
* Thu Apr 25 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.15-01]
- Moved FormMagick session cookies to /var/cache/e-smith/formmagick/sessions
- Added added tmpwatch (daily, >8 hours old) for above directory [gordonr 3213]
* Wed Apr 24 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.14-01]
- Allow FM files in the html directory for {index,initial}.html [gordonr 3201]
* Tue Apr 23 2002 Mark Knox <markk@e-smith.com>
- [0.1.13-01]
- Allow user to specify XML charset, default to ISO-8859-1 [markk 3209]
* Fri Apr 19 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.12-01]
- Again set fallback_language("en-us") [gordonr 3031]
- fix undefined value bug in FormMagick.pm when no external lexicons exist
[tonyc]
* Tue Apr 16 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.10-01]
- Set fallback_language("en-us") [gordonr 3031]
- Added optional filename=>"/path/to/script" to new() [gordonr 3155]
- Added parsing of navigation headers [gordonr 3155]
* Mon Apr 15 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.10-01]
- Re-do symlink resolution using knowledge of e-smith hierarchy. The old
one was ugly and would break in the general case anyway [gordonr #3031]
* Fri Apr 12 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.9-01]
- Resolve $0 when it turns up as a symlink [gordonr #3031]
* Fri Apr 12 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.8-01]
- Now looks for lexicons in /etc/e-smith/locale [skud #3031]
* Fri Mar 15 2002 Gordon Rowell <gordonr@e-smith.com>
- [0.1.7-01]
- Changed to BuildArchitectures: to noarch
* Wed Mar 13 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.6-01]
- Fixed importing so that esmith::FormMagick exported functions are
exported all the way out to scripts using subclasses [skud]
* Thu Feb 28 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.5-01]
- Updated dependencies to more recent Perl libraries and devtools [skud]
* Tue Feb 26 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.4-01]
- added print_status_message() routine
* Tue Feb 26 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.3-01]
- added full path to buildtests directive
* Thu Feb 21 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.2-01]
- cleanup of test scripts
* Thu Feb 21 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.1-01]
- improved tests (skud)
- improved documentation (skud)
- print_button() now exported (skud)
- security settings are now automatic (skud)
* Mon Feb 18 2002 Kirrily Robert <skud@e-smith.com>
- [0.1.0-01]
- Initial release of 0.1.0.
%description
e-smith-formmagick provides a set of Perl modules containing various
convenience functions used to create SMEServer server-manager panels.
%prep
%setup -q -n %{name}-%{version}
mkdir -p root/etc/e-smith/events/%{name}-update
%build
# build the test suite from embedded tests
/sbin/e-smith/buildtests 20e-smith-formmagick
mkdir -p root/var/cache/e-smith/formmagick/sessions
%clean
rm -rf $RPM_BUILD_ROOT
%install
rm -rf $RPM_BUILD_ROOT
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
rm -f %{name}-%{version}-%{release}-filelist
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
| grep -v /var/cache/e-smith/formmagick/sessions \
>%{name}-%{version}-%{release}-filelist
echo '%dir %attr(0700,root,root) /var/cache/e-smith/formmagick/sessions' \
>>%{name}-%{version}-%{release}-filelist
echo "%doc Copying" >> %{name}-%{version}-%{release}-filelist
echo "%doc Artistic" >> %{name}-%{version}-%{release}-filelist
echo "%doc LICENSE" >> %{name}-%{version}-%{release}-filelist
%files -f %{name}-%{version}-%{release}-filelist
%defattr(-,root,root)

View File

@ -0,0 +1 @@
[ -d /var/cache/e-smith/formmagick/sessions ] && /usr/sbin/tmpwatch -f 8 /var/cache/e-smith/formmagick/sessions

View File

@ -0,0 +1,719 @@
<lexicon lang="en-us">
<!-- vim: ft=xml:
-->
<entry>
<base>Collaboration</base>
<trans>Collaboration</trans>
</entry>
<entry>
<base>Administration</base>
<trans>Administration</trans>
</entry>
<entry>
<base>Security</base>
<trans>Security</trans>
</entry>
<entry>
<base>Configuration</base>
<trans>Configuration</trans>
</entry>
<entry>
<base>Miscellaneous</base>
<trans>Miscellaneous</trans>
</entry>
<entry>
<base>Your Settings</base>
<trans>Your Settings</trans>
</entry>
<entry>
<base>SAVE</base>
<trans>Save</trans>
</entry>
<entry>
<base>CANCEL</base>
<trans>Cancel</trans>
</entry>
<entry>
<base>ENABLED</base>
<trans>Enabled</trans>
</entry>
<entry>
<base>DISABLED</base>
<trans>Disabled</trans>
</entry>
<entry>
<base>NO</base>
<trans>No</trans>
</entry>
<entry>
<base>YES</base>
<trans>Yes</trans>
</entry>
<entry>
<base>ADD</base>
<trans>Add</trans>
</entry>
<entry>
<base>CREATE</base>
<trans>Create</trans>
</entry>
<entry>
<base>MODIFY</base>
<trans>Modify</trans>
</entry>
<entry>
<base>REMOVE</base>
<trans>Remove</trans>
</entry>
<entry>
<base>COMMENT</base>
<trans>Comment</trans>
</entry>
<entry>
<base>NEXT</base>
<trans>Next</trans>
</entry>
<entry>
<base>SELF</base>
<trans>Self</trans>
</entry>
<entry>
<base>REMOTE</base>
<trans>Remote</trans>
</entry>
<entry>
<base>LOCAL</base>
<trans>Local</trans>
</entry>
<entry>
<base>ACTION</base>
<trans>Action</trans>
</entry>
<entry>
<base>NETWORK</base>
<trans>Network</trans>
</entry>
<entry>
<base>ROUTER</base>
<trans>Router</trans>
</entry>
<entry>
<base>OPERATION_STATUS_REPORT</base>
<trans>Operation status report</trans>
</entry>
<entry>
<base>ACCOUNT</base>
<trans>Account</trans>
</entry>
<entry>
<base>GROUP</base>
<trans>Group</trans>
</entry>
<entry>
<base>DESC_SECTIONBAR</base>
<trans>
<![CDATA[
<hr class="sectionbar"/>
]]>
</trans>
</entry>
<entry>
<base>NO_PIPES_ALLOWED</base>
<trans>Pipe symbols (|) are not permitted in this field</trans>
</entry>
<entry>
<base>ERROR_BELOW</base>
<trans>
ERROR: There was an error in the validation of this page. Please
scroll down and find the specific problem.
</trans>
</entry>
<entry>
<base>ACCESS</base>
<trans>
Access
</trans>
</entry>
<entry>
<base>ACCOUNT_LOCKED</base>
<trans>
Account is locked
</trans>
</entry>
<entry>
<base>GROUP_ADD</base>
<trans>
Add group
</trans>
</entry>
<entry>
<base>NETWORKS_ALLOW_LOCAL</base>
<trans>
Allow access only from local networks
</trans>
</entry>
<entry>
<base>NETWORKS_ALLOW_PUBLIC</base>
<trans>
Allow public access (entire Internet)
</trans>
</entry>
<entry>
<base>ERROR_PASSWORD_CHANGE</base>
<trans>
An error occurred while attempting to change your password. Please make sure that the old password entered is correct.
</trans>
</entry>
<entry>
<base>BACK</base>
<trans>
Back
</trans>
</entry>
<entry>
<base>BACKUP</base>
<trans>
Backup
</trans>
</entry>
<entry>
<base>DESCRIPTION_BRIEF</base>
<trans>
Brief description
</trans>
</entry>
<entry>
<base>PASSWORD_CHANGE</base>
<trans>
Change Password
</trans>
</entry>
<entry>
<base>RESET_PASSWORD_TITLE</base>
<trans>Reset user password</trans>
</entry>
<entry>
<base>ACCOUNT_PASSWORD_CHANGE</base>
<trans>
Change account password
</trans>
</entry>
<entry>
<base>CONTENT</base>
<trans>
Content
</trans>
</entry>
<entry>
<base>CREATE_GROUP</base>
<trans>
Create user group
</trans>
</entry>
<entry>
<base>USER_LIST_CURRENT</base>
<trans>
Current list of users
</trans>
</entry>
<entry>
<base>DESCRIPTION</base>
<trans>
Description
</trans>
</entry>
<entry>
<base>DESTINATION</base>
<trans>
Destination
</trans>
</entry>
<entry>
<base>DOMAIN_NAME</base>
<trans>
Domain name
</trans>
</entry>
<entry>
<base>DOMAIN</base>
<trans>
Domain
</trans>
</entry>
<entry>
<base>DOMAINS</base>
<trans>
Domains
</trans>
</entry>
<entry>
<base>DOWNLOAD</base>
<trans>
Download
</trans>
</entry>
<entry>
<base>ERROR_UPDATING_CONFIGURATION</base>
<trans>
Error occurred while updating system configuration.
</trans>
</entry>
<entry>
<base>GROUP_MEMBERS</base>
<trans>
Group Members
</trans>
</entry>
<entry>
<base>GROUP_NAME</base>
<trans>
Group Name
</trans>
</entry>
<entry>
<base>GROUPS</base>
<trans>
Groups
</trans>
</entry>
<entry>
<base>IP_ADDRESS</base>
<trans>
IP Address
</trans>
</entry>
<entry>
<base>IP_ADDRESS_OR_FQDN</base>
<trans>
IP Address or FQDN
</trans>
</entry>
<entry>
<base>USER_INVALID</base>
<trans>
Invalid user
</trans>
</entry>
<entry>
<base>LOCATION</base>
<trans>
Location
</trans>
</entry>
<entry>
<base>MB</base>
<trans>
Mb
</trans>
</entry>
<entry>
<base>MODIFY_USER_GROUP</base>
<trans>
Modify user group
</trans>
</entry>
<entry>
<base>NAME</base>
<trans>
Name
</trans>
</entry>
<entry>
<base>PASSWORD_VERIFY_NEW</base>
<trans>
New password (verify):
</trans>
</entry>
<entry>
<base>PASSWORD_NEW</base>
<trans>
New password:
</trans>
</entry>
<entry>
<base>OFF</base>
<trans>
Off
</trans>
</entry>
<entry>
<base>OK</base>
<trans>
Ok
</trans>
</entry>
<entry>
<base>PASSWORD_OLD</base>
<trans>
Old password:
</trans>
</entry>
<entry>
<base>ON</base>
<trans>
On
</trans>
</entry>
<entry>
<base>PASSWORD</base>
<trans>
Password
</trans>
</entry>
<entry>
<base>PERFORM</base>
<trans>
Perform
</trans>
</entry>
<entry>
<base>RECONFIGURE</base>
<trans>
Reconfigure
</trans>
</entry>
<entry>
<base>REMOVE_USER_GROUP</base>
<trans>
Remove user group
</trans>
</entry>
<entry>
<base>PASSWORD_RESET</base>
<trans>
Reset password
</trans>
</entry>
<entry>
<base>RESTORE</base>
<trans>
Restore
</trans>
</entry>
<entry>
<base>SHUTDOWN</base>
<trans>
Shutdown
</trans>
</entry>
<entry>
<base>SUCCESS</base>
<trans>
Success
</trans>
</entry>
<entry>
<base>ACCOUNT_NAME_INVALID</base>
<trans>
The account name entered is invalid.
</trans>
</entry>
<entry>
<base>ACCOUNT_NAME_INVALID_CHARS</base>
<trans>
The account name you entered contained invalid characters.
</trans>
</entry>
<entry>
<base>PASSWORD_OLD_INVALID_CHARS</base>
<trans>
The old password you entered contained invalid characters.
</trans>
</entry>
<entry>
<base>PASSWORD_INVALID_CHARS</base>
<trans>
The password you entered contained invalid characters.
</trans>
</entry>
<entry>
<base>PASSWORD_VERIFY_ERROR</base>
<trans>
The passwords you entered did not match.
</trans>
</entry>
<entry>
<base>ACCOUNT_USER_NONE</base>
<trans>
There are no user accounts in the system.
</trans>
</entry>
<entry>
<base>ACCOUNT_GROUP_NONE</base>
<trans>
There are no user groups in the system.
</trans>
</entry>
<entry>
<base>ERROR_INVALID_CHARS</base>
<trans>
Unexpected characters in description.
</trans>
</entry>
<entry>
<base>USER_NAME</base>
<trans>
User Name
</trans>
</entry>
<entry>
<base>YOUR_ACCOUNT</base>
<trans>
Your account:
</trans>
</entry>
<entry>
<base>YOUR_ACCOUNT_INVALID</base>
<trans>The account name entered is invalid.</trans>
</entry>
<entry>
<base>PASSWORD_CHANGE_SUCCESS</base>
<trans>
Your password has been successfully changed.
</trans>
</entry>
<entry>
<base>FM_NONBLANK</base>
<trans>
This field must not be left blank
</trans>
</entry>
<entry>
<base>FM_INTEGER</base>
<trans>
This field must contain a positive integer
</trans>
</entry>
<entry>
<base>FM_NUMBER</base>
<trans>
This field must contain a number
</trans>
</entry>
<entry>
<base>FM_WORD</base>
<trans>
This field must look like a single word.
</trans>
</entry>
<entry>
<base>FM_DATE</base>
<trans>
The data entered could not be parsed as a date
</trans>
</entry>
<entry>
<base>FM_CREDIT_CARD_NUMBER1</base>
<trans>
You must enter a credit card number
</trans>
</entry>
<entry>
<base>FM_CREDIT_CARD_NUMBER2</base>
<trans>
Credit card numbers shouldn't have anything but numbers, spaces or dashes
</trans>
</entry>
<entry>
<base>FM_CREDIT_CARD_NUMBER3</base>
<trans>
Must be at least 14 characters in length
</trans>
</entry>
<entry>
<base>FM_CREDIT_CARD_NUMBER4</base>
<trans>
Doesn't appear to be a valid credit card number
</trans>
</entry>
<entry>
<base>FM_CREDIT_CARD_EXPIRY1</base>
<trans>
No expiry date entered.
</trans>
</entry>
<entry>
<base>FM_CREDIT_CARD_EXPIRY2</base>
<trans>
Expiry date must be in the format MM/YY or MM/YYYY
</trans>
</entry>
<entry>
<base>FM_CREDIT_CARD_EXPIRY3</base>
<trans>
This expiry date appears to have already passed
</trans>
</entry>
<entry>
<base>FM_CREDIT_CARD_EXPIRY4</base>
<trans>
This expiry date appears to be too far in the future
</trans>
</entry>
<entry>
<base>FM_ISO_COUNTRY_CODE1</base>
<trans>
You must provide a country code
</trans>
</entry>
<entry>
<base>FM_ISO_COUNTRY_CODE2</base>
<trans>
This field does not contain an ISO country code
</trans>
</entry>
<entry>
<base>FM_US_STATE</base>
<trans>
This doesn't appear to be a valid 2-letter US state abbreviation
</trans>
</entry>
<entry>
<base>FM_US_ZIPCODE</base>
<trans>
US zip codes must contain 5 or 9 numbers
</trans>
</entry>
<entry>
<base>FM_MINLENGTH1</base>
<trans>
Minimum length has been specified meaninglessly as {$minlength}
</trans>
</entry>
<entry>
<base>FM_MINLENGTH2</base>
<trans>
This field must be at least {$minlength} characters
</trans>
</entry>
<entry>
<base>FM_MAXLENGTH1</base>
<trans>
Maximum length has been specified meaninglessly as {$maxlength}
</trans>
</entry>
<entry>
<base>FM_MAXLENGTH2</base>
<trans>
This field must be no more than {$maxlength} characters
</trans>
</entry>
<entry>
<base>FM_EXACTLENGTH1</base>
<trans>
You must specify the length for the field.
</trans>
</entry>
<entry>
<base>FM_EXACTLENGTH2</base>
<trans>
You must specify the exactlength of the field with an integer
</trans>
</entry>
<entry>
<base>FM_EXACTLENGTH3</base>
<trans>
This field must be exactly {$exactlength} characters
</trans>
</entry>
<entry>
<base>FM_LENGTHRANGE1</base>
<trans>
You must specify the maximum and minimum length for the field.
</trans>
</entry>
<entry>
<base>FM_LENGTHRANGE2</base>
<trans>
You must specify the maximum and minimum lengths of the field with an integer
</trans>
</entry>
<entry>
<base>FM_LENGTHRANGE3</base>
<trans>
This field must be between {$minlength} and {$maxlength} characters
</trans>
</entry>
<entry>
<base>FM_URL</base>
<trans>
This field must contain a URL starting with http:// or ftp://
</trans>
</entry>
<entry>
<base>FM_EMAIL_SIMPLE1</base>
<trans>
You must enter an email address.
</trans>
</entry>
<entry>
<base>FM_EMAIL_SIMPLE2</base>
<trans>
This field doesn't look like an RFC822-compliant email address
</trans>
</entry>
<entry>
<base>FM_DOMAIN_NAME</base>
<trans>
This field doesn't look like a valid Internet domain name or hostname.
</trans>
</entry>
<entry>
<base>FM_IP_NUMBER1</base>
<trans>
This field must contain a valid IP number and can not be left blank.
</trans>
</entry>
<entry>
<base>FM_IP_NUMBER2</base>
<trans>
Invalid IP address format (expected X.X.X.X)
</trans>
</entry>
<entry>
<base>FM_IP_NUMBER3</base>
<trans>
{$octet} is more than 255
</trans>
</entry>
<entry>
<base>FM_USERNAME</base>
<trans>
This field must look like a valid username (3 to 8 letters and numbers)
</trans>
</entry>
<entry>
<base>FM_PASSWORD1</base>
<trans>
You must provide a password.
</trans>
</entry>
<entry>
<base>FM_PASSWORD2</base>
<trans>
The password you provided was not a good password. A good password must
contain all of the following: upper case letter, lower case letter, number,
non-alphanumeric character, be at least 7 characters long.
</trans>
</entry>
<entry>
<base>FM_MAC_ADDRESS1</base>
<trans>
You must provide a MAC address.
</trans>
</entry>
<entry>
<base>FM_MAC_ADDRESS2</base>
<trans>
The MAC address you provided was not valid.
</trans>
</entry>
<entry>
<base>FM_ERR_UNEXPECTED_DESC</base>
<trans>Error: unexpected or missing characters in description</trans>
</entry>
<entry>
<base>CSRF_VALIDATION_FAILURE</base>
<trans>Error: CSRF token is invalid or outdated.</trans>
</entry>
</lexicon>

View File

@ -0,0 +1,23 @@
<form title="Checkboxes" header="head.tmpl" footer="foot.tmpl" post-event="done">
<page name="Food">
<title>Food</title>
<field id="fries" type="checkbox" checked="1">
<label>Would you like fries with that?</label>
</field>
<field id="ketchup" type="checkbox">
<label>How about ketchup?</label>
</field>
</page>
<page name="Clothes">
<title>Clothes</title>
<field id="hat" type="checkbox" checked="1">
<label>Hat</label>
</field>
<field id="shoes" type="checkbox">
<label>Shoes</label>
</field>
<field id="gloves" type="checkbox">
<label>Gloves</label>
</field>
</page>
</form>

View File

@ -0,0 +1,6 @@
<lexicon lang="en">
<entry>
<base>YES</base>
<trans>Yes</trans>
</entry>
</lexicon>

View File

@ -0,0 +1,7 @@
<lexicon lang="en">
<entry>
<base>TEST</base>
<trans>Test</trans>
</entry>
</lexicon>

View File

@ -0,0 +1,6 @@
<lexicon lang="fr">
<entry>
<base>YES</base>
<trans>Oui</trans>
</entry>
</lexicon>

View File

@ -0,0 +1,6 @@
<lexicon lang="fr">
<entry>
<base>TEST</base>
<trans>Essayer</trans>
</entry>
</lexicon>

View File

@ -0,0 +1,16 @@
#
# Junk lines
# More junk lines
#
# The navigation headers we expect to see:
# heading : Test heading
# description : Test description
# navigation : 1000 1200
#
#
#
# And some more navigation headers, to make sure we extract the first ones
# heading : Wrong heading
# description : Wrong description
# navigation : 42 64
#

View File

@ -0,0 +1,19 @@
<form title="Checkboxes" header="head.tmpl" footer="foot.tmpl" post-event="done">
<page name="Food">
<title>Food</title>
<field id="test" type="text" validation="test">
<label>Would you like fries with that?</label>
</field>
<field id="test2" type="text">
<label>Would you like fries with that?</label>
</field>
</page>
<page name="Clothes">
<field id="test3" type="text" validation="test">
<label>Would you like fries with that?</label>
</field>
<field id="test4" type="text">
<label>Would you like fries with that?</label>
</field>
</page>
</form>

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

View File

@ -0,0 +1,995 @@
#----------------------------------------------------------------------
# Copyright 1999-2003 Mitel Networks Corporation
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
# $Id: FormMagick.pm,v 1.69 2005/09/06 05:22:42 apc Exp $
#----------------------------------------------------------------------
package esmith::FormMagick;
our $VERSION = sprintf '%d.%03d', q$Revision: 1.69 $ =~ /: (\d+).(\d+)/;
use CGI::FormMagick;
use Exporter;
use strict;
use esmith::util;
use Carp;
use File::Basename;
use vars qw( @ISA @EXPORT);
use esmith::I18N;
use POSIX qw(strftime);
# use I18N::LangTags qw(super_languages);
use esmith::ConfigDB;
@ISA = qw(CGI::FormMagick Exporter);
@EXPORT = qw(
turn_off_buttons
print_button
print_status_message
set_status_message
validate_password
validate_description
nopipes
gen_locale_date_string
_filename
_lexicon_filename_list
_scriptname_from_filename
_read_lexicons
);
our $configdb = esmith::ConfigDB->open_ro();
=begin _private
The import method is doing some tricky stuff to make sure that when
esmith::FormMagick is subclassed and the subclass is used, the exported
functions for both esmith::FormMagick *and* its subclass are available.
=end _private
=cut
sub import {
my $class = shift;
__PACKAGE__->export_to_level(1, undef, @_);
$class->export_to_level(1, undef, @_) unless __PACKAGE__ eq $class;
}
=pod
=head1 NAME
esmith::FormMagick - esmith wrapper for CGI::FormMagick
=head1 SYNOPSIS
use esmith::FormMagick;
my $f = new esmith::FormMagick();
$f->display();
my $f = new esmith::FormMagick( filename=>'/some/path/to/script' );
$f->display();
=head1 DESCRIPTION
esmith::FormMagick is a wrapper for CGI::FormMagick which automatically
does all the things that we always want to do for the SMEServer manager.
These include:
=over 4
=item *
Turning off unwanted buttons (previous, reset)
=item *
Automatically clearing %ENV for taint-friendliness
=item *
Disabling uploads through CGI.pm and setting the MAX_POST size to 100KB.
=item *
Reading in FormMagick XML from the __DATA__ section of the script
=back
This last point is the most important one. In order to avoid having
XML files littering the filesystem, we have chosen to include them along
with the script which parses them. Your script will therefore look like
this:
my $fm = esmith::FormMagick->new();
$fm->display();
# miscellaneous subroutines, etc
__DATA__
<form ...>
<page ...>
<field ...> ... </field>
<field ...> ... </field>
<field ...> ... </field>
</page>
<page ...>
<field ...> ... </field>
<field ...> ... </field>
<field ...> ... </field>
</page>
</form>
esmith::FormMagick also provides certain convenience functions to assist
in writing FormMagick web panels.
=head1 METHODS
=head2 new()
Creates a new esmith::FormMagick object. Takes an optional hash of
arguments, including:
more_lexicons a list of additional lexicon files to use
charset the character set encoding of the lexicon files
(default is UTF-8).
Notes on lexicon files:
By default, lexicons are read in from
F</etc/e-smith/locale/*/FormMagick> (general FormMagick-internal phrases)
and F</etc/e-smith/locale/*/$scriptpath> (where $scriptpath is
something like F<etc/e-smith/web/functions/useraccounts>. NB: any symlinks
will be traced to their source). You can append
items to this list using the more_lexicons argument. Later lexfiles
override earlier ones.
For debugging purposes, $fm->{lexfiles} will tell you which files were
read in, and $fm->{original_xml} will show you the XML that was
generated by smushing those files together.
The script will also be parsed to look for the following special coments,
which are used to generate the navigation bar:
# heading : Security
# description : Remote access
# navigation : 1000 1200
Note on character set encodings:
Valid character sets are "ISO-8859-1", "US-ASCII", "UTF-8" and "UTF-16".
=begin testing
my $out = `$^X -cw $Original_File 2>&1`;
is( $?, 0, 'compiles' );
is( $out, "$Original_File syntax OK\n", 'no warnings' );
use_ok('CGI::FormMagick');
use_ok('esmith::FormMagick');
use vars qw($fm);
$ENV{ESMITH_LEXPATH} = "20e-smith-formmagick/locale";
ok(open (DATA, "20e-smith-formmagick/data.xml"), "opened data file for input");
ok(esmith::FormMagick->can('new'), "We can call new");
ok($fm = esmith::FormMagick->new(more_lexicons => [ 'test' ]), "create e::fm object");
isa_ok($fm, 'esmith::FormMagick');
is($ENV{PATH}, '/bin:/usr/bin:/usr/local/bin', 'Set $ENV{PATH}');
is($CGI::POST_MAX, 1024 * 100, "Set CGI::POST_MAX");
is($CGI::DISABLE_UPLOADS, 1, "Set CGI::DISABLE_UPLOADS");
is($<, $>, "Set real to effective UID");
is($(, $), "Set real to effective UID");
$ENV{HTTP_ACCEPT_LANGUAGE} = "fr";
$fm->parse_xml(); # suck in lexicons without displaying
is($fm->localise("YES"), "Oui", "Localisation works");
is($fm->localise("TEST"), "Essayer", "more_lexicons works");
# warning avoidance; better ways to do this gratefully accepted
my ($foo, $bar) = ($CGI::POST_MAX, $CGI::DISABLE_UPLOADS);
close DATA;
=end testing
=cut
BEGIN: {
$ENV{'PATH'} = '/usr/sbin:/usr/bin:/usr/local/bin';
$ENV{'SHELL'} = '/bin/bash';
$ENV{'HOME'} = '/root';
delete $ENV{'ENV'};
esmith::util::setRealToEffective();
}
sub new {
my $self = shift;
my $class = ref($self) || $self;
my %args = @_;
my $data;
{
local $/ = undef;
no warnings;
$data = <main::DATA>;
}
my $csrfdelay = $args{csrfdelay} || $configdb->get('httpd-admin')->prop('csrfTimeout') || '180';
$csrfdelay = ($csrfdelay =~ /\D/ )? 180 : $csrfdelay;
$csrfdelay = ( $csrfdelay > 500) ? 500 : $csrfdelay;
my $sessiondir = "/var/cache/e-smith/formmagick/sessions";
my $charset = $args{charset} || 'UTF-8';
$self = CGI::FormMagick::new($class,
type => 'string',
source => $data,
charset => $charset,
sessiondir => $sessiondir,
debug => $args{debug},
csrf => 1,
csrfdelay => $csrfdelay
);
my $fallback = "en-us";
$self->{fallback_language} = $fallback;
my @lexfiles = $self->_lexicon_filename_list(%args);
my $lextext = _read_lexicons(@lexfiles);
$self->{source} =~ s!</form>!$lextext\n</form>!;
if ($self->{debug}) {
$self->{lexfiles} = \@lexfiles;
$self->{original_xml} = $data;
}
$self->{calling_package} = (caller)[0];
$self->previousbutton(0);
$self->startoverlink(0);
$self->resetbutton(0);
$self->fallback_language($fallback);
$self->_navigation_setup(%args);
$CGI::POST_MAX=1024 * 100; # max 100K posts
$CGI::DISABLE_UPLOADS = 1; # no uploads
return $self;
}
=head2 get_languages
Override for CGI::FormMagick::get_languages to only return languages which are
installed on this server
=cut
sub get_languages
{
my $self = shift;
my @languages;
my @missing_languages;
my $lexdir = $ENV{ESMITH_LEXPATH} || "/etc/e-smith/locale";
foreach my $lang ($self->SUPER::get_languages(),$self->fallback_language())
{
if (-d "$lexdir/$lang")
{
push @languages, $lang;
next;
}
push @missing_languages, $lang;
}
warn "get_languages: " .
"Browser asked for missing languages @missing_languages\n"
if (scalar @missing_languages);
return @languages;
}
=head2 page_pre_event
This method overrides the same method in CGI::FormMagick. It adds some
functionality that is not specific to general CGI::FormMagick use,
specifically the big-red error message whenever there are errors in the page.
=cut
sub page_pre_event
{
my $self = shift;
$self->debug_msg("This is the page pre-event in esmith::FormMagick.");
if (my $pre_page_routine = $self->page->{'pre-event'}) {
$self->debug_msg("The pre-routine is $pre_page_routine");
$self->do_external_routine($pre_page_routine);
}
# If any errors occurred, draw the big error box.
if ($self->errors())
{
my $msg = $self->localise('ERROR_BELOW');
$self->{cgi}->param(-name => 'status_message',
-value => $msg);
$self->{cgi}->param(-name => 'status_type',
-value => 'error');
$self->do_external_routine('print_status_message');
}
}
=head2 _filename
Figures out the filename of the script being run, either from the
arguments or by looking at the perl special variable $0.
=for testing
is(_filename(filename => 'foo'), 'foo', "Pick up filename from args");
is(_filename(), $0, "Pick up filename from \$0");
=cut
sub _filename {
my (%args) = @_;
return exists $args{filename} ? $args{filename} : $0;
}
=head2 _scriptname_from_filename
Given a filename such as that found in $0, follows symlinks and figures
out the actual original filename. This is mostly used to turn
F</etc/e-smith/web/panels/manager/cgi-bin/whatever> into
F</etc/e-smith/web/functions/whatever>.
=for testing
# bloody hard to test anywhere other than on a server; not sure how to
# do it. -- Skud
can_ok('main', '_scriptname_from_filename');
=cut
sub _scriptname_from_filename {
my ($filename) = my ($scriptname) = @_;
while (-l $scriptname) {
$scriptname = readlink $scriptname;
}
if ( $scriptname =~ m:^\.\./\.\./\.\./functions: and
$filename =~ m:^/etc/e-smith/web/panels/manager/(cgi-bin|html):)
{
$scriptname = "/etc/e-smith/web/functions/" . basename $filename;
}
return $scriptname;
}
=head2 _lexicon_filename_list
Figures out the full filenames of all required i18n/l10n lexicons, and
returns them as a list.
=begin testing
$ENV{ESMITH_LEXPATH} = "20e-smith-formmagick/locale";
my @expected_lexfiles = qw(
20e-smith-formmagick/locale/en/FormMagick/general
20e-smith-formmagick/locale/fr/FormMagick/general
20e-smith-formmagick/locale/en/test
20e-smith-formmagick/locale/fr/test
);
my @lexfiles = _lexicon_filename_list(more_lexicons => [ 'test' ]);
is_deeply(\@expected_lexfiles, \@lexfiles, "Found the right localisation lexicons");
=end testing
=cut
sub _lexicon_filename_list {
my $self = shift;
my (%args) = @_;
my $filename = _filename(%args);
my $scriptname = _scriptname_from_filename($filename);
my $lexdir = $ENV{ESMITH_LEXPATH} || "/etc/e-smith/locale";
my ($pref_lang) = $self->get_languages();
my @lexfiles = ();
foreach my $pref_lang ($self->get_languages())
{
if (-e "$lexdir/$pref_lang/FormMagick/builtins")
{
push @lexfiles, "$lexdir/$pref_lang/FormMagick/builtins";
last;
}
}
foreach my $pref_lang ($self->get_languages())
{
if (-e "$lexdir/$pref_lang/FormMagick/general")
{
push @lexfiles, "$lexdir/$pref_lang/FormMagick/general";
last;
}
}
foreach my $pref_lang ($self->get_languages())
{
if (-e "$lexdir/$pref_lang/$scriptname")
{
push @lexfiles, "$lexdir/$pref_lang/$scriptname";
last;
}
}
foreach (@{$args{more_lexicons}}) {
push @lexfiles, "$lexdir/$pref_lang/$_";
}
return @lexfiles;
}
=head2 _read_lexicons
Given a list of lexicon filenames, reads each of them in and returns
them as a concatenated string.
=for testing
can_ok('main', '_read_lexicons');
like(_read_lexicons('20e-smith-formmagick/locale/fr/test'), qr'Essayer', "_read_lexicons");
=cut
sub _read_lexicons {
my $lextext = "";
foreach (@_) {
local $/ = undef;
unless (open (LEXIN, $_))
{
warn "Can't open lexicon file $_: $!";
next;
}
$lextext .= <LEXIN>;
}
return $lextext;
}
=head2 $fm->_navigation_setup(%args)
Sets up various properties related to the navigation menu, such as
heading/description/etc. You need to pass it the same args as were
passed to new(). It doesn't return anything.
=for testing
my $nav = esmith::FormMagick->new(filename=>"20e-smith-formmagick/navigation");
can_ok($nav, '_navigation_setup');
$nav->_navigation_setup(filename=>"20e-smith-formmagick/navigation");
is($nav->heading, 'Test heading', "Picked up navigation heading");
=cut
sub _navigation_setup {
my ($self, %args) = @_;
$self->{heading} = undef;
$self->{description} = undef;
$self->{heading_weight} = undef;
$self->{description_weight} = undef;
if (open SCRIPT, _filename(%args))
{
while ( <SCRIPT> )
{
$self->{heading} = $1 if (/^\s*#\s*heading\s*:\s*(.+?)\s*$/);
$self->{description} = $1
if (/^\s*#\s*description\s*:\s*(.+?)\s*$/);
($self->{heading_weight}, $self->{description_weight}) = ($1, $2)
if (/^\s*#\s*navigation\s*:\s*(\d+?)\s+(\d+?)\s*$/);
last if (defined $self->{heading} and
defined $self->{description} and
defined $self->{heading_weight} and
defined $self->{description_weight});
}
}
close SCRIPT;
}
=head2 $fm->get_validation_attribute
This method overrides the one in CGI::FormMagick::Validator to forcibly
add "nopipes" to the list of validations performed. Note that if the
validation string contains "permitpipes", it will be removed, and "nopipes"
will _not_ be added.
=begin testing
my $fm = esmith::FormMagick->new(filename=>"20e-smith-formmagick/nopipes");
can_ok($fm, "get_validation_attribute");
is($fm->get_validation_attribute({validation => "foo"}), "foo, nopipes", "nopipes added to existing validation");
is($fm->get_validation_attribute({validation => undef}), "nopipes", "nopipes added to empty validation");
#$fm->parse_xml();
my $badcgi = CGI->new( { testfield => '|' } );
$fm->{cgi} = $badcgi;
my $field = {
validation => '',
id => 'testfield',
label => 'Test Field',
};
isnt(grep(/PIPE/,$fm->validate_field($field)), undef, "Test a field with a pipe in it");
isnt($fm->validate_field($field), "OK", "Test a field with a pipe in it");
=end testing
=cut
sub get_validation_attribute {
my ($fm, $field) = @_;
my $vfield = $field->{validation};
if ($vfield and ($vfield =~ s/(,\s)?permitpipes//))
{
$vfield =~ s/^\s*,//;
return $vfield;
}
elsif ($vfield)
{
return "$vfield, nopipes";
}
else {
return "nopipes";
}
}
=head2 $fm->props_to_query_string()
Given a hash of properties, turns them into a CGI query string. Useful
for if you need to pre-populate a form based on data from the accounts
or config database. See the table on the first page of the C<useraccounts>
web function for an example.
=for testing
my $test = {a => "b", c => "d"};
is($fm->props_to_query_string($test), "a=b;c=d", "props_to_query_string");
=cut
sub props_to_query_string {
my ($fm, $prophash) = @_;
my $cgi = CGI->new($prophash);
return $cgi->query_string();
}
=head1 EXPORTED FUNCTIONS
The following exported functions may be used in your FormMagick scripts
and XML, for instance as page pre-events, validation routines, etc.
=head2 turn_off_buttons()
Turns off *all* buttons. Useful if you want to replace the Next/Prev
style of navigation with something else.
=for testing
my $fm = esmith::FormMagick->new();
turn_off_buttons($fm);
foreach (qw(nextbutton previousbutton finishbutton resetbutton startoverlink)) {
is($fm->$_, 0, "turn_off_buttons turns off $_");
}
=cut
sub turn_off_buttons {
my $fm = shift;
$fm->nextbutton(0);
$fm->previousbutton(0);
$fm->finishbutton(0);
$fm->resetbutton(0);
$fm->startoverlink(0);
}
=head2 print_button('STRING')
Given a string, prints a submit button with that string localised. For
instance, print_button('SAVE') will localise SAVE and put it onto the
button. This is used to replace the next/prev/etc buttons with custom
buttons.
=cut
sub print_button {
my ($fm, $word) = @_;
$word = $fm->localise($word);
print qq( </table>\n <table width=100%><tr><th class="sme-layout"><input type="submit" name="Next" value="$word"></th></tr></table>);
return undef;
}
=head2 set_status_message($message)
Sets the status message to be displayed at the top of the next page.
=for testing
my $fm = esmith::FormMagick->new();
$fm->{cgi} = CGI->new("");
can_ok('main', 'set_status_message');
set_status_message($fm, "Testing");
is($fm->{cgi}->param("status_message"), "Testing", "Set status message");
=cut
sub set_status_message {
my ($fm, $msg) = @_;
$fm->{cgi}->param(-name => 'status_message', -value => $msg);
return 1;
}
=head2 print_status_message()
Prints an status message on the first page, to give an indication of
success/failure of the previous step. Resets the status message to
blank and turns off all buttons as a side-effect.
=for testing
my $fm = esmith::FormMagick->new();
$fm->{cgi} = CGI->new("");
set_status_message($fm, "test status message");
$fm->nextbutton(1);
print_status_message($fm);
like($_STDOUT_, qr/test status message/, "Saw status message");
is($fm->{cgi}->param("status_message"), "", "Reset status message to blank after printing");
is($fm->nextbutton(), 0, "turn off buttons after status message");
=cut
sub print_status_message
{
my ($fm) = @_;
if ($fm->{cgi}->param("status_message"))
{
my $msg = qq(<h2>) . $fm->localise('OPERATION_STATUS_REPORT') .
qq(</h2>);
$msg .= $fm->localise($fm->{cgi}->param("status_message"));
my $div_class = $fm->{cgi}->param("status_type") || undef;
if (defined $div_class)
{
my $q = $fm->{cgi};
my $img_string;
if ($div_class eq "success")
{
$img_string =
qq(src="/server-common/tickmark.jpg" ALT="SUCCESS");
}
else
{
$img_string =
qq(src="/server-common/checkmark.jpg" ALT="ERROR");
}
print $q->table({-class =>"sme-borders"},
$q->Tr(
$q->td( "<img $img_string>"),
$q->td( $q->div( {-class=>$div_class}, $msg) )
));
}
else
{
print $fm->{cgi}->div($msg);
print $fm->{cgi}->hr({-class => "sectionbar"});
}
$fm->{cgi}->param(-name => "status_message" => value => "");
$fm->{cgi}->param(-name => "status_type" => value => "");
}
turn_off_buttons($fm);
}
=head2 description
Return the description entry read from the script, or "Unknown"
=for testing
my $fm = esmith::FormMagick->new(filename=>"20e-smith-formmagick/navigation");
is($fm->description, "Test description", "Read description header");
=cut
sub description
{
my ($fm) = @_;
my $desc = defined $fm->{description} ? $fm->localise($fm->{description})
: "Unknown";
$desc =~ s/^\s*//;
$desc =~ s/\s*$//;
return $desc;
}
=head2 heading
Return the heading entry read from the script, or "Unknown"
=for testing
my $fm = esmith::FormMagick->new(filename=>"20e-smith-formmagick/navigation");
is($fm->heading, "Test heading", "Read heading header");
=cut
sub heading
{
my ($fm) = @_;
my $head = defined $fm->{heading} ? $fm->localise($fm->{heading})
: "Unknown";
$head =~ s/^\s*//;
$head =~ s/\s*$//;
return $head;
}
=head2 description_weight
Return the description weight entry read from the script, or zero
=for testing
my $fm = esmith::FormMagick->new(filename=>"20e-smith-formmagick/navigation");
is($fm->description_weight, 1200, "Read description weight");
=cut
sub description_weight
{
my ($fm) = @_;
return defined $fm->{description_weight} ? $fm->{description_weight} : 0;
}
=head2 heading_weight
Return the heading weight entry read from the script, or zero
=for testing
my $fm = esmith::FormMagick->new(filename=>"20e-smith-formmagick/navigation");
is($fm->heading_weight, 1000, "Read heading weight");
=cut
sub heading_weight
{
my ($fm) = @_;
return defined $fm->{heading_weight} ? $fm->{heading_weight} : 0;
}
=head2 validate_password ($strength, $password)
Checks the supplied password for security. Strength can be "strong", "normal"
or "none". A "strong" password passes the cracklib tests. A "normal" password
passes the tests in CGI::FormMagick::Validator::Network::password, and "none"
will accept any password. An invalid argument for 'strength' is considered to
be 'normal'.
=for testing
my $fm = esmith::FormMagick->new();
isnt($fm->validate_password('strong','f00'),'OK','validate_password strong');
is($fm->validate_password('strong','f%nn*f2@'),'OK',' ..using strong password');
isnt($fm->validate_password('normal','f00'),'OK','validate_password normal');
is($fm->validate_password('normal','f%00B4r'),'OK',' ..using normal password');
is($fm->validate_password('none','f00'),'OK','validate_password none');
=cut
sub validate_password
{
my ($fm,$strength,$pass) = @_;
use Crypt::Cracklib;
my $reason;
if ($strength eq "none") {
return $fm->localise("Passwords must be at least 7 characters long") unless (length($pass) > 6);
return "OK";
}
$reason = $fm->call_fm_validation('password', $pass, undef);
return $reason unless ($reason eq "OK");
return "OK" unless ($strength eq "strong");
if ( -f '/usr/lib64/cracklib_dict.pwd' ) {
$reason = fascist_check($pass, '/usr/lib64/cracklib_dict');
} else {
$reason = fascist_check($pass, '/usr/lib/cracklib_dict');
}
$reason ||= "Software error: password check failed";
return "OK" if ($reason eq "ok");
return $fm->localise("Bad Password Choice") . ": "
. $fm->localise("The password you have chosen is not a good choice, because")
. " " . $fm->localise($reason) . ".";
}
=pod
=head2 validate_description ($description).
Checks the supplied description. Period is allowed in description
=cut
sub validate_description
{
my ($fm, $description) = @_;
if ( $description =~ /^([\-\'\w][\-\'\w\s\.]*)$/ ) {
return ('OK');
}
else {
return ("FM_ERR_UNEXPECTED_DESC");
}
}
=pod
=head2 nopipes
Validation routine to ensure there are no pipe characters in a field.
This is necessary because we don't want them to end up in the esmith configuration databases.
Note that this validation routine is automatically added to every field, so you do not have to call it explicitly.
=for testing
can_ok('main', 'nopipes');
is(nopipes(undef, 'nopipes in this string!'),'OK','nopipes in this string!');
like(nopipes(undef, 'has|pipe'),qr/NO_PIPES/,' .. no pipes allowed');
=cut
sub nopipes
{
my ($fm, $data) = @_;
if ($data =~ /\|/)
{
return "NO_PIPES_ALLOWED";
}
return "OK";
}
=pod
=head2 gen_locale_date_string
Generates a date string in the preferred format for the locale.
=for testing
can_ok('main', 'gen_locale_date_string');
=cut
sub gen_locale_date_string
{
my $self = shift;
my $i18n = esmith::I18N->new();
$i18n->setLocale('formmagick', $i18n->preferredLanguage());
return strftime "%c", localtime;
}
=head2 success
This method takes a lexicon tag as argument, optionally with a page name as
second argument (defaulting to 'First'), and sets the status message to the
lexicon tag, and sets the next page. To make use of this, the page that the
method is directing FormMagick to should have, as pre-event, the
print_status_message method.
This method simply factor's all of the results of successful operations, and
helps to ensure that all results end up in looping back to the start page.
=cut
sub success {
my $self = shift;
my $msg = shift || 'SUCCESS';
my $page = shift || 'First';
$self->debug_msg("success signalled: nextpage = $page, message = $msg");
$self->wherenext($page);
$self->{cgi}->param(-name => 'status_message',
-value => $msg);
$self->{cgi}->param(-name => 'status_type',
-value => 'success');
return undef;
}
=head2 error
This method is much like the above 'success' method, except it is intended for
display of error messages.
It is currently identical to success(), but can be altered to yield
different results, like addition of red text, or logging of the error, etc.
=cut
sub error {
my $self = shift;
my $msg = shift || 'ERROR';
my $page = shift || 'First';
$self->debug_msg("error signalled: nextpage = $page, message = $msg");
$self->wherenext($page);
$self->{cgi}->param(-name => 'status_message',
-value => $msg);
$self->{cgi}->param(-name => 'status_type',
-value => 'error');
return undef;
}
=head2 display_error
This method displays an error using the sme-error style. This should be
used when displaying a page, and the error() method is not applicable.
=cut
sub display_error
{
my $self = shift;
my $msg = shift;
my $q = $self->{cgi};
print $q->Tr($q->td({ -colspan => 2 },
$q->div({ -class => 'sme-error' },
$self->localise($msg))));
return undef;
}
=head2 display_success
This method displays a success message using the success style. This should be
used when displaying a page, and the success() method is not applicable.
=cut
sub display_success
{
my $self = shift;
my $msg = shift;
my $q = $self->{cgi};
print $q->Tr($q->td({ -colspan => 2 },
$q->div({ -class => 'success' },
$self->localise($msg))));
return undef;
}
=head1 SEE ALSO
L<CGI::FormMagick>
L<esmith::FormMagick::Tester>
L<esmith::FormMagick::LexTester>
=head1 AUTHOR
Mitel Networks Corporation
See http://www.e-smith.org/ for more information
=cut
1;

View File

@ -0,0 +1,138 @@
#!/usr/bin/perl -w
#----------------------------------------------------------------------
# Copyright 1999-2003 Mitel Networks Corporation
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
# $Id: LexTester.pm,v 1.1 2002/02/26 20:45:27 skud Exp $
#----------------------------------------------------------------------
package esmith::FormMagick::LexTester;
my $VERSION = $VERSION = "0.10";
use esmith::FormMagick;
use strict;
use Carp;
our @ISA = qw(esmith::FormMagick);
#
# TODO
#
# 2002-02-18 Skud Check for twice-translated terms
# 2002-02-18 Skud Check the option labels of select/radio fields
#
=pod
=head1 NAME
esmith::FormMagick::LexTester - test FormMagick lexicon completeness
=head1 SYNOPSIS
use esmith::FormMagick::LexTester;
my $lt = esmith::FormMagick::Lextester->new();
foreach my $lang (qw(en fr de)) {
my $ok = $lt->lextest($lang);
unless ($ok) {
my @untranslated = @{$lt->{untranslated}};
warn "Untranslated terms for $lang: @untranslated\n",
}
}
=head1 DESCRIPTION
esmith::FormMagick::LexTester is a subclass of esmith::FormMagick whose
speciality is checking the completeness of localisation lexicons.
=head2 new();
Exactly as for esmith::FormMagick
=begin testing
BEGIN: {
use lib qw(lib/ ../formmagick/lib/);
use_ok('esmith::FormMagick::LexTester');
use vars qw($lt);
}
ok(esmith::FormMagick::LexTester->can('new'), "We can call new");
ok($lt= esmith::FormMagick::LexTester->new(), "Create lt object");
isa_ok($lt, 'esmith::FormMagick::LexTester');
=end testing
=cut
sub new {
shift;
$ENV{HTTP_ACCEPT_LANGUAGE} = "test value";
my $self = esmith::FormMagick->new();
$self->{calling_package} = (caller)[0];
$self->{untranslated} = [];
bless $self;
return $self;
}
=head2 $lt->lextest($lang)
Given a two-letter language code, checks the completeness of the lexicon
for that language. Returns true on success, false on failure. If it
fails, it sets $lt->{untranslated}, which is an arrayref containing a
list of strings to be translated.
=cut
sub lextest {
my ($self, $lang) = @_;
$ENV{HTTP_ACCEPT_LANGUAGE} = $lang;
# we parse the XML a second time, even though it's wasteful... have to
# do it to reset the lexicon to the language we want now.
$self->parse_xml();
$self->localise($self->{xml}->{title});
foreach my $p (@{$self->{xml}->{pages}}) {
$self->localise($p->{title});
$self->localise($p->{description});
foreach my $f (@{$p->{fields}}) {
$self->localise($f->{label})
}
}
open 0 or die "Can't open perl script for grepping: $!";
LINE: while (my $line = <0>) {
last LINE if $line =~ /^__DATA__/;
while ($line =~ m/([A-Z_]{3,})/g) {
$self->localise($1);
}
}
close 0;
if (@{$self->{untranslated}}) {
return 0;
} else {
return 1;
}
}
sub localise {
my ($self, $string) = @_;
my $result = $self->SUPER::localise($string);
if ($string && $result eq $string) {
$self->{untranslated} = [ @{$self->{untranslated}}, $string ];
}
return $result;
}
1;

View File

@ -0,0 +1,156 @@
#!/usr/bin/perl -w
#----------------------------------------------------------------------
# Copyright 1999-2003 Mitel Networks Corporation
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
# $Id: Tester.pm,v 1.1 2002/02/26 20:45:27 skud Exp $
#----------------------------------------------------------------------
package esmith::FormMagick::Tester;
my $VERSION = $VERSION = "0.10";
use WWW::Automate;
use strict;
use Carp;
our @ISA = qw(WWW::Automate Exporter);
our @EXPORT = qw( mode );
=pod
=head1 NAME
esmith::FormMagick::Tester - test esmith FormMagick applications
=head1 SYNOPSIS
use esmith::FormMagick::Tester;
my $agent = esmith::FormMagick::Tester->new(
password => $admin_password,
host => $hostname_or_ip,
);
$agent->get_panel($panel); # eg 'useraccounts'
$agent->set_language('en');
$agent->set_language(['fr', 'en']);
=head1 DESCRIPTION
esmith::FormMagick::Tester is a subclass of WWW::Automate, which is in
turn a subclass of LWP::UserAgent. Read the documentation for
WWW::Automate to get a better idea of how to use it effectively.
=head2 new($admin_password)
Create a new agent for testing esmith FormMagick applications
(specifically, the web manager). It takes a hash of arguments, which
include:
password administrative password for the manager
(defaults to "default")
host hostname or IP to test against
(defaults to localhost)
=begin testing
BEGIN: {
use_ok('WWW::Automate');
use_ok('esmith::FormMagick::Tester');
use vars qw($agent);
}
ok(esmith::FormMagick::Tester->can('new'), "We can call new");
ok($agent = esmith::FormMagick::Tester->new(), "create agent object");
isa_ok($agent, 'esmith::FormMagick::Tester');
=end testing
=cut
sub new {
shift;
my %args = @_;
my $self = \%args;
$self->{password} ||= "default";
$self->{host} ||= "127.0.0.1";
bless $self;
return $self;
}
=head2 $agent->get_panel($panel)
Gets a panel from the web manager, calling WWW::Automate::get with a URL
built from $agent->{host} and the name of the panel you supply.
=cut
sub get_panel {
my ($self, $panel) = @_;
$self->get("http://$self->{host}/server-manager/cgi-bin/$panel");
}
=head2 $agent->set_language($lang)
Sets the language to use. This sets an the HTTP_ACCEPT_LANGUAGE header
sent by the client to the server manager. You may provide it with a
single language, eg. "en", or with a reference to a list of languages,
eg. [ qw(en de fr) ]
Sets $agent->{language} as a side effect, in case you want it for
anything later.
=begin testing
$agent->set_language("en");
is($WWW::Automate::headers{"Accept-Language"}, "en", "Set lang header in hash");
$agent->get("http://google.com");
is($agent->{req}->header("Accept-Language"), "en", "Set language header");
=end testing
=cut
sub set_language {
my ($self, $language) = @_;
$self->{language} = $language;
$self->add_header("Accept-Language" => $language);
}
=head2 mode($script)
This convenience function is exported for use in testing scripts. For
instance:
use esmith::FormMagick::Tester;
is(mode('useraccounts', 4755, "Setuid and executable");
=cut
sub mode {
return sprintf("%04o", (stat($_[0]))[2] & 07777);
}
=head1 INTERNAL METHODS
The following methods are used internally by this module.
=head2 get_basic_credentials()
Returns the administrative login/password for the esmith manager.
=cut
sub get_basic_credentials {
my $self = shift;
return ("admin", $self->{password});
}
1;