mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-02-10 16:01:33 +00:00
implement instance adding and deleting
This commit is contained in:
@@ -990,6 +990,59 @@
|
||||
type=\"submit\">".
|
||||
__('Close this window')."</button>";
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
if ($id == "addInstance") {
|
||||
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-instances\">";
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"add\">";
|
||||
|
||||
print "<div class=\"dlgSec\">".__("Instance")."</div>";
|
||||
|
||||
print "<div class=\"dlgSecCont\">";
|
||||
|
||||
/* URL */
|
||||
|
||||
print __("URL:") . " ";
|
||||
|
||||
print "<input dojoType=\"dijit.form.ValidationTextBox\" required=\"1\"
|
||||
placeHolder=\"".__("Instance URL")."\"
|
||||
regExp='^(http|https)://.*'
|
||||
style=\"font-size : 16px; width: 20em\" name=\"access_url\">";
|
||||
|
||||
print "<hr/>";
|
||||
|
||||
$access_key = sha1(uniqid(rand(), true));
|
||||
|
||||
/* Access key */
|
||||
|
||||
print __("Access key:") . " ";
|
||||
|
||||
print "<input dojoType=\"dijit.form.ValidationTextBox\" required=\"1\"
|
||||
placeHolder=\"".__("Access key")."\"
|
||||
style=\"width: 20em\" name=\"access_key\" id=\"instance_add_key\"
|
||||
value=\"$access_key\">";
|
||||
|
||||
print "</div>";
|
||||
|
||||
print "<div class=\"dlgButtons\">
|
||||
<div style='float : left'>
|
||||
<button dojoType=\"dijit.form.Button\"
|
||||
onclick=\"return dijit.byId('instanceAddDlg').regenKey()\">".
|
||||
__('Generate new key')."</button>
|
||||
</div>
|
||||
<button dojoType=\"dijit.form.Button\"
|
||||
onclick=\"return dijit.byId('instanceAddDlg').execute()\">".
|
||||
__('Create link')."</button>
|
||||
<button dojoType=\"dijit.form.Button\"
|
||||
onclick=\"return dijit.byId('instanceAddDlg').hide()\"\">".
|
||||
__('Cancel')."</button></div>";
|
||||
|
||||
return;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
print "</dlg>";
|
||||
|
||||
Reference in New Issue
Block a user