diff options
author | Andrew Dolgov <[email protected]> | 2013-04-01 12:36:57 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-04-01 12:36:57 +0400 |
commit | 201bb1ca54c6227b7d6e7414303e357461892c2a (patch) | |
tree | a88e5d8a944b416d47cb7e11edda52c7bd1d04a9 /classes | |
parent | 9d76e754513ec1119a010ab2e9abcf9fb9df52d1 (diff) |
move batchSubscribe to pref-feeds
Diffstat (limited to 'classes')
-rw-r--r-- | classes/dlg.php | 48 | ||||
-rw-r--r-- | classes/pref/feeds.php | 52 |
2 files changed, 51 insertions, 49 deletions
diff --git a/classes/dlg.php b/classes/dlg.php index 32a3b230a..e56560a47 100644 --- a/classes/dlg.php +++ b/classes/dlg.php @@ -268,53 +268,5 @@ class Dlg extends Handler_Protected { } - function batchSubscribe() { - print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">"; - print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"batchaddfeeds\">"; - - print "<table width='100%'><tr><td> - ".__("Add one valid RSS feed per line (no feed detection is done)")." - </td><td align='right'>"; - if (get_pref($this->link, 'ENABLE_FEED_CATS')) { - print __('Place in category:') . " "; - print_feed_cat_select($this->link, "cat", false, 'dojoType="dijit.form.Select"'); - } - print "</td></tr><tr><td colspan='2'>"; - print "<textarea - style='font-size : 12px; width : 100%; height: 200px;' - placeHolder=\"".__("Feeds to subscribe, One per line")."\" - dojoType=\"dijit.form.SimpleTextarea\" required=\"1\" name=\"feeds\"></textarea>"; - - print "</td></tr><tr><td colspan='2'>"; - - print "<div id='feedDlg_loginContainer' style='display : none'> - " . - " <input dojoType=\"dijit.form.TextBox\" name='login'\" - placeHolder=\"".__("Login")."\" - style=\"width : 10em;\"> ". - " <input - placeHolder=\"".__("Password")."\" - dojoType=\"dijit.form.TextBox\" type='password' - style=\"width : 10em;\" name='pass'\">". - "</div>"; - - print "</td></tr><tr><td colspan='2'>"; - - print "<div style=\"clear : both\"> - <input type=\"checkbox\" name=\"need_auth\" dojoType=\"dijit.form.CheckBox\" id=\"feedDlg_loginCheck\" - onclick='checkboxToggleElement(this, \"feedDlg_loginContainer\")'> - <label for=\"feedDlg_loginCheck\">". - __('Feeds require authentication.')."</div>"; - - print "</form>"; - - print "</td></tr></table>"; - - print "<div class=\"dlgButtons\"> - <button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('batchSubDlg').execute()\">".__('Subscribe')."</button> - <button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('batchSubDlg').hide()\">".__('Cancel')."</button> - </div>"; - } - } ?> diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index 1983987ab..e48953e94 100644 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -3,7 +3,8 @@ class Pref_Feeds extends Handler_Protected { function csrf_ignore($method) { $csrf_ignored = array("index", "getfeedtree", "add", "editcats", "editfeed", - "savefeedorder", "uploadicon", "feedswitherrors", "inactivefeeds"); + "savefeedorder", "uploadicon", "feedswitherrors", "inactivefeeds", + "batchsubscribe"); return array_search($method, $csrf_ignored) !== false; } @@ -1749,5 +1750,54 @@ class Pref_Feeds extends Handler_Protected { } } + function batchSubscribe() { + print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">"; + print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"batchaddfeeds\">"; + + print "<table width='100%'><tr><td> + ".__("Add one valid RSS feed per line (no feed detection is done)")." + </td><td align='right'>"; + if (get_pref($this->link, 'ENABLE_FEED_CATS')) { + print __('Place in category:') . " "; + print_feed_cat_select($this->link, "cat", false, 'dojoType="dijit.form.Select"'); + } + print "</td></tr><tr><td colspan='2'>"; + print "<textarea + style='font-size : 12px; width : 100%; height: 200px;' + placeHolder=\"".__("Feeds to subscribe, One per line")."\" + dojoType=\"dijit.form.SimpleTextarea\" required=\"1\" name=\"feeds\"></textarea>"; + + print "</td></tr><tr><td colspan='2'>"; + + print "<div id='feedDlg_loginContainer' style='display : none'> + " . + " <input dojoType=\"dijit.form.TextBox\" name='login'\" + placeHolder=\"".__("Login")."\" + style=\"width : 10em;\"> ". + " <input + placeHolder=\"".__("Password")."\" + dojoType=\"dijit.form.TextBox\" type='password' + style=\"width : 10em;\" name='pass'\">". + "</div>"; + + print "</td></tr><tr><td colspan='2'>"; + + print "<div style=\"clear : both\"> + <input type=\"checkbox\" name=\"need_auth\" dojoType=\"dijit.form.CheckBox\" id=\"feedDlg_loginCheck\" + onclick='checkboxToggleElement(this, \"feedDlg_loginContainer\")'> + <label for=\"feedDlg_loginCheck\">". + __('Feeds require authentication.')."</div>"; + + print "</form>"; + + print "</td></tr></table>"; + + print "<div class=\"dlgButtons\"> + <button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('batchSubDlg').execute()\">".__('Subscribe')."</button> + <button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('batchSubDlg').hide()\">".__('Cancel')."</button> + </div>"; + } + + } ?> |