Skip to content

Commit

Permalink
Дефолтные значения в дополнительных полях для типов - число, дробь, с…
Browse files Browse the repository at this point in the history
…трока, чекбокс #40
  • Loading branch information
mzhelskiy committed Oct 27, 2014
1 parent f649862 commit 9591f56
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 12 deletions.
11 changes: 3 additions & 8 deletions classes/actions/ActionAdmin.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,13 +459,9 @@ protected function RegisterEvent()
*
*/
/*
* Проверка и восстановление
* Оптимизации
*/
$this->AddEventPreg('#^utils$#iu', '#^check_n_repair$#iu', 'Utils::EventCheckAndRepair');
/*
* Сброс и очистка
*/
$this->AddEventPreg('#^utils$#iu', '#^reset_n_clear$#iu', 'Utils::EventResetAndClear');
$this->AddEventPreg('#^utils$#iu', '#^optimization$#iu', 'Utils::EventOptimization');

This comment has been minimized.

Copy link
@psnet

psnet Oct 28, 2014

Contributor

для чего? код же не переписан

This comment has been minimized.

Copy link
@mzhelskiy

mzhelskiy Oct 29, 2014

Author Contributor

по ошибке файл попал не в тот коммит

/*
* Планировщик cron
*/
Expand Down Expand Up @@ -545,8 +541,7 @@ private function InitMenu()
->AddSection(
Engine::GetEntity('PluginAdmin_Ui_MenuSection')->SetCaption('Утилиты')->SetName('utils')->SetUrl('utils')
->AddItem(Engine::GetEntity('PluginAdmin_Ui_MenuItem')->SetCaption('Планировщик Cron')->SetUrl('cron'))
->AddItem(Engine::GetEntity('PluginAdmin_Ui_MenuItem')->SetCaption('Проверка и восстановление')->SetUrl('check_n_repair'))
->AddItem(Engine::GetEntity('PluginAdmin_Ui_MenuItem')->SetCaption('Сброс и очистка')->SetUrl('reset_n_clear'))
->AddItem(Engine::GetEntity('PluginAdmin_Ui_MenuItem')->SetCaption('Оптимизация')->SetUrl('optimization'))
) // /AddSection
;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<h3 class="page-sub-header mt-30">Дополнительные параметры</h3>

{include file="{$aTemplatePathPlugin.admin}forms/fields/form.field.text.tpl"
sFieldName = 'param[default_value]'
sFieldClasses = 'width-150'
sFieldValue = $oPropertyParams.default_value
sFieldLabel = 'Значение атрибута value'}

{include file="{$aTemplatePathPlugin.admin}forms/fields/form.field.checkbox.tpl"
sFieldName = 'param[default]'
bFieldChecked = $oPropertyParams.default
sFieldLabel = 'Дефолтное значение'}
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<h3 class="page-sub-header mt-30">Дополнительные параметры</h3>

{include file="{$aTemplatePathPlugin.admin}forms/fields/form.field.text.tpl"
sFieldName = 'param[default]'
sFieldClasses = 'width-150'
sFieldValue = $oPropertyParams.default
sFieldLabel = 'Дефолтное значение'}


<h3 class="page-sub-header mt-30">Правила валидации</h3>

{include file="{$aTemplatePathPlugin.admin}forms/fields/form.field.checkbox.tpl"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<h3 class="page-sub-header mt-30">Дополнительные параметры</h3>

{include file="{$aTemplatePathPlugin.admin}forms/fields/form.field.text.tpl"
sFieldName = 'param[default]'
sFieldClasses = 'width-150'
sFieldValue = $oPropertyParams.default
sFieldLabel = 'Дефолтное значение'}


<h3 class="page-sub-header mt-30">Правила валидации</h3>

{include file="{$aTemplatePathPlugin.admin}forms/fields/form.field.checkbox.tpl"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<h3 class="page-sub-header mt-30">Дополнительные параметры</h3>

{include file="{$aTemplatePathPlugin.admin}forms/fields/form.field.text.tpl"
sFieldName = 'param[default]'
sFieldClasses = 'width-150'
sFieldValue = $oPropertyParams.default
sFieldLabel = 'Дефолтное значение'}

<h3 class="page-sub-header mt-30">Правила валидации</h3>

{include file="{$aTemplatePathPlugin.admin}forms/fields/form.field.checkbox.tpl"
Expand Down
3 changes: 2 additions & 1 deletion templates/skin/default/property/form.field.checkbox.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

{include file="{$aTemplatePathPlugin.admin}forms/fields/form.field.checkbox.tpl"
sFieldName = "property[{$oProperty->getId()}]"
bFieldChecked = $oValue->getValueInt()
sFieldValue = $oProperty->getParam('default_value')
bFieldChecked = $oValue->getValueForForm()
sFieldNote = $oProperty->getDescription()
sFieldLabel = $oProperty->getTitle()}
2 changes: 1 addition & 1 deletion templates/skin/default/property/form.field.float.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{include file="{$aTemplatePathPlugin.admin}forms/fields/form.field.text.tpl"
sFieldName = "property[{$oProperty->getId()}]"
sFieldValue = $oValue->getValueFloat()
sFieldValue = $oValue->getValueForForm()
sFieldClasses = 'width-150'
sFieldNote = $oProperty->getDescription()
sFieldLabel = $oProperty->getTitle()}
2 changes: 1 addition & 1 deletion templates/skin/default/property/form.field.int.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{include file="{$aTemplatePathPlugin.admin}forms/fields/form.field.text.tpl"
sFieldName = "property[{$oProperty->getId()}]"
sFieldValue = $oValue->getValueInt()
sFieldValue = $oValue->getValueForForm()
sFieldClasses = 'width-150'
sFieldNote = $oProperty->getDescription()
sFieldLabel = $oProperty->getTitle()}
2 changes: 1 addition & 1 deletion templates/skin/default/property/form.field.varchar.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

{include file="{$aTemplatePathPlugin.admin}forms/fields/form.field.text.tpl"
sFieldName = "property[{$oProperty->getId()}]"
sFieldValue = $oValue->getValueVarchar()
sFieldValue = $oValue->getValueForForm()
sFieldNote = $oProperty->getDescription()
sFieldLabel = $oProperty->getTitle()}

0 comments on commit 9591f56

Please sign in to comment.