source: trunk/prototype/modules/filters/edit-filter.ejs @ 6126

Revision 6126, 8.6 KB checked in by airton, 12 years ago (diff)

Ticket #2704 - Implementar a validacao nos campos que faltam na tela de filtros de mensagens

Line 
1<%
2        var specialFolders = {
3                INBOX: {name:'Caixa de Entrada', classe:'inbox'},
4                Inbox: {name:'Caixa de Entrada', classe:'inbox'},
5                Trash: {name:'Lixeira', classe:'trash'},
6                Drafts:{name:'Rascunhos', classe:'drafts'},
7                Spam:  {name:'Spam', classe:'spam'},
8                Sent:  {name:'Enviados', classe:'sent'}
9        };
10%>
11<form action="filter:detail" method="POST">
12        <div class="rule-details-container">
13                <h3><a href="#"><%= get_lang("Criteria")%></a></h3>
14                <div>
15                        <fieldset>
16                                <label class="small"><%= get_lang("Name of the rule")%></label>
17                                <input type="text" name="name" />
18                        </fieldset>
19                        <fieldset>
20                                <label class="small"><%= get_lang("Sender")%></label>
21                                <select name="criteriaOperator[]">
22                                        <option value="*"><%= get_lang("contains the phrase")%></option>
23                                        <option value="="><%= get_lang("is equal to")%></option>
24                                        <option value="!*"><%= get_lang("doesn't contain the phrase")%></option>
25                                        <option value="^"><%= get_lang("starting with")%></option>
26                                        <option value="$"><%= get_lang("ends with")%></option>
27
28                                </select>
29                                <input type="text" name="criteriaValue[]" />
30                                <input type="hidden" name="criteriaType[]" value="from"/>
31                        </fieldset>
32                        <fieldset>
33                                <label class="small"><%= get_lang("Receiver")%></label>
34                                <select name="criteriaOperator[]">
35                                        <option value="*"><%= get_lang("contains the phrase")%></option>
36                                        <option value="="><%= get_lang("is equal to")%></option>
37                                        <option value="!*"><%= get_lang("doesn't contain the phrase")%></option>
38                                        <option value="^"><%= get_lang("starting with")%></option>
39                                        <option value="$"><%= get_lang("ends with")%></option>
40                                </select>
41                                <input type="text" name="criteriaValue[]" />
42                                <input type="hidden" name="criteriaType[]" value="to"/>
43                        </fieldset>
44                        <fieldset>
45                                <label class="small"><%= get_lang("Subject")%></label>
46                                <select name="criteriaOperator[]">
47                                        <option value="*"><%= get_lang("contains the phrase")%></option>
48                                        <option value="="><%= get_lang("is equal to")%></option>
49                                        <option value="!*"><%= get_lang("doesn't contain the phrase")%></option>
50                                        <option value="^"><%= get_lang("starting with")%></option>
51                                        <option value="$"><%= get_lang("ends with")%></option>
52
53                                </select>
54                                <input type="text" name="criteriaValue[]" />
55                                <input type="hidden" name="criteriaType[]" value="subject"/>
56                        </fieldset>
57                        <fieldset>
58                                <label class="small"><%= get_lang("Message")%></label>
59                                <select name="criteriaOperator[]">
60                                        <option value="*"><%= get_lang("contains the phrase")%></option>
61                                        <option value="="><%= get_lang("is equal to")%></option>
62                                        <option value="!*"><%= get_lang("doesn't contain the phrase")%></option>
63                                        <option value="^"><%= get_lang("starting with")%></option>
64                                        <option value="$"><%= get_lang("ends with")%></option>
65                                </select>
66                                <input type="text" name="criteriaValue[]" />
67                                <input type="hidden" name="criteriaType[]" value="body"/>
68                        </fieldset>
69                        <fieldset>
70                                <label class="small"><%= get_lang("Size")%>(KB)</label>
71                                <select name="criteriaOperator[]">
72                                        <option value=">"><%= get_lang("is over than")%></option>
73                                        <option value="<"><%= get_lang("is under than")%></option>
74                                </select>
75                                <input type="text" class="sizeRule" name="criteriaValue[]" />
76                                <input type="hidden" name="criteriaType[]" value="size"/>
77                        </fieldset>
78                        <fieldset>
79                                <input type="checkbox" value="hasAttachment" name="hasAttachment" />
80                                <label><%= get_lang("The message has attachment")%></label>
81                        </fieldset>
82                        <fieldset class="fields-isexact">
83                                <fieldset>
84                                        <input type="radio" name="isExact" value="and" checked="checked"/>
85                                        <label><%= get_lang("Attend all the criteria")%></label>
86                                </fieldset>
87                                <fieldset>
88                                        <input type="radio" name="isExact" value="or"/>
89                                        <label><%= get_lang("Attend any of the criteria")%></label>
90                                </fieldset>
91                        </fieldset>
92                        <div class="menu-container">
93                                <a class="button cancel" href="#"><%= get_lang("Cancel")%></a>
94                                <a class="button forth" href="#"><%= get_lang("Continue")%> &raquo;</a>
95                        </div>
96                </div>
97                <h3><a href="#"><%= get_lang("Actions")%></a></h3>
98                <div>
99                        <ul class="message-tip-container">
100                                <li class="message-tip"><%= get_lang("Actions to be performed on messages that attend the criteria specified above.")%></li>
101                                <li class="message-tip"><%= get_lang("These actions apply only to new messages arriving.")%></li>
102                        </ul>
103                        <fieldset class="select-folderlist">
104                                <input type="radio" name="actionType[]" value="fileinto" checked="checked" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
105                                <label><%= get_lang("Archive in folder")%></label>
106                                <!--
107                                Aguardando o problema do form do DataLayer ser resolvido.
108                                -->
109                                <select name="valueFileInto" style="width:150px">
110                                        <%for(var i=0; i < data.folders.length; i++){
111                                                var folder_name = specialFolders[data.folders[i].commonName] ? get_lang(data.folders[i].commonName) : data.folders[i].commonName;
112                                                if(/^INBOX/.test(data.folders[i].id)){ %>
113                                                        <option value="<%= data.folders[i].id%>"><%= folder_name%></option>
114                                        <%
115                                                }else if(/^user/.test(data.folders[i].id)){
116                                                        var user_name = (data.folders[i].parentFolder.split(data.delimiter)[1] ? (data.folders[i].parentFolder.split(data.delimiter)[1] + data.delimiter) : "");
117                                                %>
118                                                        <option value="<%= data.folders[i].id%>"><%= user_name + folder_name%></option>
119                                                <% }
120                                        }
121                                        %>
122                                </select>
123                        </fieldset>
124                        <fieldset>
125                                <input type="radio" name="actionType[]" value="redirect" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
126                                <label><%= get_lang("Forward to the address")%></label>
127                                <input type="text" name="addressRedirect" />
128                        </fieldset>
129                        <fieldset>
130                                <input type="radio" name="actionType[]" value="setflag" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
131                                <label><%= get_lang("Mark as")%></label>
132                                <!--
133                                Aguardando o problema do form do DataLayer ser resolvido.
134                                -->
135                                <select name="valueSetFlag">
136                                        <option value="flagged"><%= get_lang("Flagged")%></option>
137                                        <option value="seen"><%= get_lang("Seen")%></option>
138                                </select>
139                        </fieldset>
140                        <fieldset>
141                                <input type="radio" name="actionType[]" value="fileintoTrash" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
142                                <label><%= get_lang("Trash")%></label>
143                                <input type="hidden" name="actionParameter[]" value="Trash"/>
144                        </fieldset>
145                        <fieldset class="fields-replyto">
146                                <input type="radio" name="actionType[]" value="reject" onchange="$('.ui-widget-content :checkbox').parent().addClass(' hidden');"/>
147                                <label><%= get_lang("Reply with a message automatically")%></label>
148                                <textarea name="messageReject"></textarea>
149                        </fieldset>
150                        <fieldset>
151                                <input type="checkbox" name="actionType[]" value="fileintoInbox"/>
152                                <label><%= get_lang("Keep a copy of the message at your Inbox")%></label>
153                                <input type="hidden" name="actionParameter[]" value="INBOX"/>
154                        </fieldset>
155                        <div class="menu-container">   
156                                <a class="button back"   href="#" >&laquo; <%= get_lang("Previous")%></a>
157                                <a class="button cancel" href="#"><%= get_lang("Cancel")%></a>
158                                <a class="button forth2" href="#"><%= get_lang("Continue")%> &raquo;</a>
159                                <a class="button submit" href="#"><%= get_lang("Save")%></a>
160                        </div>
161                </div>
162               
163                <h3><a href="#"><%= get_lang("Apply filter")%></a></h3>
164                <div>
165                        <fieldset>
166                                <table class="hidden fields-search-messages-grid" id="fields-search-messages-grid"><tr><td/></tr></table>
167                                <div class="hidden fields-search-messages-grid-pager" id="fields-search-messages-grid-pager"></div>
168                                <fieldset class="fields-search-messages" style="border: none;">
169                                        <span class="button ui-button-text-only search menu-container"><%= get_lang("Search Inbox")%></span>
170                                </fieldset>
171                        </fieldset>
172                        <div class="menu-container">   
173                                <a class="button back2"   href="#" >&laquo; <%= get_lang("Previous")%></a>
174                                <a class="button cancel" href="#"><%= get_lang("Cancel")%></a>
175                                <a class="button submit" href="#"><%= get_lang("Save")%></a>
176                        </div>
177                </div>
178        </div>
179        <div class="vacation-details-container hidden">
180                <fieldset>
181                        <label><%= get_lang("Type a reply message")%></label>
182                        <ul class="message-tip-container">
183                                <li class="message-tip"><%= get_lang("All messages will be answered automatically with the message indicated.")%></li>
184                        </ul>
185                        <textarea class="filter-textarea" name="vacation"></textarea>
186                </fieldset>
187                        <div class="menu-container">   
188                              <a class="button back"   href="#" title="Cancela e retorna á tela anterior">&laquo; <%= get_lang("Previous")%></a>
189                              <a class="button submit" href="#" title="Salva e retorna á tela anterior"><%= get_lang("Save")%></a>
190                        </div>
191        </div>
192</form>
Note: See TracBrowser for help on using the repository browser.