source: sandbox/2.4.1-1/prototype/modules/filters/edit-filter.ejs @ 6285

Revision 6285, 8.8 KB checked in by airton, 12 years ago (diff)

Ticket #2764 - Implementacao de alerta ao usuario para criterio atendido nos 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                                <input type="checkbox" name="actionType[]" value="alertMessage" class="alertMessage"/>
124                                <label><%= get_lang("Alert message filter by sender")%></label>
125                        </fieldset>
126                        <fieldset>
127                                <input type="radio" name="actionType[]" value="redirect" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
128                                <label><%= get_lang("Forward to the address")%></label>
129                                <input type="text" name="addressRedirect" />
130                        </fieldset>
131                        <fieldset>
132                                <input type="radio" name="actionType[]" value="setflag" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
133                                <label><%= get_lang("Mark as")%></label>
134                                <!--
135                                Aguardando o problema do form do DataLayer ser resolvido.
136                                -->
137                                <select name="valueSetFlag">
138                                        <option value="flagged"><%= get_lang("Flagged")%></option>
139                                        <option value="seen"><%= get_lang("Seen")%></option>
140                                </select>
141                        </fieldset>
142                        <fieldset>
143                                <input type="radio" name="actionType[]" value="fileintoTrash" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
144                                <label><%= get_lang("Trash")%></label>
145                                <input type="hidden" name="actionParameter[]" value="Trash"/>
146                        </fieldset>
147                        <fieldset class="fields-replyto">
148                                <input type="radio" name="actionType[]" value="reject" onchange="$('.ui-widget-content :checkbox').parent().addClass(' hidden');"/>
149                                <label><%= get_lang("Reply with a message automatically")%></label>
150                                <textarea name="messageReject"></textarea>
151                        </fieldset>
152                        <fieldset>
153                                <input type="checkbox" name="actionType[]" value="fileintoInbox"/>
154                                <label><%= get_lang("Keep a copy of the message at your Inbox")%></label>
155                                <input type="hidden" name="actionParameter[]" value="INBOX"/>
156                        </fieldset>
157                        <div class="menu-container">   
158                                <a class="button back"   href="#" >&laquo; <%= get_lang("Previous")%></a>
159                                <a class="button cancel" href="#"><%= get_lang("Cancel")%></a>
160                                <a class="button forth2" href="#"><%= get_lang("Continue")%> &raquo;</a>
161                                <a class="button submit" href="#"><%= get_lang("Save")%></a>
162                        </div>
163                </div>
164               
165                <h3><a href="#"><%= get_lang("Apply filter")%></a></h3>
166                <div>
167                        <fieldset>
168                                <table class="hidden fields-search-messages-grid" id="fields-search-messages-grid"><tr><td/></tr></table>
169                                <div class="hidden fields-search-messages-grid-pager" id="fields-search-messages-grid-pager"></div>
170                                <fieldset class="fields-search-messages" style="border: none;">
171                                        <span class="button ui-button-text-only search menu-container"><%= get_lang("Search Inbox")%></span>
172                                </fieldset>
173                        </fieldset>
174                        <div class="menu-container">   
175                                <a class="button back2"   href="#" >&laquo; <%= get_lang("Previous")%></a>
176                                <a class="button cancel" href="#"><%= get_lang("Cancel")%></a>
177                                <a class="button submit" href="#"><%= get_lang("Save")%></a>
178                        </div>
179                </div>
180        </div>
181        <div class="vacation-details-container hidden">
182                <fieldset>
183                        <label><%= get_lang("Type a reply message")%></label>
184                        <ul class="message-tip-container">
185                                <li class="message-tip"><%= get_lang("All messages will be answered automatically with the message indicated.")%></li>
186                        </ul>
187                        <textarea class="filter-textarea" name="vacation"></textarea>
188                </fieldset>
189                        <div class="menu-container">   
190                              <a class="button back"   href="#" title="<%= get_lang("Cancel and returns the previous screen")%>">&laquo; <%= get_lang("Previous")%></a>
191                              <a class="button submit" href="#" title="<%= get_lang("Save and returns the previous screen")%>"><%= get_lang("Save")%></a>
192                        </div>
193        </div>
194</form>
Note: See TracBrowser for help on using the repository browser.