summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f84e570)
raw | patch | inline | side by side (parent: f84e570)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Mar 2010 09:32:26 +0000 (09:32 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Mar 2010 09:32:26 +0000 (09:32 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16367 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/ihtml/themes/modern/filterEditor.tpl | [deleted file] | patch | blob | history |
gosa-core/ihtml/themes/modern/filterEditorEntry.tpl | [deleted file] | patch | blob | history |
gosa-core/ihtml/themes/modern/userFilter.tpl | [new file with mode: 0644] | patch | blob |
gosa-core/ihtml/themes/modern/userFilterEditor.tpl | [new file with mode: 0644] | patch | blob |
gosa-core/include/class_filterEditor.inc | patch | blob | history | |
gosa-core/include/class_filterEditorEntry.inc | patch | blob | history | |
gosa-core/include/class_management.inc | patch | blob | history |
diff --git a/gosa-core/ihtml/themes/modern/filterEditor.tpl b/gosa-core/ihtml/themes/modern/filterEditor.tpl
+++ /dev/null
@@ -1,14 +0,0 @@
-<h3>{t}Filter editor{/t}</h3>
-
-<hr>
-
-{t}List of configured filters{/t}
-{$list}
-<button type='submit' name='addFilter'>{msgPool type='addButton'}</button>
-
-<hr>
-
-<div class="plugin-actions">
- <button type='submit' name='saveFilter'>{msgPool type='saveButton'}</button>
- <button type='submit' name='cancelFilter'>{msgPool type='cancelButton'}</button>
-</div>
diff --git a/gosa-core/ihtml/themes/modern/filterEditorEntry.tpl b/gosa-core/ihtml/themes/modern/filterEditorEntry.tpl
+++ /dev/null
@@ -1,67 +0,0 @@
-<h3>{t}Filter editor{/t}</h3>
-
-<hr>
-
-<table summary="{t}Filter editor{/t}" width="100%">
- <tr>
- <td style='vertical-align: top; width:40%;'>
- <table summary='{t}Filter properties{/t}'>
- <tr>
- <td>
- <label for='name'>{t}Name{/t}</label>
- </td>
- <td>
- <input type='text' name='name' id='name' value='{$name}'>
- </td>
- </tr>
- <tr>
- <td>
- <label for='description'>{t}Description{/t}</label>
- </td>
- <td>
- <input type='text' name='description' id='description' value='{$description}'>
- </td>
- </tr>
- </table>
-
- <br>
-
- <input type='checkbox' name='shareFilter' value='1' {if $share} checked {/if}>
- {t}Public visible{/t}
-
- <br>
-
- <input type='checkbox' name='enableFilter' value='1' {if $enable} checked {/if}>
- {t}Enabled{/t}
-
- </td>
- <td style='vertical-align: top;'>
- <label for='usedCategory'>{t}Affects the following categories{/t}</label><br>
- <select id='usedCategory' name='usedCategory[]' size='4' multiple style='width:100%;'>
- {html_options options=$selectedCategories}
- </select>
- <br>
- <select id='availableCategory' name='availableCategory'
- onChange="$('manualCategory').value=$('availableCategory').options[$('availableCategory').selectedIndex].value">
- <option value=''> </option>
- {html_options values=$availableCategories output=$availableCategories}
- </select>
- <input type='text' id='manualCategory' name='manualCategory' value=''>
- <button type='submit' name='addCategory'>{msgPool type='addButton'}</button>
- <button type='submit' name='delCategory'>{msgPool type='delButton'}</button>
- </td>
- </tr>
-</table>
-
-<hr>
-
-<textarea name='filter' id='filter' cols="0" style='width:100%; height: 100px;'>{$filter}</textarea>
-
-<hr>
-
-<input type='hidden' value='1' name='filterEditorEntry'>
-
-<div class="plugin-actions">
- <button type='submit' name='saveFilterSettings'>{msgPool type='saveButton'}</button>
- <button type='submit' name='cancelFilterSettings'>{msgPool type='cancelButton'}</button>
-</div>
diff --git a/gosa-core/ihtml/themes/modern/userFilter.tpl b/gosa-core/ihtml/themes/modern/userFilter.tpl
--- /dev/null
@@ -0,0 +1,14 @@
+<h3>{t}Filter editor{/t}</h3>
+
+<hr>
+
+{t}List of configured filters{/t}
+{$list}
+<button type='submit' name='addFilter'>{msgPool type='addButton'}</button>
+
+<hr>
+
+<div class="plugin-actions">
+ <button type='submit' name='saveFilter'>{msgPool type='saveButton'}</button>
+ <button type='submit' name='cancelFilter'>{msgPool type='cancelButton'}</button>
+</div>
diff --git a/gosa-core/ihtml/themes/modern/userFilterEditor.tpl b/gosa-core/ihtml/themes/modern/userFilterEditor.tpl
--- /dev/null
@@ -0,0 +1,67 @@
+<h3>{t}Filter editor{/t}</h3>
+
+<hr>
+
+<table summary="{t}Filter editor{/t}" width="100%">
+ <tr>
+ <td style='vertical-align: top; width:40%;'>
+ <table summary='{t}Filter properties{/t}'>
+ <tr>
+ <td>
+ <label for='name'>{t}Name{/t}</label>
+ </td>
+ <td>
+ <input type='text' name='name' id='name' value='{$name}'>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <label for='description'>{t}Description{/t}</label>
+ </td>
+ <td>
+ <input type='text' name='description' id='description' value='{$description}'>
+ </td>
+ </tr>
+ </table>
+
+ <br>
+
+ <input type='checkbox' name='shareFilter' value='1' {if $share} checked {/if}>
+ {t}Public visible{/t}
+
+ <br>
+
+ <input type='checkbox' name='enableFilter' value='1' {if $enable} checked {/if}>
+ {t}Enabled{/t}
+
+ </td>
+ <td style='vertical-align: top;'>
+ <label for='usedCategory'>{t}Affects the following categories{/t}</label><br>
+ <select id='usedCategory' name='usedCategory[]' size='4' multiple style='width:100%;'>
+ {html_options options=$selectedCategories}
+ </select>
+ <br>
+ <select id='availableCategory' name='availableCategory'
+ onChange="$('manualCategory').value=$('availableCategory').options[$('availableCategory').selectedIndex].value">
+ <option value=''> </option>
+ {html_options values=$availableCategories output=$availableCategories}
+ </select>
+ <input type='text' id='manualCategory' name='manualCategory' value=''>
+ <button type='submit' name='addCategory'>{msgPool type='addButton'}</button>
+ <button type='submit' name='delCategory'>{msgPool type='delButton'}</button>
+ </td>
+ </tr>
+</table>
+
+<hr>
+
+<textarea name='filter' id='filter' cols="0" style='width:100%; height: 100px;'>{$filter}</textarea>
+
+<hr>
+
+<input type='hidden' value='1' name='userFilterEditor'>
+
+<div class="plugin-actions">
+ <button type='submit' name='saveFilterSettings'>{msgPool type='saveButton'}</button>
+ <button type='submit' name='cancelFilterSettings'>{msgPool type='cancelButton'}</button>
+</div>
index 9c779ef2498a2374ad722410b3ef6ad556c59014..91ae157ebf49301b3acb8f5f493aa2988764abd1 100644 (file)
<?php
-class filterEditor extends plugin
+class userFilter extends plugin
{
protected $fitlers = array();
protected $availableCategories = array();
}
// Save modified filter entries (edit dialog)
- if(isset($_POST['saveFilterSettings']) && $this->dialog instanceOf filterEditEntry){
+ if(isset($_POST['saveFilterSettings']) && $this->dialog instanceOf userFilterEditor){
$this->dialog->save_object();
$msgs = $this->dialog->check();
if(count($msgs)){
if($action['action'] == 'edit' && count($action['targets']) == 1){
$key= $this->filterWidget->getKey($action['targets'][0]);
if(isset($this->filters[$key])){
- $this->dialog=new filterEditEntry($this->filters[$key], $this->availableCategories);
+ $this->dialog=new userFilterEditor($this->filters[$key], $this->availableCategories);
}
}
// Act on new requests
if(isset($_POST['addFilter'])){
- $this->dialog=new filterEditEntry(array(), $this->availableCategories);
+ $this->dialog=new userFilterEditor(array(), $this->availableCategories);
}
// Act on remove requests
}
// Display edit dialog
- if($this->dialog instanceOf filterEditEntry){
+ if($this->dialog instanceOf userFilterEditor){
$this->dialog->save_object();
return($this->dialog->execute());
}
$smarty = get_smarty();
$smarty->assign("list", $this->filterWidget->render());
- return($smarty->fetch(get_template_path('filterEditor.tpl', FALSE)));
+ return($smarty->fetch(get_template_path('userFilter.tpl', FALSE)));
}
diff --git a/gosa-core/include/class_filterEditorEntry.inc b/gosa-core/include/class_filterEditorEntry.inc
index 7d347558b5b2c62282e48238e0f6308b87168699..5719106bb021058caeac5dcf09b843c73ed27668 100644 (file)
<?php
-class filterEditEntry extends plugin
+class userFilterEditor extends plugin
{
// The original entry else array(), allows us to perform existence checks.
public $entry = array();
$smarty->assign('description', $this->description);
$smarty->assign('selectedCategories', $this->selectedCategories);
$smarty->assign('availableCategories', $this->availableCategories);
- return($smarty->fetch(get_template_path('filterEditorEntry.tpl', FALSE)));
+ return($smarty->fetch(get_template_path('userFilterEditor.tpl', FALSE)));
}
*/
function save_object()
{
- if(isset($_POST['filterEditorEntry'])){
+ if(isset($_POST['userFilterEditor'])){
// Get posted strings
foreach(array('name','description','filter') as $attr){
/*! \brief Transforms the entered values into a filter object (array) which is useable
- * for the filterEditor overview dialog.
+ * for the userFilter overview dialog.
* @return Returns transformed filter data.
*/
function save()
index aec1431f5efcb9cd5049287b743f9c22b8769bec..4604eecbe2bed502cf9de24c2976224f055e1bb4 100644 (file)
function editFilter()
{
$headpage = $this->getHeadpage();
- $this->dialogObject = new filterEditor($this->config,$headpage->categories);
+ $this->dialogObject = new userFilter($this->config,$headpage->categories);
}
function renderList()