diff options
author | Andrew Dolgov <[email protected]> | 2019-02-20 14:37:59 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-02-20 14:37:59 +0300 |
commit | 4d9141d7623bc44b6d13aaa2b8b53d63b27819bd (patch) | |
tree | 10707a9dad640073dddaed11353633a55f32a48b /classes/pref/filters.php | |
parent | 6701497879d3e6c9e895cfcd56fb2d7a9297686d (diff) |
simplify dlgSec-related markup
Diffstat (limited to 'classes/pref/filters.php')
-rwxr-xr-x | classes/pref/filters.php | 77 |
1 files changed, 55 insertions, 22 deletions
diff --git a/classes/pref/filters.php b/classes/pref/filters.php index 9c2a7bf54..f5ad6ff72 100755 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -339,20 +339,22 @@ class Pref_Filters extends Handler_Protected { $inverse = $row["inverse"]; $title = htmlspecialchars($row["title"]); - print "<form id=\"filter_edit_form\" onsubmit='return false'>"; + print "<form id='filter_edit_form' onsubmit='return false'>"; print_hidden("op", "pref-filters"); print_hidden("id", "$filter_id"); print_hidden("method", "editSave"); print_hidden("csrf_token", $_SESSION['csrf_token']); - print "<div class=\"dlgSecHoriz\">".__("Caption")."</div>"; + print "<div class='dlgSecHoriz'>".__("Caption")."</div>"; + print "<div class='dlgSecCont'>"; print "<input required=\"true\" dojoType=\"dijit.form.ValidationTextBox\" style=\"width : 20em;\" name=\"title\" value=\"$title\">"; print "</div>"; - print "<div class=\"dlgSecHoriz\">".__("Match")."</div>"; + print "<div class='dlgSecHoriz'>".__("Match")."</div>"; + print "<div class='dlgSecCont'>"; print "<div dojoType=\"dijit.Toolbar\">"; @@ -410,7 +412,9 @@ class Pref_Filters extends Handler_Protected { print "</div>"; - print "<div class=\"dlgSecHoriz\">".__("Apply actions")."</div>"; + print "<div class='dlgSecHoriz'>".__("Apply actions")."</div>"; + + print "<div class='dlgSecCont'>"; print "<div dojoType=\"dijit.Toolbar\">"; @@ -454,14 +458,18 @@ class Pref_Filters extends Handler_Protected { print "</div>"; + print "<div class='dlgSec'>".__("Options")."</div>"; + print "<div class='dlgSecCont'>"; + if ($enabled) { $checked = "checked=\"1\""; } else { $checked = ""; } - print "<input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"enabled\" id=\"enabled\" $checked> - <label for=\"enabled\">".__('Enabled')."</label>"; + print "<fieldset class='narrow'>"; + print "<label class='checkbox'><input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"enabled\" id=\"enabled\" $checked> + ".__('Enabled')."</label>"; if ($match_any_rule) { $checked = "checked=\"1\""; @@ -469,8 +477,12 @@ class Pref_Filters extends Handler_Protected { $checked = ""; } - print "<br/><input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"match_any_rule\" id=\"match_any_rule\" $checked> - <label for=\"match_any_rule\">".__('Match any rule')."</label>"; + print "</fieldset><fieldset class='narrow'>"; + + print "<label class='checkbox'><input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"match_any_rule\" id=\"match_any_rule\" $checked> + ".__('Match any rule')."</label>"; + + print "</fieldset><fieldset class='narrow'>"; if ($inverse) { $checked = "checked=\"1\""; @@ -478,10 +490,12 @@ class Pref_Filters extends Handler_Protected { $checked = ""; } - print "<br/><input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"inverse\" id=\"inverse\" $checked> - <label for=\"inverse\">".__('Inverse matching')."</label>"; + print "<label class='checkbox'><input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"inverse\" id=\"inverse\" $checked> + ".__('Inverse matching')."</label>"; - print "<p/>"; + print "</fieldset>"; + + print "</div>"; print "<div class=\"dlgButtons\">"; @@ -835,11 +849,15 @@ class Pref_Filters extends Handler_Protected { print_hidden("method", "add"); print_hidden("csrf_token", $_SESSION['csrf_token']); - print "<div class=\"dlgSecHoriz\">".__("Caption")."</div>"; + print "<div class='dlgSecHoriz'>".__("Caption")."</div>"; + print "<div class='dlgSecCont'>"; print "<input required=\"true\" dojoType=\"dijit.form.ValidationTextBox\" style=\"width : 20em;\" name=\"title\" value=\"\">"; + print "</div>"; - print "<div class=\"dlgSecHoriz\">".__("Match")."</div>"; + print "<div class='dlgSecHoriz'>".__("Match")."</div>"; + + print "<div class='dlgSecCont'>"; print "<div dojoType=\"dijit.Toolbar\">"; @@ -865,8 +883,11 @@ class Pref_Filters extends Handler_Protected { print "</ul>"; print "</div>"; + print "</div>"; - print "<div class=\"dlgSecHoriz\">".__("Apply actions")."</div>"; + print "<div class='dlgSecHoriz'>".__("Apply actions")."</div>"; + + print "<div class='dlgSecCont'>"; print "<div dojoType=\"dijit.Toolbar\">"; @@ -887,21 +908,33 @@ class Pref_Filters extends Handler_Protected { print "</div>"; + print "<ul id='filterDlg_Actions'>"; # print "<li>No actions</li>"; print "</ul>"; + print "</div>"; + + print "<div class='dlgSec'>".__("Options")."</div>"; + + print "<div class='dlgSecCont'>"; + print "<fieldset class='narrow'>"; -/* print "<div class=\"dlgSec\">".__("Options")."</div>"; - print "<div class=\"dlgSecCont\">"; */ + print "<label class='checkbox'><input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"enabled\" id=\"enabled\" checked=\"1\"> + ".__('Enabled')."</label>"; - print "<input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"enabled\" id=\"enabled\" checked=\"1\"> - <label for=\"enabled\">".__('Enabled')."</label>"; + print "</fieldset><fieldset class='narrow'>"; - print "<br/><input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"match_any_rule\" id=\"match_any_rule\"> - <label for=\"match_any_rule\">".__('Match any rule')."</label>"; + print "<label class='checkbox'><input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"match_any_rule\" id=\"match_any_rule\"> + ".__('Match any rule')."</label>"; - print "<br/><input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"inverse\" id=\"inverse\"> - <label for=\"inverse\">".__('Inverse matching')."</label>"; + print "</fieldset><fieldset class='narrow'>"; + + print "<label class='checkbox'><input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"inverse\" id=\"inverse\"> + ".__('Inverse matching')."</label>"; + + print "</fieldset>"; + + print "</div>"; // print "</div>"; |