|
|
@@ -100,7 +100,6 @@ def mgmt():
|
|
|
access_token = current_app.config['ACCESS_TOKEN']
|
|
|
kofi_token = current_app.config['KOFI_TOKEN']
|
|
|
kofi_integration = current_app.config['KOFI_INTEGRATION']
|
|
|
- kofi_logos = kofi_pngs()
|
|
|
announce_enable = current_app.config['ANNOUNCE_ENABLE']
|
|
|
announce_interval = current_app.config['ANNOUNCE_INTERVAL']
|
|
|
announcements = current_app.config['ANNOUNCEMENTS']
|
|
|
@@ -130,7 +129,6 @@ def mgmt():
|
|
|
prefix=current_app.config['PREFIX'],
|
|
|
kofi_settings=current_app.config['KOFI_SETTINGS'],
|
|
|
kofi_integration=kofi_integration,
|
|
|
- kofi_logos=kofi_logos,
|
|
|
announcements=announcements,
|
|
|
users=users,
|
|
|
utc_timezone=utc_timezone,
|
|
|
@@ -307,7 +305,10 @@ def edit(reward_name):
|
|
|
reread_goals()
|
|
|
if reward_data['type'] == 'vote':
|
|
|
reread_votes()
|
|
|
- return redirect(url_for('web_panels.mgmt', activeTab='managerewards'))
|
|
|
+ if reward_data['type'] == 'category':
|
|
|
+ return redirect(url_for('web_panels.mgmt', activeTab='categories'))
|
|
|
+ else:
|
|
|
+ return redirect(url_for('web_panels.mgmt', activeTab='managerewards'))
|
|
|
|
|
|
return render_template('edit.html',
|
|
|
all_cats=all_cats,
|
|
|
@@ -374,13 +375,10 @@ def ksettings():
|
|
|
enable_subs = 'enable_subs' in request.form
|
|
|
sub_points = int(request.form['sub_points'])
|
|
|
kofi_url = request.form['kofi_url']
|
|
|
- kofi_logo = request.form.get('kofi_logo')
|
|
|
-
|
|
|
kofi_settings_dict['donations'] = enable_donations
|
|
|
kofi_settings_dict['subs'] = enable_subs
|
|
|
kofi_settings_dict['sub_points'] = sub_points
|
|
|
kofi_settings_dict['kofi_url'] = kofi_url
|
|
|
- kofi_settings_dict['kofi_logo'] = kofi_logo
|
|
|
if save_kofi_settings(kofi_settings_dict):
|
|
|
current_app.logger.info(f'Saved Kofi settings')
|
|
|
|
|
|
@@ -467,6 +465,7 @@ def add(reward_type):
|
|
|
inactive_categories = current_app.config['INACTIVE_CAT']
|
|
|
inactive_categories.append(name) # Add it to the INACTIVE_CAT variable
|
|
|
reread_categories() # Write it to categories.py
|
|
|
+ return redirect(url_for('web_panels.mgmt', activeTab='categories'))
|
|
|
return redirect(url_for('web_panels.mgmt', activeTab='managerewards'))
|
|
|
|
|
|
return render_template('add.html',
|
|
|
@@ -548,7 +547,7 @@ def rereadv():
|
|
|
@requires_login
|
|
|
def clearfulfilled():
|
|
|
if clear_fulfilled_rewards():
|
|
|
- current_app.logger.info('Cleared fulfilled rewards.')
|
|
|
+ current_app.logger.info('Cleared fulfilled rewards.')
|
|
|
return redirect(url_for('web_panels.mgmtqueue'))
|
|
|
|
|
|
|