mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Use select fields to input host in WebAdmin Backup (#3000)
This commit is contained in:
parent
94d50a447d
commit
1fd75265d6
@ -1292,9 +1292,7 @@ get_node(global, Node, [<<"backup">>], Query, Lang) ->
|
|||||||
[?CT(?T("Export data of users in a host to PIEFXIS "
|
[?CT(?T("Export data of users in a host to PIEFXIS "
|
||||||
"files (XEP-0227):")),
|
"files (XEP-0227):")),
|
||||||
?C(<<" ">>),
|
?C(<<" ">>),
|
||||||
?INPUT(<<"text">>,
|
make_select_host(Lang, <<"export_piefxis_host_dirhost">>)]),
|
||||||
<<"export_piefxis_host_dirhost">>,
|
|
||||||
(ejabberd_config:get_myname()))]),
|
|
||||||
?XE(<<"td">>,
|
?XE(<<"td">>,
|
||||||
[?INPUT(<<"text">>,
|
[?INPUT(<<"text">>,
|
||||||
<<"export_piefxis_host_dirpath">>,
|
<<"export_piefxis_host_dirpath">>,
|
||||||
@ -1308,9 +1306,7 @@ get_node(global, Node, [<<"backup">>], Query, Lang) ->
|
|||||||
[?CT(?T("Export all tables as SQL queries "
|
[?CT(?T("Export all tables as SQL queries "
|
||||||
"to a file:")),
|
"to a file:")),
|
||||||
?C(<<" ">>),
|
?C(<<" ">>),
|
||||||
?INPUT(<<"text">>,
|
make_select_host(Lang, <<"export_sql_filehost">>)]),
|
||||||
<<"export_sql_filehost">>,
|
|
||||||
(ejabberd_config:get_myname()))]),
|
|
||||||
?XE(<<"td">>,
|
?XE(<<"td">>,
|
||||||
[?INPUT(<<"text">>,
|
[?INPUT(<<"text">>,
|
||||||
<<"export_sql_filepath">>,
|
<<"export_sql_filepath">>,
|
||||||
@ -1480,6 +1476,15 @@ node_parse_query(Node, Query) ->
|
|||||||
end
|
end
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
make_select_host(Lang, Name) ->
|
||||||
|
?XAE(<<"select">>,
|
||||||
|
[{<<"name">>, Name}],
|
||||||
|
(lists:map(fun (Host) ->
|
||||||
|
?XACT(<<"option">>,
|
||||||
|
([{<<"value">>, Host}]), Host)
|
||||||
|
end,
|
||||||
|
ejabberd_config:get_option(hosts)))).
|
||||||
|
|
||||||
db_storage_select(ID, Opt, Lang) ->
|
db_storage_select(ID, Opt, Lang) ->
|
||||||
?XAE(<<"select">>,
|
?XAE(<<"select">>,
|
||||||
[{<<"name">>, <<"table", ID/binary>>}],
|
[{<<"name">>, <<"table", ID/binary>>}],
|
||||||
|
Loading…
Reference in New Issue
Block a user