Changeset ebb2047 in github
- Timestamp:
- Jul 23, 2012 4:24:16 AM (10 months ago)
- Children:
- 7eba085
- Parents:
- 114cf12
- Location:
- plugins/managesieve
- Files:
-
- 6 edited
-
Changelog (modified) (1 diff)
-
localization/en_GB.inc (modified) (1 diff)
-
localization/en_US.inc (modified) (1 diff)
-
localization/pl_PL.inc (modified) (1 diff)
-
managesieve.js (modified) (2 diffs)
-
managesieve.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/managesieve/Changelog
r7dc7eb1 rebb2047 1 - Added GUI for variables setting - RFC5229 (patch from PaweÅ SÅowik) 2 1 3 * version 5.1 [2012-06-21] 2 4 ----------------------------------------------------------- -
plugins/managesieve/localization/en_GB.inc
r48e9c14 rebb2047 94 94 $labels['flagflagged'] = 'Flagged'; 95 95 $labels['flagdraft'] = 'Draft'; 96 $labels['setvariable'] = 'Set variable'; 97 $labels['setvarname'] = 'Variable name:'; 98 $labels['setvarvalue'] = 'Variable value:'; 99 $labels['setvarmodifiers'] = 'Modifiers:'; 96 100 $labels['filtercreate'] = 'Create filter'; 97 101 $labels['usedata'] = 'Use following data in the filter:'; -
plugins/managesieve/localization/en_US.inc
r48e9c14 rebb2047 79 79 $labels['flagflagged'] = 'Flagged'; 80 80 $labels['flagdraft'] = 'Draft'; 81 $labels['setvariable'] = 'Set variable'; 82 $labels['setvarname'] = 'Variable name:'; 83 $labels['setvarvalue'] = 'Variable value:'; 84 $labels['setvarmodifiers'] = 'Modifiers:'; 81 85 $labels['filtercreate'] = 'Create filter'; 82 86 $labels['usedata'] = 'Use following data in the filter:'; -
plugins/managesieve/localization/pl_PL.inc
re88e20c rebb2047 108 108 $labels['flagflagged'] = 'Oflagowana'; 109 109 $labels['flagdraft'] = 'Szkic'; 110 $labels['setvariable'] = 'Ustaw zmiennÄ 111 '; 112 $labels['setvarname'] = 'Nazwa zmiennej:'; 113 $labels['setvarvalue'] = 'WartoÅÄ zmiennej:'; 114 $labels['setvarmodifiers'] = 'Modyfikatory:'; 110 115 $labels['filtercreate'] = 'Utwórz filtr'; 111 116 $labels['usedata'] = 'UÅŒyj nastÄpujÄ -
plugins/managesieve/managesieve.js
r8d8f7a7 rebb2047 639 639 target_area: document.getElementById('action_target_area' + id), 640 640 flags: document.getElementById('action_flags' + id), 641 vacation: document.getElementById('action_vacation' + id) 641 vacation: document.getElementById('action_vacation' + id), 642 set: document.getElementById('action_set' + id) 642 643 }; 643 644 … … 656 657 else if (obj.value == 'vacation') { 657 658 enabled.vacation = 1; 659 } 660 else if (obj.value == 'set') { 661 enabled.set = 1; 658 662 } 659 663 -
plugins/managesieve/managesieve.php
r7dc7eb1 rebb2047 616 616 $subject = get_input_value('_action_subject', RCUBE_INPUT_POST, true); 617 617 $flags = get_input_value('_action_flags', RCUBE_INPUT_POST); 618 $varnames = get_input_value('_action_varname', RCUBE_INPUT_POST); 619 $varvalues = get_input_value('_action_varvalue', RCUBE_INPUT_POST); 620 $varmods = get_input_value('_action_varmods', RCUBE_INPUT_POST); 618 621 619 622 // we need a "hack" for radiobuttons … … 849 852 if ($this->form['actions'][$i]['days'] && !preg_match('/^[0-9]+$/', $this->form['actions'][$i]['days'])) 850 853 $this->errors['actions'][$i]['days'] = $this->gettext('forbiddenchars'); 854 break; 855 856 case 'set': 857 if (empty($varnames[$idx])) { 858 $this->errors['actions'][$i]['name'] = $this->gettext('cannotbeempty'); 859 } 860 if (empty($varvalues[$idx])) { 861 $this->errors['actions'][$i]['value'] = $this->gettext('cannotbeempty'); 862 } 863 foreach ($varmods[$idx] as $v_m) { 864 $this->form['actions'][$i][$v_m] = true; 865 } 866 $this->form['actions'][$i]['name'] = $varnames[$idx]; 867 $this->form['actions'][$i]['value'] = $varvalues[$idx]; 851 868 break; 852 869 } … … 1448 1465 $select_action->add(Q($this->gettext('removeflags')), 'removeflag'); 1449 1466 } 1467 if (in_array('variables', $this->exts)) { 1468 $select_action->add(Q($this->gettext('setvariable')), 'set'); 1469 } 1450 1470 $select_action->add(Q($this->gettext('rulestop')), 'stop'); 1451 1471 … … 1511 1531 $out .= '</div>'; 1512 1532 1533 // set variable 1534 $set_modifiers = array( 1535 'lower', 1536 'upper', 1537 'lowerfirst', 1538 'upperfirst', 1539 'quotewildcard', 1540 'length' 1541 ); 1542 1543 $out .= '<div id="action_set' .$id.'" style="display:' .($action['type']=='set' ? 'inline' : 'none') .'">'; 1544 $out .= '<span class="label">' .Q($this->gettext('setvarname')) . '</span><br />' 1545 .'<input type="text" name="_action_varname['.$id.']" id="action_varname'.$id.'" ' 1546 .'value="' . Q($action['name']) . '" size="35" ' 1547 . $this->error_class($id, 'action', 'name', 'action_varname') .' />'; 1548 $out .= '<br /><span class="label">' .Q($this->gettext('setvarvalue')) . '</span><br />' 1549 .'<input type="text" name="_action_varvalue['.$id.']" id="action_varvalue'.$id.'" ' 1550 .'value="' . Q($action['value']) . '" size="35" ' 1551 . $this->error_class($id, 'action', 'value', 'action_varvalue') .' />'; 1552 $out .= '<br /><span class="label">' .Q($this->gettext('setvarmodifiers')) . '</span><br />'; 1553 foreach ($set_modifiers as $j => $s_m) { 1554 $s_m_id = 'action_varmods' . $id . $s_m; 1555 $out .= sprintf('<input type="checkbox" name="_action_varmods[%s][]" value="%s" id="%s"%s />%s<br>', 1556 $id, $s_m, $s_m_id, (array_key_exists($s_m, (array)$action) && $action[$s_m] ? ' checked="checked"' : ''), $s_m); 1557 } 1558 $out .= '</div>'; 1559 1513 1560 // mailbox select 1514 1561 if ($action['type'] == 'fileinto')
Note: See TracChangeset
for help on using the changeset viewer.
