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

Revision 5801, 8.4 KB checked in by marcieli, 12 years ago (diff)

Ticket #2566 - Internacionalizadas telas de filtros. Corrigida listagem de pastas.

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("is equal to")%></option>
23                                        <option value="*"><%= get_lang("contains the phrase")%></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("is equal to")%></option>
36                                        <option value="*"><%= get_lang("contains the phrase")%></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("is equal to")%></option>
48                                        <option value="*"><%= get_lang("contains the phrase")%></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("is equal to")%></option>
61                                        <option value="*"><%= get_lang("contains the phrase")%></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")%></label>
71                                <select name="criteriaOperator[]">
72                                        <option value=">"><%= get_lang("is under than")%></option>
73                                        <option value="<"><%= get_lang("is over than")%></option>
74                                </select>
75                                <input type="text" name="criteriaValue[]" />
76                                <input type="hidden" name="criteriaType[]" value="size"/>
77                        </fieldset>
78                        <!--
79                        <fieldset>
80                                <input type="checkbox" value="hasAttachment" name="hasAttachment" />
81                                <label>A mensagem possui anexo</label>
82                        </fieldset>
83                        -->
84                        <fieldset class="fields-isexact">
85                                <fieldset>
86                                        <input type="radio" name="isExact" value="and" checked="checked"/>
87                                        <label><%= get_lang("Attend all the criteria")%></label>
88                                </fieldset>
89                                <fieldset>
90                                        <input type="radio" name="isExact" value="or"/>
91                                        <label><%= get_lang("Attend any of the criteria")%></label>
92                                </fieldset>
93                        </fieldset>
94                        <div class="menu-container">
95                                <a class="button cancel" href="#"><%= get_lang("Cancel")%></a>
96                                <a class="button forth" href="#"><%= get_lang("Continue")%> &raquo;</a>
97                        </div>
98                </div>
99                <h3><a href="#"><%= get_lang("Actions")%></a></h3>
100                <div>
101                        <ul class="message-tip-container">
102                                <li class="message-tip"><%= get_lang("Actions to be performed on messages that attend the criteria specified above.")%></li>
103                                <li class="message-tip"><%= get_lang("These actions apply only to new messages arriving.")%></li>
104                        </ul>
105                        <fieldset class="select-folderlist">
106                                <input type="radio" name="actionType[]" value="fileinto" checked="checked" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
107                                <label><%= get_lang("Archive in folder")%></label>
108                                <!--
109                                Aguardando o problema do form do DataLayer ser resolvido.
110                                -->
111                                <select name="valueFileInto" style="width:150px">
112                                        <%for(var i=0; i < data.folders.length; i++){
113                                                var folder_name = specialFolders[data.folders[i].commonName] ? get_lang(data.folders[i].commonName) : data.folders[i].commonName;
114                                                if(/^INBOX/.test(data.folders[i].id)){ %>
115                                                        <option value="<%= data.folders[i].id%>"><%= folder_name%></option>
116                                        <%
117                                                }else if(/^user/.test(data.folders[i].id)){
118                                                        var user_name = (data.folders[i].parentFolder.split(data.delimiter)[1] ? (data.folders[i].parentFolder.split(data.delimiter)[1] + data.delimiter) : "");
119                                                %>
120                                                        <option value="<%= data.folders[i].id%>"><%= user_name + folder_name%></option>
121                                                <% }
122                                        }
123                                        %>
124                                </select>
125                                <!-- <input type="text" name="actionParameter[]" /> -->
126                        </fieldset>
127                        <fieldset>
128                                <input type="radio" name="actionType[]" value="redirect" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
129                                <label><%= get_lang("Forward to the address")%></label>
130                                <input type="text" name="addressRedirect" />
131                        </fieldset>
132                        <fieldset>
133                                <input type="radio" name="actionType[]" value="setflag" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
134                                <label><%= get_lang("Mark as")%></label>
135                                <!--
136                                Aguardando o problema do form do DataLayer ser resolvido.
137                                -->
138                                <select name="valueSetFlag">
139                                        <option value="flagged"><%= get_lang("Flagged")%></option>
140                                        <option value="seen"><%= get_lang("Seen")%></option>
141                                </select>
142                                <!-- <input type="text" name="actionParameter[]" /> -->
143                        </fieldset>
144                        <fieldset>
145                                <input type="radio" name="actionType[]" value="fileintoTrash" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
146                                <label><%= get_lang("Seen")%></label>
147                                <input type="hidden" name="actionParameter[]" value="Trash"/>
148                        </fieldset>
149                        <fieldset class="fields-replyto">
150                                <input type="radio" name="actionType[]" value="reject" onchange="$('.ui-widget-content :checkbox').parent().addClass(' hidden');"/>
151                                <label><%= get_lang("Reply with a message automatically")%></label>
152                                <textarea name="messageReject"></textarea>
153                        </fieldset>
154                        <fieldset>
155                                <input type="checkbox" name="actionType[]" value="fileintoInbox"/>
156                                <label><%= get_lang("Keep a copy of the message at your Inbox")%></label>
157                                <input type="hidden" name="actionParameter[]" value="INBOX"/>
158                        </fieldset>
159                        <!--
160                        <fieldset class="fields-search-messages">
161                                <label>Clique no botão "Buscar" para verificar se existem mensagens na sua Caixa de Entrada que
162                                atendem aos critérios especificados anteriormente.</label>
163                                <span class="button search">Buscar na caixa de entrada</span>
164                        </fieldset>
165                        <table class="hidden fields-search-messages-grid" id="fields-search-messages-grid"><tr><td/></tr></table>
166                        <div class="hidden fields-search-messages-grid-pager" id="fields-search-messages-grid-pager"></div>
167                        -->
168                        <div class="menu-container">   
169                                <a class="button back"   href="#" >&laquo; <%= get_lang("Previous")%></a>
170                                <a class="button cancel" href="#"><%= get_lang("Cancel")%></a>
171                                <a class="button submit" href="#"><%= get_lang("Save")%></a>
172                        </div>
173                </div>
174        </div>
175        <div class="vacation-details-container hidden">
176                <fieldset>
177                        <label><%= get_lang("Type a reply message")%></label>
178                        <ul class="message-tip-container">
179                                <li class="message-tip"><%= get_lang("All messages will be answered automatically with the message indicated.")%></li>
180                        </ul>
181                        <textarea class="filter-textarea" name="vacation"></textarea>
182                </fieldset>
183                        <div class="menu-container">   
184                              <a class="button back"   href="#" title="Cancela e retorna á tela anterior">&laquo; <%= get_lang("Previous")%></a>
185                              <a class="button submit" href="#" title="Salva e retorna á tela anterior"><%= get_lang("Save")%></a>
186                        </div>
187        </div>
188</form>
Note: See TracBrowser for help on using the repository browser.