| 1 | # -*- coding: utf-8 -*- |
|---|
| 2 | |
|---|
| 3 | from django import forms |
|---|
| 4 | from django.utils.translation import gettext_lazy as _ |
|---|
| 5 | |
|---|
| 6 | #_____________________________________________________________________________ |
|---|
| 7 | # meta information |
|---|
| 8 | |
|---|
| 9 | __author__ = "Jens Diemer" |
|---|
| 10 | __url__ = "http://www.PyLucid.org" |
|---|
| 11 | __description__ = "Find & replace content in all pages/templates/shylesheets." |
|---|
| 12 | __long_description__ = """ |
|---|
| 13 | A simple find & replace plugin for all pages/templates/shylesheets content. |
|---|
| 14 | You can easy change e.g. a URL in every page content or correct a misspelled |
|---|
| 15 | word everywhere. Also useable to change CSS colors everywhere. |
|---|
| 16 | |
|---|
| 17 | Note: This plugin can only administrator used! You find the plugin in the |
|---|
| 18 | submenu. |
|---|
| 19 | """ |
|---|
| 20 | |
|---|
| 21 | #_____________________________________________________________________________ |
|---|
| 22 | # preferences |
|---|
| 23 | |
|---|
| 24 | class PreferencesForm(forms.Form): |
|---|
| 25 | min_term_len = forms.IntegerField( |
|---|
| 26 | help_text=_("Min length of a search term"), |
|---|
| 27 | initial=2, min_value=1 |
|---|
| 28 | ) |
|---|
| 29 | max_term_len = forms.IntegerField( |
|---|
| 30 | help_text=_("Max length of a search term"), |
|---|
| 31 | initial=150, min_value=1, max_value=500 |
|---|
| 32 | ) |
|---|
| 33 | |
|---|
| 34 | #_____________________________________________________________________________ |
|---|
| 35 | # plugin administration data |
|---|
| 36 | |
|---|
| 37 | plugin_manager_data = { |
|---|
| 38 | "find_and_replace" : { |
|---|
| 39 | "must_login" : True, |
|---|
| 40 | "must_admin" : True, |
|---|
| 41 | "admin_sub_menu": { |
|---|
| 42 | "section" : _("page admin"), |
|---|
| 43 | "title" : _("find/replace"), |
|---|
| 44 | "help_text" : _( |
|---|
| 45 | "Find and replace strings in page/stylesheets/template content." |
|---|
| 46 | ), |
|---|
| 47 | "open_in_window": False, |
|---|
| 48 | "weight" : 5, |
|---|
| 49 | }, |
|---|
| 50 | }, |
|---|
| 51 | } |
|---|