]> err.no Git - scalable-opengroupware.org/commitdiff
validate that apt has a title
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Tue, 19 Jul 2005 07:56:26 +0000 (07:56 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Tue, 19 Jul 2005 07:56:26 +0000 (07:56 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@814 d1b88da0-ebda-0310-925b-ed51d893ca5b

SOGo/SoObjects/SOGo/SOGoAppointment.m
SOGo/UI/Contacts/English.lproj/Localizable.strings
SOGo/UI/Scheduler/English.lproj/Localizable.strings
SOGo/UI/Templates/ChangeLog
SOGo/UI/Templates/UIxAppointmentEditor.wox

index ca48a32c2856c1b6b74663bcea1e57e3f8f0ef07..63710860aa1416e33c2930efe187299a7dbb9bb6 100644 (file)
@@ -55,7 +55,7 @@ static NGLogger                  *logger = nil;
   sax = [[SaxObjectDecoder alloc] initWithMappingNamed:@"NGiCal"];
   if (sax == nil)
     [logger fatalWithFormat:@"could not create the iCal SAX handler!"];
-
+  
   [parser setContentHandler:sax];
   [parser setErrorHandler:sax];
 }
index bfe7e055ed690425e295afffe24388cd8edcd32d..0ececb30907337ed13a8b07c0df44e4b8292a806 100644 (file)
@@ -37,4 +37,4 @@
 
 /* error */
 
-"invalidemailwarn"  = "Invalid E-Mail Field, Continue?";
+"invalidemailwarn"  = "Invalid email field, continue?";
index e37251544b7502aa83925b4ecb241f5ca1da04b1..1db9cf391a23a497389fa3207597fda7a2cc4efc 100644 (file)
 "MEETING"              = "Meeting";
 "HOLIDAY"              = "Holiday";
 "PHONE CALL"           = "Phone";
+
+/* validation errors */
+
+validate_notitle = "No title is set, continue?";
index 602c63c6e56afc08dcec04409a453abd98d269c1..397ed582db79837546832bfd2659f1da68a95b6c 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-19  Helge Hess  <helge.hess@opengroupware.org>
+
+       * UIxAppointmentEditor.wox: check whether title is set and raise a
+         confirm panel if not
+
 2005-07-18  Helge Hess  <helge.hess@opengroupware.org>
 
        * ContactsUI/UIxContactEditor.wox: validate email field prior form
index ee4d18b3bab91144aa837e7040acd94c2b8268cf..a3ce8becda0d54ca1ce5b383a82438804853cd91 100644 (file)
@@ -1,16 +1,31 @@
 <?xml version='1.0' standalone='yes'?>
-<var:component xmlns="http://www.w3.org/1999/xhtml"
-               xmlns:var="http://www.skyrix.com/od/binding"
-               xmlns:const="http://www.skyrix.com/od/constant"
-               xmlns:uix="OGo:uix"
-               xmlns:label="OGo:label"
-               className="UIxPageFrame"
-               title="name"
+<var:component
+  xmlns="http://www.w3.org/1999/xhtml"
+  xmlns:var="http://www.skyrix.com/od/binding"
+  xmlns:const="http://www.skyrix.com/od/constant"
+  xmlns:uix="OGo:uix"
+  xmlns:label="OGo:label"
+  className="UIxPageFrame"
+  title="name"
 >
-  <form var:href="clientObject.baseURL">
+  <script language="JavaScript">
+    function validateAptEditor() {
+      var e;
+      
+      e = document.getElementById('summary');
+      if (e.value.length == 0)
+        return confirm('<var:string label:value="validate_notitle"/>');
+      return true;
+    }
+  </script>
+  
+  <form var:href="clientObject.baseURL" name="editform"
+        onsubmit="return validateAptEditor()">
+
       <script language="JavaScript"> <!-- TODO: use a resource -->
         <var:string value="jsCode" const:escapeHTML="NO" />
       </script>
+
       <table cellspacing="0" cellpadding="5" width="100%">
         <tr>
           <td>
         <tr>
           <td>
             <var:if condition="hasErrorText">
-           <div style="background-color: #AA0000;">
-             <var:string value="errorText" />
+             <div style="background-color: #AA0000;">
+               <var:string value="errorText" />
               </div>
               <hr />
             </var:if>
-  
+
             <table border="0" cellpadding="2" cellspacing="0" width="100%"
                    bgcolor="#e8e8e0"
             >
                 </td>
                 <td align="left" bgcolor="#FFFFF0">
                   <span class="aptview_text">
-                    <input type="text" name="summary" const:size="40"
-                           var:value="title" />
+                    <input type="text" name="summary" id="summary"
+                           const:size="40" var:value="title" />
                   </span>
                 </td>
               </tr>
                 </td>
                 <td align="left" bgcolor="#FFFFF0">
                   <span class="aptview_text">
-                    <var:popup list="priorities"
-                               item="item"
-                               string="itemPriorityText"
-                               selection="priority"
-                    />
+                    <var:popup list="priorities" item="item"
+                               string="itemPriorityText" selection="priority"/>
                   </span>
                 </td>
               </tr>
                     <table>
                       <tr>
                         <td>
-                          <var:popup list="cycles"
-                                     item="item"
+                          <var:popup list="cycles" item="item"
                                      label:string="$cycleLabel"
                                      selection="cycle"
                                      const:onChange="selectHasCycle(this);"
                         <td id="cycle_end_mode"
                             var:style="initialCycleVisibility"
                         >
-                          <var:popup list="cycleEnds"
-                                     item="item"
-                                     label:string="$item"
-                                     value="item"
+                          <var:popup list="cycleEnds" item="item"
+                                     label:string="$item" value="item"
                                      selection="cycleEnd"
                                      const:onChange="selectCycleEnd(this);"
                                      const:id="cycle_end_mode_selection"
                 </td>
                 <td align="left" bgcolor="#FFFFF0">
                   <span class="aptview_text">
-                    <var:checkbox-list list="categoryItems"
-                                       item="item"
+                    <var:checkbox-list list="categoryItems" item="item"
                                        suffix="itemCategoryText"
                                        selections="categories"
                     />
                 </td>
                 <td align="left" bgcolor="#FFFFF0">
                   <span class="aptview_text">
-                    <input type="checkbox"
-                           var:selection="isPrivate"
-                           var:checked="isPrivate"
-                    /> <var:string label:value="is private" />
+                    <input type="checkbox" var:selection="isPrivate"
+                           var:checked="isPrivate" />
+                    <var:string label:value="is private" />
                   </span>
                 </td>
               </tr>