chg: [decaying:edit] Notice if editing a default model

pull/5032/head
mokaddem 2019-08-16 11:59:12 +02:00
parent bfbba4e33b
commit e421c0684e
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
2 changed files with 3 additions and 2 deletions

View File

@ -1206,7 +1206,7 @@ class AppModel extends Model
`all_orgs` tinyint(1) NOT NULL DEFAULT 1,
`ref` text COLLATE utf8_unicode_ci,
`formula` varchar(255) COLLATE utf8_bin NOT NULL,
`version` varchar(255) COLLATE utf8_bin NOT NULL
`version` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT ''
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;";
$sqlArray[] = "CREATE TABLE IF NOT EXISTS decaying_model_mappings (

View File

@ -3,7 +3,8 @@
<fieldset>
<legend><?php echo Inflector::humanize($action) . __(' Decaying Model');?></legend>
<?php
if ($restrictEdition) {
if (isset($restrictEdition) && $restrictEdition) {
echo '<div class="alert alert-warning">' . __('You are editing a Default Model, only restricted edition is allowed.') . '</div>';
echo $this->Form->input('all_orgs', array(
'label' => __('Can other organization use this model'),
'type' => 'checkbox'