Ignore:
Timestamp:
01/13/09 18:33:29 (15 years ago)
Author:
niltonneto
Message:

Resolve #390

Location:
trunk/calendar/templates/celepar
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar/templates/celepar/edit.tpl

    r2 r602  
    3333  <td> 
    3434  <div style="padding-top:15px; padding-right: 2px"> 
    35         <input style="font-size:10px" type="submit" value="{submit_button}" onClick="javascript:submitValues()"></div></form> 
     35        <script language="JavaScript"> 
     36                var alert_field = '{alert_msg}'; 
     37        </script> 
     38        <input style="font-size:10px" type="submit" value="{submit_button}" onClick="return submitValues(alert_field);"></div></form> 
    3639  </td> 
    3740  <td>{cancel_button}</td> 
  • trunk/calendar/templates/celepar/js/edit.js

    r583 r602  
    5151        } 
    5252                                                                                                                                                                                 
    53         function submitValues(){                                 
     53        function submitValues(alert_msg){ 
     54                var typeField = document.getElementById('cal[type]'); 
     55                if (typeField && typeField.value == 'hourAppointment') 
     56                        if(document.getElementsByName('categories[]')[0].value == ""){ 
     57                                alert(alert_msg); 
     58                                return false; 
     59                                } 
    5460                for(i = 0; i < select_in.length; i++) 
    5561                        select_in.options[i].selected = true; 
Note: See TracChangeset for help on using the changeset viewer.