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

Revision 7385, 9.2 KB checked in by eduardow, 11 years ago (diff)

Ticket #2959 - Corrigindo repetição de checkbox

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>
86                                <input type="checkbox" name="verifyNextRule" value="verifyNextRule" class="verifyNextRule"/>
87                                <label><%= get_lang("Continue checking other rules if the criteria is met.")%></label>
88                        </fieldset>
89                        <fieldset class="fields-isexact">
90                                <fieldset>
91                                        <input type="radio" name="isExact" value="and" checked="checked"/>
92                                        <label><%= get_lang("Attend all the criteria")%></label>
93                                </fieldset>
94                                <fieldset>
95                                        <input type="radio" name="isExact" value="or"/>
96                                        <label><%= get_lang("Attend any of the criteria")%></label>
97                                </fieldset>
98                        </fieldset>
99                        <div class="menu-container">
100                                <a class="button cancel" href="#"><%= get_lang("Cancel")%></a>
101                                <a class="button forth" href="#"><%= get_lang("Continue")%> &raquo;</a>
102                        </div>
103                </div>
104                <h3><a href="#"><%= get_lang("Actions")%></a></h3>
105                <div>
106                        <ul class="message-tip-container">
107                                <li class="message-tip"><%= get_lang("Actions to be performed on messages that attend the criteria specified above.")%></li>
108                                <li class="message-tip"><%= get_lang("These actions apply only to new messages arriving.")%></li>
109                        </ul>
110                        <fieldset class="select-folderlist">
111                                <input type="radio" name="actionType[]" value="fileinto" checked="checked" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
112                                <label><%= get_lang("Archive in folder")%></label>
113                                <!--
114                                Aguardando o problema do form do DataLayer ser resolvido.
115                                -->
116                                <select name="valueFileInto" style="width:150px">
117                                        <%for(var i=0; i < data.folders.length; i++){
118                                                var folder_name = specialFolders[data.folders[i].commonName] ? get_lang(data.folders[i].commonName) : data.folders[i].commonName;
119                                                if(/^INBOX/.test(data.folders[i].id)){ %>
120                                                        <option value="<%= data.folders[i].id%>"><%= folder_name%></option>
121                                        <%
122                                                }else if(/^user/.test(data.folders[i].id)){
123                                                        var user_name = (data.folders[i].parentFolder.split(data.delimiter)[1] ? (data.folders[i].parentFolder.split(data.delimiter)[1] + data.delimiter) : "");
124                                                %>
125                                                        <option value="<%= data.folders[i].id%>"><%= user_name + folder_name%></option>
126                                                <% }
127                                        }
128                                        %>
129                                </select>
130                                <input type="checkbox" name="actionType[]" value="alertMessage" class="alertMessage"/>
131                                <label><%= get_lang("Alert message filter by sender")%></label>
132                        </fieldset>
133                        <fieldset>
134                                <input type="radio" name="actionType[]" value="redirect" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
135                                <label><%= get_lang("Forward to the address")%></label>
136                                <input type="text" name="addressRedirect" />
137                        </fieldset>
138                        <fieldset>
139                                <input type="radio" name="actionType[]" value="setflag" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
140                                <label><%= get_lang("Mark as")%></label>
141                                <!--
142                                Aguardando o problema do form do DataLayer ser resolvido.
143                                -->
144                                <select name="valueSetFlag">
145                                        <option value="flagged"><%= get_lang("Flagged")%></option>
146                                        <option value="seen"><%= get_lang("Seen")%></option>
147                                </select>
148                        </fieldset>
149                        <fieldset>
150                                <input type="radio" name="actionType[]" value="fileintoTrash" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
151                                <label><%= get_lang("Trash")%></label>
152                                <input type="hidden" name="actionParameter[]" value="Trash"/>
153                        </fieldset>
154                        <fieldset class="fields-replyto">
155                                <input type="radio" name="actionType[]" value="reject" onchange="$('.ui-widget-content :checkbox').parent().addClass(' hidden');"/>
156                                <label><%= get_lang("Reply with a message automatically")%></label>
157                                <textarea name="messageReject"></textarea>
158                        </fieldset>
159                        <fieldset>
160                                <input type="checkbox" name="actionType[]" value="fileintoInbox" class="fileintoInbox"/>
161                                <label><%= get_lang("Keep a copy of the message at your Inbox")%></label>
162                                <input type="hidden" name="actionParameter[]" value="INBOX"/>
163                        </fieldset>
164                        <div class="menu-container">   
165                                <a class="button back"   href="#" >&laquo; <%= get_lang("Previous")%></a>
166                                <a class="button cancel" href="#"><%= get_lang("Cancel")%></a>
167                                <a class="button forth2" href="#"><%= get_lang("Continue")%> &raquo;</a>
168                                <a class="button submit" href="#"><%= get_lang("Save")%></a>
169                        </div>
170                </div>
171               
172                <h3><a href="#"><%= get_lang("Apply filter")%></a></h3>
173                <div>
174                        <fieldset>
175                                <div id="filtergrid-container" class="empty-container">
176                                        <span class="message"><%= 'nenhuma mensagem pesquisada' %></span>
177                                </div>
178                                <fieldset class="fields-search-messages" style="border: none;">
179                                        <span class="button ui-button-text-only search menu-container"><%= get_lang("Search Inbox")%></span>
180                                </fieldset>
181                        </fieldset>
182                        <div class="menu-container">   
183                                <a class="button back2"   href="#" >&laquo; <%= get_lang("Previous")%></a>
184                                <a class="button cancel" href="#"><%= get_lang("Cancel")%></a>
185                                <a class="button submit" href="#"><%= get_lang("Save")%></a>
186                        </div>
187                </div>
188        </div>
189        <div class="vacation-details-container hidden">
190                <fieldset>
191                        <label><%= get_lang("Type a reply message")%></label>
192                        <ul class="message-tip-container">
193                                <li class="message-tip"><%= get_lang("All messages will be answered automatically with the message indicated.")%></li>
194                        </ul>
195                        <textarea class="filter-textarea" name="vacation"></textarea>
196                </fieldset>
197                        <div class="menu-container">   
198                              <a class="button back"   href="#" title="<%= get_lang("Cancel and returns the previous screen")%>">&laquo; <%= get_lang("Previous")%></a>
199                              <a class="button submit" href="#" title="<%= get_lang("Save and returns the previous screen")%>"><%= get_lang("Save")%></a>
200                        </div>
201        </div>
202</form>
Note: See TracBrowser for help on using the repository browser.