Subversion Repositories SmartDukaan

Rev

Rev 4204 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<script>
$(document).ready(function() {
    $("#create-activity-form").validate();
});
</script>
#set($messages = $action.getActionErrors())
#if($messages && $messages.size() != 0)
    #foreach($message in $messages)
        $message <br/>
    #end
#else
<div>
    <h1>Create new Activity</h1>
    <form id="create-activity-form" action="">
        <table>
            <colgroup>
                <col width="200px"/>
                <col width="250px"/>
                <col width="120px"/>
                <col width="200px"/>
                <col width="300px"/>
            </colgroup>
            <tr >
                <td ><label>Type:</label></td>
                <td colspan="2">
                <select id="activity-type" name="type" class="width-activity-type">
                    #foreach( $type in $action.getActivityTypes() )
                        #if($type.name() == "OTHER")
                            <option value="$type.name()" selected="selected">$type.name()</option>
                        #elseif($type.name() == "CALLED_CUSTOMER" || $type.name() == "RECEIVED_CALL_FROM_CUSTOMER")
                            <option value="$type.name()">$type.name()</option>
                        #end
                    #end
                </select>
                </td>
                #if($action.getUserId())
                    <td></td>
                    <td><input name="userId" value="$action.getUserId()" type="hidden" /> </td>
                #else
                    <td ><label>Customer Name:</label></td>
                    <td ><input id="customerName" name="customerName" type="text"></td>
                #end
            </tr>
            
            <tr >
                <td ><label>Customer Mobile No:</label></td>
                <td ><input id="customerMobileNumber" name="customerMobileNumber" type="text"></td>
                <td> </td>
                                #if($action.getUserId())
                                #else
                                        <td ><label>Customer Email Id:</label></td>
                                        <td ><input id="customerEmailId" name="customerEmailId" type="text"></td>
                                #end
            </tr>
            
                        <tr >
                                <td ><label></label></td>
                <td colspan="2">
                <select id="common-activity-desc" name="commonDescription" class="width-activity-type">
                                        <option value="" selected="selected"></option>
                    #foreach( $desc in $action.getActivityCommonDescriptionMatrix() )
                            <option value="$desc.name()">$desc.name()</option>
                    #end
                </select>
                </td>
            </tr>
            <tr >
                <td ><label>Description:</label></td>
                <td colspan="4"><textarea id="description" name="description" rows="3" cols="90" class="required"></textarea></td>
            </tr>
            <tr >
                <td colspan="2"></td>
                <td colspan="3"><input type="submit" value="Create" /></td>
            </tr>
        </table>
    </form>
</div>
#end