Basic form validation for create/edit outage. Checks if starttime is in past, stoptime is after starttime, warningduration is not zero and title size. Issue #7.

This commit is contained in:
Daniel Thee Roperto
2016-09-05 15:01:22 +10:00
parent 6055f52d64
commit 98de8a6c69
6 changed files with 51 additions and 24 deletions

View File

@@ -10,7 +10,7 @@
<FIELD NAME="starttime" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="When outage starts."/>
<FIELD NAME="stoptime" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="When outage ends."/>
<FIELD NAME="warningduration" TYPE="int" LENGTH="7" NOTNULL="true" SEQUENCE="false" COMMENT="How many seconds before the outage to display a warning to all users."/>
<FIELD NAME="title" TYPE="char" LENGTH="20" NOTNULL="true" SEQUENCE="false" COMMENT="Title for the outage (short description)."/>
<FIELD NAME="title" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" COMMENT="Title for the outage (short description)."/>
<FIELD NAME="description" TYPE="text" NOTNULL="true" SEQUENCE="false" COMMENT="More information about the outage."/>
<FIELD NAME="createdby" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="Who created this entry."/>
<FIELD NAME="modifiedby" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="Who last modified this entry."/>