-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
537 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# (MODX)EvolutionCMS.plugins.ManagerManager.mm_requireFields changelog | ||
|
||
|
||
## Version 1.2.6 (2023-04-27) | ||
* \* Attention! PHP >= 5.4 is required. | ||
* \* Attention! (MODX)EvolutionCMS.plugins.ManagerManager >= 0.7 is required. | ||
* \* Refactoring, the widget now uses “named” parameters, see README → Examples (with backward compatibility). | ||
* \* Refactoring, compatibility with PHP >= 7.4. | ||
* \+ README, README_ru. | ||
* \+ CHANGELOG, CHANGELOG_ru. | ||
* \+ Composer.json. | ||
|
||
|
||
## Version 1.2.5 (2014-02-13) | ||
* \+ Support for the `alias_visible` field has been added (for MODX > 1.0.11). | ||
|
||
|
||
## Version 1.2.4 (2013-10-18) | ||
* \* Support for `email` type of TVs has been added. | ||
|
||
|
||
## Version 1.2.3 (2013-07-14) | ||
* \* The check for definition of the TinyMCE variable was replaced by typeof(tinyMCE). | ||
|
||
|
||
## Version 1.2.2 (2013-05-28) | ||
* \* The problem with TinyMCE (it used to prevent documents save) has been solved. | ||
|
||
|
||
## Version 1.2.1 (2013-05-16) | ||
* \* The content field asterisk bug fix. | ||
|
||
|
||
## Version 1.2 (2013-02-11) | ||
* \* The tv using check in the current template was added. The document saving error is now not shown when a tv was not added to the document. | ||
|
||
|
||
## Version 1.1 (2012-11-13) | ||
* \* Minor code changes. | ||
|
||
|
||
## Version 1.0 (2011) | ||
* \+ The first release. | ||
|
||
|
||
<link rel="stylesheet" type="text/css" href="https://raw.githack.com/DivanDesign/CSS.ddMarkdown/master/style.min.css" /> | ||
<style>ul{list-style:none;}</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# (MODX)EvolutionCMS.plugins.ManagerManager.mm_requireFields changelog | ||
|
||
|
||
## Версия 1.2.6 (2023-04-27) | ||
* \* Внимание! Требуется PHP >= 5.4 is required. | ||
* \* Внимание! Требуется (MODX)EvolutionCMS.plugins.ManagerManager >= 0.7. | ||
* \* Параметры: Виджет теперь использует «именованные» параметры, см. README → Примеры (обратная совместимость сохранена). | ||
* \* Рефакторинг, совместимость с PHP >= 7.4. | ||
* \+ README, README_ru. | ||
* \+ CHANGELOG, CHANGELOG_ru. | ||
* \+ Composer.json. | ||
|
||
|
||
## Версия 1.2.5 (2014-02-13) | ||
* \+ Добавлена поддержка поля `alias_visible` (для MODX > 1.0.11). | ||
|
||
|
||
## Версия 1.2.4 (2013-10-18) | ||
* \* Добавлена поддержка TV типа `email`. | ||
|
||
|
||
## Версия 1.2.3 (2013-07-14) | ||
* \* Проверка на существование переменной TinyMCE переделана на typeof(tinyMCE). | ||
|
||
|
||
## Версия 1.2.2 (2013-05-28) | ||
* \* Исправлена проблема с TinyMCE (раньше лишний раз ругался, что поле не заполнено). | ||
|
||
|
||
## Версия 1.2.1 (2013-05-16) | ||
* \* Добавлена обработка поля content (звёздочка теперь добавляется и название в сообщении об ошибке выводится). | ||
|
||
|
||
## Версия 1.2 (2013-02-11) | ||
* \* Добавлена проверка использования tv в текущем шаблоне. Теперь наконец-то он не будет ругаться, если этой tv здесь в принципе не существует. | ||
|
||
|
||
## Версия 1.1 (2012-11-13) | ||
* \* Незначительные изменения кода. | ||
|
||
|
||
## Версия 1.0 (2011) | ||
* \+ Первый релиз. | ||
|
||
|
||
<link rel="stylesheet" type="text/css" href="https://raw.githack.com/DivanDesign/CSS.ddMarkdown/master/style.min.css" /> | ||
<style>ul{list-style:none;}</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,96 @@ | ||
# mm_requireFields | ||
# (MODX)EvolutionCMS.plugins.ManagerManager.mm_requireFields | ||
|
||
Visit the following [link](http://code.divandesign.biz/modx/mm_requirefields) to read the documentation, instructions & changelog. | ||
A widget for ManagerManager plugin that allows document fields (or TVs) to become required. | ||
The widget appends a red asterisk to a field to indicate it is required, and alerts users if they save the document without completing all required fields. | ||
|
||
|
||
## Requires | ||
|
||
* PHP >= 5.4 | ||
* [(MODX)EvolutionCMS.plugins.ManagerManager](https://code.divandesign.ru/modx/managermanager) >= 0.7 | ||
|
||
|
||
## Installation | ||
|
||
To install you must unzip the archive to `/assets/plungins/managermanager/widgets/mm_requirefields/`. | ||
|
||
|
||
You may also read this documentation: | ||
* [(MODX)EvolutionCMS.plugins.ManagerManager](https://code.divandesign.ru/modx/managermanager). | ||
* [(MODX)EvolutionCMS.modules.ddMMEditor](https://code.divandesign.ru/modx/ddmmeditor). | ||
|
||
|
||
## Parameters description | ||
|
||
* `$params` | ||
* Desctription: Parameters, the pass-by-name style is used. | ||
* Valid values: | ||
* `stdClass` | ||
* `arrayAssociative` | ||
* **Required** | ||
|
||
* `$params->fields` | ||
* Desctription: The name(s) of the document fields (or TVs) that are required. | ||
* Valid values: | ||
* `stringCommaSeparated` | ||
* `array` | ||
* **Required** | ||
|
||
* `$params->fields[$i]` | ||
* Desctription: The name of the document field or TV. | ||
* Valid values: `string` | ||
* **Required** | ||
|
||
* `$params->roles` | ||
* Desctription: The CMS user roles that the widget is applied to. | ||
* Valid values: | ||
* `array` | ||
* `stringCommaSeparated` | ||
* `''` — when this parameter is empty then widget is applied to the all roles | ||
* Default value: `''` | ||
|
||
* `$params->roles[$i]` | ||
* Desctription: CMS user role ID. | ||
* Valid values: `integer` | ||
* **Required** | ||
|
||
* `$params->templates` | ||
* Desctription: Document templates IDs for which the widget is applied to. | ||
* Valid values: | ||
* `array` | ||
* `stringCommaSeparated` | ||
* `''` — empty value means the widget is applying to all templates | ||
* Default value: `''` | ||
|
||
* `$params->templates[$i]` | ||
* Desctription: Template ID. | ||
* Valid values: `integer` | ||
* **Required** | ||
|
||
|
||
## CMS events | ||
|
||
* `OnDocFormRender` | ||
|
||
|
||
## Examples | ||
|
||
|
||
### Make the page title and publication date fields required for all docs and users | ||
|
||
```php | ||
mm_requireFields([ | ||
'fields' => 'pagetitle,pub_date' | ||
]); | ||
``` | ||
|
||
|
||
## Links | ||
|
||
* [Home page](https://code.divandesign.ru/modx/mm_requirefields) | ||
* [Telegram chat](https://t.me/dd_code) | ||
* [Packagist](https://packagist.org/packages/dd/evolutioncms-plugins-managermanager-mm_requirefields) | ||
* [GitHub](https://github.com/DivanDesign/EvolutionCMS.plugins.ManagerManager.mm_requireFields) | ||
|
||
|
||
<link rel="stylesheet" type="text/css" href="https://raw.githack.com/DivanDesign/CSS.ddMarkdown/master/style.min.css" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# (MODX)EvolutionCMS.plugins.ManagerManager.mm_requireFields | ||
|
||
<p>Виджет для плагина ManagerManager, позволяющий сделать поля документа или TV обязательными для заполнения. | ||
Добавляет звёздочку красного цвета рядом с именем обязательного для заполнения поля, выдаёт сообщение при попытке сохранить не заполнив обязательные поля, предотвращая сохранение. | ||
|
||
|
||
## Использует | ||
|
||
* PHP >= 5.4 | ||
* [(MODX)EvolutionCMS.plugins.ManagerManager](https://code.divandesign.ru/modx/managermanager) >= 0.7 | ||
|
||
|
||
## Установка | ||
|
||
Для установки распакуйте архив в `/assets/plungins/managermanager/widgets/mm_requirefields/`. | ||
|
||
|
||
Смотрите также документацию: | ||
* [(MODX)EvolutionCMS.plugins.ManagerManager](https://code.divandesign.ru/modx/managermanager). | ||
* [(MODX)EvolutionCMS.modules.ddMMEditor](https://code.divandesign.ru/modx/ddmmeditor). | ||
|
||
|
||
## Описание параметров | ||
|
||
* `$params` | ||
* Описание: Параметры, используется стиль именованных параметров. | ||
* Допустимые значения: | ||
* `stdClass` | ||
* `arrayAssociative` | ||
* **Обязателен** | ||
|
||
* `$params->fields` | ||
* Описание: Поля документа (или TV), которые должны быть обязательными. | ||
* Допустимые значения: | ||
* `stringCommaSeparated` | ||
* `array` | ||
* **Обязателен** | ||
|
||
* `$params->fields[$i]` | ||
* Описание: Название поля документа или TV. | ||
* Допустимые значения: `string` | ||
* **Обязателен** | ||
|
||
* `$params->roles` | ||
* Описание: Роли пользователей CMS, для которых необходимо применить виждет. | ||
* Допустимые значения: | ||
* `array` | ||
* `stringCommaSeparated` | ||
* `''` — применяется для всех ролей при пустом значении | ||
* Значение по умолчанию: `''` | ||
|
||
* `$params->roles[$i]` | ||
* Описание: Роль пользователя CMS. | ||
* Допустимые значения: `integer` | ||
* **Обязателен** | ||
|
||
* `$params->templates` | ||
* Описание: ID шаблонов документов, для которых необходимо применить виджет. | ||
* Допустимые значения: | ||
* `array` | ||
* `stringCommaSeparated` | ||
* `''` — применяется для всех шаблонов при пустом значении | ||
* Значение по умолчанию: `''` | ||
|
||
* `$params->templates[$i]` | ||
* Описание: ID шаблона документа. | ||
* Допустимые значения: `integer` | ||
* **Обязателен** | ||
|
||
|
||
## События CMS | ||
|
||
* `OnDocFormRender` | ||
|
||
|
||
## Примеры | ||
|
||
|
||
### Сделать обязательным для заполнения заголовки и даты публикации всех документов и пользователей | ||
|
||
```php | ||
mm_requireFields([ | ||
'fields' => 'pagetitle,pub_date' | ||
]); | ||
``` | ||
|
||
|
||
## Ссылки | ||
|
||
* [Home page](https://code.divandesign.ru/modx/mm_requirefields) | ||
* [Telegram chat](https://t.me/dd_code) | ||
* [Packagist](https://packagist.org/packages/dd/evolutioncms-plugins-managermanager-mm_requirefields) | ||
* [GitHub](https://github.com/DivanDesign/EvolutionCMS.plugins.ManagerManager.mm_requireFields) | ||
|
||
|
||
<link rel="stylesheet" type="text/css" href="https://raw.githack.com/DivanDesign/CSS.ddMarkdown/master/style.min.css" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"name": "dd/evolutioncms-plugins-managermanager-mm_requirefields", | ||
"version": "1.2.6", | ||
"description": "A widget for ManagerManager plugin that allows document fields (or TVs) to become required.", | ||
"keywords": [ | ||
"modx", | ||
"modx evo", | ||
"modx evolution", | ||
"evo", | ||
"evo cms", | ||
"evolutioncms", | ||
"evolution cms", | ||
"dd group", | ||
"dd studio", | ||
"divandesign", | ||
"managermanager", | ||
"mm", | ||
"mm widget", | ||
"mm_requirefields", | ||
"require document field", | ||
"require tv" | ||
], | ||
"homepage": "https://code.divandesign.ru/modx/mm_requirefields", | ||
"support": { | ||
"chat": "https://t.me/dd_code" | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "Ilyas Ronef", | ||
"email": "[email protected]", | ||
"homepage": "https://ronef.ru", | ||
"role": "Owner" | ||
}, | ||
{ | ||
"name": "ncrossland", | ||
"role": "Developer" | ||
}, | ||
{ | ||
"name": "Jelle Jager AKA TobyL", | ||
"role": "Creator" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.4.0", | ||
"dd/evolutioncms-plugins-managermanager": ">=0.7.0" | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.