source: branches/2.4/prototype/modules/filters/edit-filter.ejs @ 6754

Revision 6754, 9.0 KB checked in by niltonneto, 12 years ago (diff)

Ticket #0000 - Copiadas as alterações do Trunk. Versão final da 2.4.1.

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