-
-
Notifications
You must be signed in to change notification settings - Fork 775
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'kevin/new_kudos_form' into stable
- Loading branch information
Showing
13 changed files
with
383 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.slack--brand-tree { | ||
max-width:80%; | ||
margin: 0px auto; | ||
} | ||
|
||
|
||
h4 p { | ||
background-color: #fee856; | ||
padding: 5px 10px; | ||
} | ||
|
||
@media (max-width: 768px) { | ||
.form_container { | ||
padding-left: 1.6rem !important; | ||
padding-right: 1.6rem !important; | ||
} | ||
} | ||
|
||
@media (max-width: 992px) { | ||
.slack--brand-tree { | ||
max-width: 100%; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
$(document).ready(function() { | ||
$('#newkudos input.btn-go').click(function(e) { | ||
mixpanel.track('New Kudos Request', {}); | ||
setTimeout(function() { | ||
$('#newkudos input.btn-go').attr('disabled', 'disabled'); | ||
}, 1); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Generated by Django 2.2.3 on 2019-09-26 18:24 | ||
|
||
import django.contrib.postgres.fields | ||
import django.contrib.postgres.fields.jsonb | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import economy.models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('dashboard', '0053_auto_20190920_1816'), | ||
('kudos', '0006_token_override_display_name'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='TokenRequest', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('created_on', models.DateTimeField(db_index=True, default=economy.models.get_time)), | ||
('modified_on', models.DateTimeField(default=economy.models.get_time)), | ||
('name', models.CharField(db_index=True, max_length=255)), | ||
('description', models.TextField(default='', max_length=500)), | ||
('priceFinney', models.IntegerField(default=18)), | ||
('network', models.CharField(db_index=True, max_length=25)), | ||
('artist', models.CharField(max_length=255)), | ||
('platform', models.CharField(max_length=255)), | ||
('to_address', models.CharField(max_length=255)), | ||
('artwork_url', models.CharField(max_length=255)), | ||
('numClonesAllowed', models.IntegerField(default=18)), | ||
('metadata', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict, null=True)), | ||
('tags', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=200), blank=True, default=list, size=None)), | ||
('approved', models.BooleanField(default=True)), | ||
('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='token_requests', to='dashboard.Profile')), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.2.3 on 2019-09-26 19:13 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('kudos', '0007_tokenrequest'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='tokenrequest', | ||
name='processed', | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -428,6 +428,28 @@ def new_token_request(obj): | |
translation.activate(cur_language) | ||
|
||
|
||
def new_kudos_request(obj): | ||
to_email = '[email protected]' | ||
from_email = obj.profile.email | ||
cur_language = translation.get_language() | ||
try: | ||
setup_lang(to_email) | ||
subject = _("New Kudos Request") | ||
body_str = _("A new kudos request was completed. You may approve the kudos request here") | ||
body = f"{body_str}: https://gitcoin.co/{obj.admin_url} \n\n {obj.profile.email}" | ||
if not should_suppress_notification_email(to_email, 'faucet'): | ||
send_mail( | ||
from_email, | ||
to_email, | ||
subject, | ||
body, | ||
from_name=_("No Reply from Gitcoin.co"), | ||
categories=['admin', func_name()], | ||
) | ||
finally: | ||
translation.activate(cur_language) | ||
|
||
|
||
def warn_account_out_of_eth(account, balance, denomination): | ||
to_email = settings.PERSONAL_CONTACT_EMAIL | ||
from_email = settings.SERVER_EMAIL | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.