From 7f69b48ba3843830043dd761996ad9e2d5fd9f1e Mon Sep 17 00:00:00 2001 From: Rene Krenn Date: Thu, 16 Apr 2015 19:58:04 +0200 Subject: [PATCH] MT#12565 align any form handler 'description' attr the 'required' option of form handlers with a "has_field 'description'" is checked and altered, so it matches the NOT NULL column modifier of the corresponding table column. Change-Id: Iad07495b69a7f52c4c8a94e959b7c9d5c9f5f3e5 --- lib/NGCP/Panel/Form/NCOS/Pattern.pm | 1 + lib/NGCP/Panel/Form/NCOS/ResellerLevel.pm | 1 + lib/NGCP/Panel/Form/NCOS/ResellerLevelAPI.pm | 1 + lib/NGCP/Panel/Form/PeeringGroup.pm | 1 + lib/NGCP/Panel/Form/Sound/CustomerSet.pm | 1 + lib/NGCP/Panel/Form/SubscriberProfile/Profile.pm | 3 ++- lib/NGCP/Panel/Form/SubscriberProfile/ProfileClone.pm | 3 ++- lib/NGCP/Panel/Form/SubscriberProfile/SetCloneReseller.pm | 3 ++- lib/NGCP/Panel/Form/SubscriberProfile/SetReseller.pm | 3 ++- 9 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/NGCP/Panel/Form/NCOS/Pattern.pm b/lib/NGCP/Panel/Form/NCOS/Pattern.pm index 653a90ca8d..f4afe75320 100644 --- a/lib/NGCP/Panel/Form/NCOS/Pattern.pm +++ b/lib/NGCP/Panel/Form/NCOS/Pattern.pm @@ -18,6 +18,7 @@ has_field 'pattern' => ( has_field 'description' => ( type => 'Text', + required => 0, ); has_field 'save' => ( diff --git a/lib/NGCP/Panel/Form/NCOS/ResellerLevel.pm b/lib/NGCP/Panel/Form/NCOS/ResellerLevel.pm index 49a39744c1..22b0642fb7 100644 --- a/lib/NGCP/Panel/Form/NCOS/ResellerLevel.pm +++ b/lib/NGCP/Panel/Form/NCOS/ResellerLevel.pm @@ -27,6 +27,7 @@ has_field 'mode' => ( has_field 'description' => ( type => 'Text', + required => 0, ); has_field 'save' => ( diff --git a/lib/NGCP/Panel/Form/NCOS/ResellerLevelAPI.pm b/lib/NGCP/Panel/Form/NCOS/ResellerLevelAPI.pm index 4171141174..52bd351a56 100644 --- a/lib/NGCP/Panel/Form/NCOS/ResellerLevelAPI.pm +++ b/lib/NGCP/Panel/Form/NCOS/ResellerLevelAPI.pm @@ -36,6 +36,7 @@ has_field 'mode' => ( has_field 'description' => ( type => 'Text', + required => 0, element_attr => { rel => ['tooltip'], title => ['The description of the level'] diff --git a/lib/NGCP/Panel/Form/PeeringGroup.pm b/lib/NGCP/Panel/Form/PeeringGroup.pm index 6ea14def50..80fc4c9737 100644 --- a/lib/NGCP/Panel/Form/PeeringGroup.pm +++ b/lib/NGCP/Panel/Form/PeeringGroup.pm @@ -36,6 +36,7 @@ has_field 'priority' => ( has_field 'description' => ( type => 'Text', + #not mandatory at the moment ); has_field 'save' => ( diff --git a/lib/NGCP/Panel/Form/Sound/CustomerSet.pm b/lib/NGCP/Panel/Form/Sound/CustomerSet.pm index 3991afaf86..7a3bcf955d 100644 --- a/lib/NGCP/Panel/Form/Sound/CustomerSet.pm +++ b/lib/NGCP/Panel/Form/Sound/CustomerSet.pm @@ -19,6 +19,7 @@ has_field 'name' => ( has_field 'description' => ( type => 'Text', + #not mandatory at the moment ); has_field 'contract_default' => ( diff --git a/lib/NGCP/Panel/Form/SubscriberProfile/Profile.pm b/lib/NGCP/Panel/Form/SubscriberProfile/Profile.pm index d62d839c49..36ff31de38 100644 --- a/lib/NGCP/Panel/Form/SubscriberProfile/Profile.pm +++ b/lib/NGCP/Panel/Form/SubscriberProfile/Profile.pm @@ -22,7 +22,8 @@ has_field 'name' => ( has_field 'description' => ( type => 'Text', - required => 0, + required => 1, + #not_nullable => 1, in the future? element_attr => { rel => ['tooltip'], title => ['Arbitrary text.'], diff --git a/lib/NGCP/Panel/Form/SubscriberProfile/ProfileClone.pm b/lib/NGCP/Panel/Form/SubscriberProfile/ProfileClone.pm index 381f6ab4bb..9d99f871ed 100644 --- a/lib/NGCP/Panel/Form/SubscriberProfile/ProfileClone.pm +++ b/lib/NGCP/Panel/Form/SubscriberProfile/ProfileClone.pm @@ -19,7 +19,8 @@ has_field 'name' => ( has_field 'description' => ( type => 'Text', - required => 0, + required => 1, + #not_nullable => 1, in the future? label => 'New Description', ); diff --git a/lib/NGCP/Panel/Form/SubscriberProfile/SetCloneReseller.pm b/lib/NGCP/Panel/Form/SubscriberProfile/SetCloneReseller.pm index 4472dbac31..7bd957a9da 100644 --- a/lib/NGCP/Panel/Form/SubscriberProfile/SetCloneReseller.pm +++ b/lib/NGCP/Panel/Form/SubscriberProfile/SetCloneReseller.pm @@ -19,7 +19,8 @@ has_field 'name' => ( has_field 'description' => ( type => 'Text', - required => 0, + required => 1, + #not_nullable => 1, in the future? label => 'New Description', ); diff --git a/lib/NGCP/Panel/Form/SubscriberProfile/SetReseller.pm b/lib/NGCP/Panel/Form/SubscriberProfile/SetReseller.pm index c3c78f446c..22ba093e6f 100644 --- a/lib/NGCP/Panel/Form/SubscriberProfile/SetReseller.pm +++ b/lib/NGCP/Panel/Form/SubscriberProfile/SetReseller.pm @@ -22,7 +22,8 @@ has_field 'name' => ( has_field 'description' => ( type => 'Text', - required => 0, + required => 1, + #not_nullable => 1, in the future? element_attr => { rel => ['tooltip'], title => ['Arbitrary text.'],