diff --git a/include/sieve/templates/element_envelope.tpl b/include/sieve/templates/element_envelope.tpl
index e1aace841b42d0b7eb9e44535ec79284dc484f06..6e86b55c472f67554106acef5f42a05bd99f8830 100755 (executable)
+<table class='sieve_test_case'>
+ {if $Expert}
+ {if $LastError != ""}
+ <tr>
+ <td colspan=4>
+ <font color='red'><b>{$LastError}</b></font>
+ </td>
+ </tr>
+
+ {/if}
-<table>
<tr>
- <td colspan=3>
- <b>{t}Envelope{/t}</b>
+ <td>
+ {t}Match type{/t}
+ </td>
+ <td>
+ <select name='matchtype_{$ID}' title='{t}Boolean value{/t}' onChange='document.mainform.submit();'>
+ {html_options options=$match_types selected=$match_type}
+ </select>
+
+ </td>
+ <td>
+ {t}Invert test{/t}?
+ </td>
+ <td>
+ {if $Inverse}
+ <input type='submit' name='toggle_inverse_{$ID}' value='{t}Yes{/t}'>
+ {else}
+ <input type='submit' name='toggle_inverse_{$ID}' value='{t}No{/t}'>
+ {/if}
+ </td>
+ <td style='text-align:right; vertical-align:top;'>
+ <input type='submit' name='Toggle_Expert_{$ID}' value='{t}Normal mode{/t}'>
</td>
</tr>
<tr>
{html_options options=$comparators selected=$comparator}
</select>
</td>
- <td>
- {t}Match type{/t}
- </td>
- <td>
- <select name='matchtype_{$ID}' title='{t}Boolean value{/t}'>
- {html_options options=$match_types selected=$match_type}
- </select>
-
- </td>
+ {if $match_type == ":count" || $match_type == ":value"}
<td>
{t}operator{/t}
</td>
<td>
- <select name='operator_{$ID}' title='{t}Boolean value{/t}'>
+ <select name='operator_{$ID}' title='{t}Boolean value{/t}' onChange='document.mainform.submit();'>
{html_options options=$operators selected=$operator}
</select>
</td>
+ {else}
+ <td style='text-align:right;'>
+
+ </td>
+ {/if}
+ <td style='text-align:right;'>
+
+ </td>
</tr>
<tr>
<td>
- {t}Address fields{/t}
+ {t}Address fields to include{/t}
</td>
<td>
- <textarea name='keys_{$ID}'>{$keys}</textarea>
+ <textarea style='width:95%;height:50px;' name='keys_{$ID}'>{$keys}</textarea>
</td>
<td>
- {t}Match values{/t}
+ {t}Values to match for{/t}
+ </td>
+ <td>
+ <textarea style='width:95%;height:50px;' name='values_{$ID}'>{$values}</textarea>
+ </td>
+ </tr>
+ {else}
+ {if $LastError != ""}
+ <tr>
+ <td colspan=4>
+ <font color='red'><b>{$LastError}</b></font>
+ </td>
+ </tr>
+
+ {/if}
+ <tr>
+ <td style='vertical-align:top;'>
+ <b>{t}Envelope{/t}</b>
+
+ {if $Inverse}
+ <input type='submit' name='toggle_inverse_{$ID}' value='{t}Not{/t}'>
+ {else}
+ <input type='submit' name='toggle_inverse_{$ID}' value='{t}-{/t}'>
+ {/if}
+
+ <select onChange='document.mainform.submit();' name='matchtype_{$ID}' title='{t}Boolean value{/t}'>
+ {html_options options=$match_types selected=$match_type}
+ </select>
+
+ {if $match_type == ":count" || $match_type == ":value"}
+ <select name='operator_{$ID}' title='{t}Boolean value{/t}' onChange='document.mainform.submit();'>
+ {html_options options=$operators selected=$operator}
+ </select>
+ {/if}
</td>
<td>
- <textarea name='values_{$ID}'>{$values}</textarea>
+ <textarea style='width:45%;height:20px;' name='keys_{$ID}'>{$keys}</textarea>
+ <textarea style='width:45%;height:20px;' name='values_{$ID}'>{$values}</textarea>
+ </td>
+ <td style='text-align:right; vertical-align:top;'>
+ <input type='submit' name='Toggle_Expert_{$ID}' value='{t}Expert mode{/t}'>
</td>
</tr>
+ {/if}
</table>