From: hickert Date: Fri, 25 Sep 2009 09:52:35 +0000 (+0000) Subject: Updated license edit X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f2375aaac2c457e7e0a98f65d4bf29eb567ea918;p=gosa.git Updated license edit git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14347 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseGeneric.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseGeneric.inc index 0443d7f38..d1048ac17 100644 --- a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseGeneric.inc +++ b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseGeneric.inc @@ -163,6 +163,29 @@ class licenseGeneric extends plugin function check() { $message = plugin::check(); + + // Very simple date input checks + if(!empty($this->expirationDate) && + !preg_match("/^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$/",$this->expirationDate)){ + $message[] = msgPool::invalid(_("Expiration date"),$this->expirationDate,"","2009-02-23"); + } + if(!empty($this->conclusionDate) && + !preg_match("/^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$/",$this->conclusionDate)){ + $message[] = msgPool::invalid(_("Expiration date"),$this->conclusionDate,"","2009-02-23"); + } + if(!empty($this->notificationDate) && + !preg_match("/^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$/",$this->notificationDate)){ + $message[] = msgPool::invalid(_("Expiration date"),$this->notificationDate,"","2009-02-23"); + } + + if(empty($this->cn)){ + $message[] = msgPool::required(_("Name")); + } + + if(empty($this->licenseKey)){ + $message[] = msgPool::required(_("License key")); + } + return($message); } diff --git a/gosa-plugins/opsi/admin/opsiLicenses/licenseGeneric.tpl b/gosa-plugins/opsi/admin/opsiLicenses/licenseGeneric.tpl index c375d2b24..242365b3d 100644 --- a/gosa-plugins/opsi/admin/opsiLicenses/licenseGeneric.tpl +++ b/gosa-plugins/opsi/admin/opsiLicenses/licenseGeneric.tpl @@ -16,7 +16,7 @@ @@ -128,12 +128,13 @@
- {t}Name{/t} + {t}Name{/t}{$must} {if $initially_was_account} @@ -108,7 +108,7 @@ {t}Model{/t} - {html_options options=$licenseModels values=$licenseModels selected=$licenseModel}
+ {if $licenseModel == "VOLUME"} + {/if} + {if $licenseModel == "OEM"} + {/if}
- {t}License key{/t} + {t}License key{/t}{$must}
{t}Maximum installations{/t} @@ -142,6 +143,8 @@
{t}Reserved for Host{/t} @@ -153,6 +156,7 @@
@@ -161,7 +165,7 @@
- {t}Assigned to Host{/t}
+ {t}Used by Host{/t}