forked from sch/Slixfeed
Remove var from fixed fields
Since they don't need to get submitted back and are mostly just titles. May want to consider https://xmpp.org/extensions/xep-0141.html in the future
This commit is contained in:
parent
e8d5f082d0
commit
2fa3173031
1 changed files with 7 additions and 9 deletions
|
@ -736,23 +736,22 @@ class Slixfeed(slixmpp.ClientXMPP):
|
||||||
title = title[0]
|
title = title[0]
|
||||||
form = self['xep_0004'].make_form('form', 'Subscription editor')
|
form = self['xep_0004'].make_form('form', 'Subscription editor')
|
||||||
form['instructions'] = '📂️ Editing subscription #{}'.format(feed_id)
|
form['instructions'] = '📂️ Editing subscription #{}'.format(feed_id)
|
||||||
form.add_field(var='properties',
|
form.add_field(ftype='fixed',
|
||||||
ftype='fixed',
|
|
||||||
value='Properties')
|
value='Properties')
|
||||||
form.add_field(var='name',
|
form.add_field(var='name',
|
||||||
ftype='text-single',
|
ftype='text-single',
|
||||||
label='Name',
|
label='Name',
|
||||||
value=title)
|
value=title)
|
||||||
# NOTE This does not look good in Gajim
|
# NOTE This does not look good in Gajim
|
||||||
# options = form.add_field(var='url',
|
#url = form.add_field(ftype='fixed',
|
||||||
# ftype='fixed',
|
# value=url)
|
||||||
# value=url)
|
#url['validate']['datatype'] = 'xs:anyURI'
|
||||||
|
|
||||||
form.add_field(var='url',
|
form.add_field(var='url',
|
||||||
ftype='text-single',
|
ftype='text-single',
|
||||||
label='URL',
|
label='URL',
|
||||||
value=url)
|
value=url)
|
||||||
form.add_field(var='options',
|
form.add_field(ftype='fixed',
|
||||||
ftype='fixed',
|
|
||||||
value='Options')
|
value='Options')
|
||||||
options = form.add_field(var='action',
|
options = form.add_field(var='action',
|
||||||
ftype='list-single',
|
ftype='list-single',
|
||||||
|
@ -779,8 +778,7 @@ class Slixfeed(slixmpp.ClientXMPP):
|
||||||
num = str(i)
|
num = str(i)
|
||||||
options.addOption(num, num)
|
options.addOption(num, num)
|
||||||
i += 1
|
i += 1
|
||||||
form.add_field(var='labels',
|
form.add_field(ftype='fixed',
|
||||||
ftype='fixed',
|
|
||||||
value='Labels')
|
value='Labels')
|
||||||
options = form.add_field(var='category',
|
options = form.add_field(var='category',
|
||||||
ftype='list-single',
|
ftype='list-single',
|
||||||
|
|
Loading…
Reference in a new issue