Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge pull request #2 from computationalSocialDynamics/feature_image_… #2

Open
wants to merge 84 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
869712c
Merge pull request #2 from computationalSocialDynamics/feature_image_…
computationalSocialDynamicspsu Nov 27, 2018
e2da97e
Update settings.py
computationalSocialDynamicspsu Nov 28, 2018
abb8948
Update Procfile
banrahan Nov 29, 2018
1efac77
Merge pull request #3 from banrahan/patch-1
wenhuizhang Nov 30, 2018
ec0d16c
center removed
Dec 12, 2018
ac5d71c
center removed
Dec 12, 2018
b4c16bd
js moved down
Dec 12, 2018
848780e
js moved down
Dec 12, 2018
67384f1
img style change
Dec 12, 2018
12e8c70
img style change
Dec 12, 2018
9ce4b73
img style change
Dec 12, 2018
8380fae
Delete 1.png
computationalSocialDynamicspsu Dec 19, 2018
a3db3db
Add files via upload
computationalSocialDynamicspsu Dec 19, 2018
32c1ec5
Delete 1.png
computationalSocialDynamicspsu Dec 19, 2018
0ecdee6
Add files via upload
computationalSocialDynamicspsu Dec 19, 2018
f72b442
Update profile.html
computationalSocialDynamicspsu Jan 19, 2019
e7ed3ff
Update profile.html
computationalSocialDynamicspsu Jan 19, 2019
172c2cf
Update pages.html
computationalSocialDynamicspsu Jan 19, 2019
15e5add
Update pages.html
computationalSocialDynamicspsu Jan 23, 2019
991fb96
Add files via upload
computationalSocialDynamicspsu Jan 23, 2019
3471b57
Delete 1.png
computationalSocialDynamicspsu Jan 23, 2019
07c1a20
Delete 1.a1b7bd2da96f.png
computationalSocialDynamicspsu Jan 23, 2019
2e39a7d
Add files via upload
computationalSocialDynamicspsu Jan 23, 2019
ce77dc9
moving images arround
banrahan Jan 23, 2019
7149709
removing some annotations from extra directory
banrahan Jan 23, 2019
7623c6f
changing file back
banrahan Jan 23, 2019
5798a23
Update model_form_upload.html
computationalSocialDynamicspsu Jan 25, 2019
4413f8c
Update model_form_upload.html
computationalSocialDynamicspsu Jan 25, 2019
68b69bb
Update model_form_upload.html
computationalSocialDynamicspsu Jan 25, 2019
d5e81fb
Update model_form_upload.html
computationalSocialDynamicspsu Jan 25, 2019
98e568c
Update model_form_upload.html
computationalSocialDynamicspsu Jan 25, 2019
38260f6
Update views.py
computationalSocialDynamicspsu Jan 25, 2019
c348d0d
Update model_form_upload.html
computationalSocialDynamicspsu Jan 25, 2019
8dd0a72
Update views.py
computationalSocialDynamicspsu Jan 25, 2019
637587a
Update views.py
computationalSocialDynamicspsu Jan 25, 2019
2531ac0
Update login.html
computationalSocialDynamicspsu Jan 25, 2019
2d12e82
Update login.html
computationalSocialDynamicspsu Jan 25, 2019
7c02d85
Update login.html
computationalSocialDynamicspsu Jan 25, 2019
e44dbef
Update logout.html
computationalSocialDynamicspsu Jan 28, 2019
e771e31
Update login.html
computationalSocialDynamicspsu Jan 28, 2019
a155279
Update views.py
computationalSocialDynamicspsu Jan 28, 2019
bb89f96
Update views.py
computationalSocialDynamicspsu Jan 28, 2019
cecaf48
Update views.py
computationalSocialDynamicspsu Jan 28, 2019
618c80a
Update views.py
computationalSocialDynamicspsu Jan 28, 2019
045bb85
Update views.py
computationalSocialDynamicspsu Jan 28, 2019
c16b639
Update login.html
computationalSocialDynamicspsu Jan 28, 2019
5d4e8a7
Update login.html
computationalSocialDynamicspsu Jan 28, 2019
e84b453
Update finished.html
computationalSocialDynamicspsu Jan 28, 2019
c13422d
Delete views.py
computationalSocialDynamicspsu Jan 30, 2019
f3c4fb0
Add files via upload
computationalSocialDynamicspsu Jan 30, 2019
adbf23b
Add files via upload
computationalSocialDynamicspsu Jan 30, 2019
900d652
Update models.py
computationalSocialDynamicspsu Sep 12, 2019
b298ddc
Update models.py
computationalSocialDynamicspsu Sep 12, 2019
6cf756b
Update models.py
computationalSocialDynamicspsu Sep 13, 2019
077f90e
Update models.py
computationalSocialDynamicspsu Sep 13, 2019
c2ed971
Update models.py
computationalSocialDynamicspsu Sep 13, 2019
47e7796
Update models.py
computationalSocialDynamicspsu Sep 13, 2019
dba000a
Update models.py
computationalSocialDynamicspsu Sep 13, 2019
005462c
Update models.py
computationalSocialDynamicspsu Sep 13, 2019
24a9d6d
try12
computationalSocialDynamicspsu Sep 24, 2019
3f13821
change to fixed 0.5
computationalSocialDynamicspsu Sep 24, 2019
ee66ffb
try13
computationalSocialDynamicspsu Sep 24, 2019
ae89e6c
try14
computationalSocialDynamicspsu Sep 24, 2019
9f69107
try15
computationalSocialDynamicspsu Sep 24, 2019
cc3c1ca
try16
computationalSocialDynamicspsu Sep 24, 2019
b7ef17a
change to the orginial
computationalSocialDynamicspsu Sep 24, 2019
5f0dc8b
orginial
computationalSocialDynamicspsu Sep 24, 2019
b97e499
change
computationalSocialDynamicspsu Sep 24, 2019
aaae412
delete the default
computationalSocialDynamicspsu Sep 24, 2019
8284e74
upload
computationalSocialDynamicspsu Sep 24, 2019
a8068fc
Update models.py
computationalSocialDynamicspsu Oct 4, 2019
87792de
Update models.py
computationalSocialDynamicspsu Oct 4, 2019
23b3371
Update models.py
computationalSocialDynamicspsu Oct 4, 2019
f2ef6a5
Update getValues.py
computationalSocialDynamicspsu Oct 4, 2019
5e21ba8
Update getValues.py
computationalSocialDynamicspsu Oct 4, 2019
cdf45a4
Update models.py
computationalSocialDynamicspsu Oct 4, 2019
b0dfabc
Update models.py
computationalSocialDynamicspsu Oct 11, 2019
ff65c04
change the bots value
computationalSocialDynamicspsu Oct 11, 2019
9702c96
Update models.py
computationalSocialDynamicspsu Oct 11, 2019
9f790a3
Update models.py
computationalSocialDynamicspsu Oct 11, 2019
d6e5fac
Update models.py
computationalSocialDynamicspsu Oct 24, 2019
3039bfa
Update models.py
computationalSocialDynamicspsu Oct 28, 2019
e05c82e
Update models.py
computationalSocialDynamicspsu Oct 28, 2019
99fd015
Update models.py
computationalSocialDynamicspsu Nov 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions MyApp/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import os


# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

Expand All @@ -25,8 +24,10 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['127.0.0.1','floating-bastion-32116.herokuapp.com', 'localhost']

ALLOWED_HOSTS = [
'127.0.0.1', 'floating-bastion-32116.herokuapp.com', 'localhost',
'fairness-two.herokuapp.com'
]

# Application definition

Expand Down Expand Up @@ -93,20 +94,23 @@

AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
'NAME':
'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
'NAME':
'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
'NAME':
'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
'NAME':
'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]


# Internationalization
# https://docs.djangoproject.com/en/1.11/topics/i18n/

Expand All @@ -120,7 +124,6 @@

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.11/howto/static-files/
PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Expand All @@ -130,8 +133,5 @@
STATIC_URL = '/static/'

# Extra places for collectstatic to find static files.
STATICFILES_DIRS = (
os.path.join(PROJECT_ROOT, 'accounts/static/images'),
)
STATICFILES_DIRS = (os.path.join(PROJECT_ROOT, 'static/images'), )
STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'

3 changes: 2 additions & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
web: gunicorn MyApp.wsgi --log-file -
release: python manage.py migrate
web: gunicorn MyApp.wsgi --log-file -
1 change: 1 addition & 0 deletions accounts/algorithms/Game.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def getRobot(request, toggle):
uservalues = UserValues.objects.get(user=user)
robots = Robots.objects.filter(user=user)
current_robot = random.choice(robots)
#current_robot=robots
if toggle == 1:
offeror = current_robot
acceptor = uservalues
Expand Down
2 changes: 2 additions & 0 deletions accounts/algorithms/getValues.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ def getDefaultUserValues():
dict = {}
user_comfort = round(random(), 5)
user_discretized_comfort = round(user_comfort*4)/4
#user_discretized_comfort = 0.5

general_loss = user_comfort - user_discretized_comfort
offeror_positive_loss_count = offeror_negative_loss_count = acceptor_positive_loss_count = acceptor_negative_loss_count = 0
Expand All @@ -17,6 +18,7 @@ def getDefaultUserValues():
offeror_negative_loss = acceptor_negative_loss = abs(general_loss)

user_stubbornness = round(random(), 5)
#user_stubbornness = 0.5

dict['comfort'] = user_discretized_comfort
dict['stubbornness'] = user_stubbornness
Expand Down
45 changes: 34 additions & 11 deletions accounts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from accounts.algorithms import getValues

# Create your models here.

#try to update
'''basic profile model for a user'''
class UserProfile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
Expand All @@ -17,8 +17,12 @@ class UserProfile(models.Model):
class UserValues(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
firstLogin = models.BooleanField(default=True)
comfort = models.FloatField(default=0.0)
stubbornness = models.FloatField(default=0.0)
STUB_NEUR=0.5
COMFORT_NEU=0.5
COMFORT_CHOICES=[(COMFORT_NEU,'Neur')]
STUB_CHOICES=[(STUB_NEUR,'Neu')]
comfort = models.FloatField(choices=COMFORT_CHOICES)
stubbornness = models.FloatField(choices=STUB_CHOICES)
neighbors = models.TextField(default='')
offeror_values = models.TextField(default='')
user_offeror_values = models.TextField(default='')
Expand Down Expand Up @@ -46,10 +50,24 @@ class UserValues(models.Model):
last_robot_value = models.FloatField(default=0)

'''the robots/bots who will play with the users'''

class Robots(models.Model):
COMFORT_NEU=0.5
#COMFORT_MAX=1.0
#OMFORT_CHOICES=((0.5,'Neur'))
STUB_NEUR=0.5
#STUB_MIN=0.0
#STUB_CHOICES=((0.5,'Neur'))
COMFORT_CHOICES=[(COMFORT_NEU,'Neur')]
STUB_CHOICES=[(STUB_NEUR,'Neu')]

user = models.ForeignKey(User, on_delete=models.CASCADE)
comfort = models.FloatField(default=0.0)
stubbornness = models.FloatField(default=0.0)
#comfort = models.FloatField(default=0.0)
comfort = models.FloatField(choices=COMFORT_CHOICES, default='Neur')

#stubbornness = models.FloatField(default=0.0)
stubbornness = models.FloatField(choices=STUB_CHOICES, default='Neu')

neighbors = models.TextField(default='')
offeror_values = models.TextField(default='')
acceptor_values = models.TextField(default='')
Expand Down Expand Up @@ -84,19 +102,24 @@ def create_profile(sender, instance, created, **kwargs):
lastName = instance.last_name)
dict = getValues.getDefaultUserValues()
values_profile = UserValues.objects.create(user = instance, comfort = dict['comfort'],
stubbornness = dict['stubbornness'], offeror_values=str(dict['comfort']),
acceptor_values = str(dict['comfort']), user_offeror_values=str(dict['comfort']),
user_acceptor_values = str(dict['comfort']), offeror_positive_loss_count = dict['oplc'],
stubbornness = dict['stubbornness'],
offeror_values=str(dict['comfort']),
acceptor_values = str(dict['comfort']),
user_offeror_values=str(dict['comfort']),
user_acceptor_values = str(dict['comfort']),
offeror_positive_loss_count = dict['oplc'],
offeror_negative_loss_count = dict['onlc'], acceptor_positive_loss_count = dict['aplc'],
acceptor_negative_loss_count = dict['anlc'], offeror_positive_loss = dict['opl'],
offeror_negative_loss = dict['onl'], acceptor_positive_loss = dict['apl'],
acceptor_negative_loss = dict['anl'])

for i in range (0,10):
dict = getValues.getDefaultUserValues()
robot = Robots.objects.create(user = instance, comfort = dict['comfort'],
stubbornness = dict['stubbornness'], offeror_values=str(dict['comfort']),
acceptor_values = str(dict['comfort']),offeror_positive_loss_count = dict['oplc'],
robot = Robots.objects.create(user = instance, comfort = 0.2, #dict['comfort'],
stubbornness = 0.8, #dict['stubbornness'],
offeror_values=str(0.2),#str(dict['comfort']),
acceptor_values =str(0.2), #str(dict['comfort']),
offeror_positive_loss_count = dict['oplc'],
offeror_negative_loss_count = dict['onlc'], acceptor_positive_loss_count = dict['aplc'],
acceptor_negative_loss_count = dict['anlc'], offeror_positive_loss = dict['opl'],
offeror_negative_loss = dict['onl'], acceptor_positive_loss = dict['apl'],
Expand Down
Binary file added accounts/static/images/.1.a1b7bd2da96f.png.icloud
Binary file not shown.
Binary file added accounts/static/images/.10.95540c125e71.png.icloud
Binary file not shown.
Binary file added accounts/static/images/.10.png.icloud
Binary file not shown.
Binary file added accounts/static/images/.3.ec976afe3115.png.icloud
Binary file not shown.
Binary file added accounts/static/images/.3.png.icloud
Binary file not shown.
Binary file added accounts/static/images/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified accounts/static/images/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed accounts/static/images/10.png
Binary file not shown.
Binary file added accounts/static/images/11.428564d09c81.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added accounts/static/images/12.f60c72f44885.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added accounts/static/images/2.497faf6bf03f.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed accounts/static/images/3.png
Binary file not shown.
Binary file added accounts/static/images/4.3f1e188f978c.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added accounts/static/images/5.78ec7c79cd39.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added accounts/static/images/6.edca85b9d316.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added accounts/static/images/7.e702e2fa260f.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added accounts/static/images/8.0f491ba34a0c.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added accounts/static/images/9.7c1e696606e3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added accounts/static/images/family.9a0bbc0744bb.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 13 additions & 3 deletions accounts/static/images/imageTexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@
"42796962380": 12,
}

names = ['Monica', 'Chandler', 'Joey', 'Phoebe', 'Rachel', 'Ross', 'Eric', 'Sloan', 'Vince', 'Ari', 'Shauna', 'Amanda']
names = [
'Monica', 'Chandler', 'Joey', 'Phoebe', 'Rachel', 'Ross', 'Eric', 'Sloan',
'Vince', 'Ari', 'Shauna', 'Amanda'
]

settings = {
0: 'Private/Only Me',
Expand All @@ -54,22 +57,29 @@
0.75: 'Friends of Friends of Friends',
1: 'Public'
}


def getImageTexts():
return texts


def getNames():
return names


def getSettings():
return settings


def getFlickrIds():
return image_ids_flickr


def getExtensions():
return extensions


def getRole(imageId):
if imageId % 3 == 1: return "Friends"
elif imageId %3 == 2: return "Best Friends"
else: return "Family members"
elif imageId % 3 == 2: return "Best Friends"
else: return "Family members"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added accounts/static/images/network.4692317959d1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions accounts/templates/accounts/finished.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
{% block body %}
<div class="jumbotron">
<h1 class="display-3">Thank you!</h1>
<p class="lead">We are glad that you took out your precious time to complete the study for us.</p>
<p>You have completed your study!</p>
<p class="lead">We are glad that you took time to complete the study for us.</p>
<p>You have completed your study! Please fill this quick survey <a href="https://pennstate.qualtrics.com/jfe/form/SV_9TbYToErmlqMQHb" target=_blank> survey </a>. At the end of the survey you will be given
a code to put on AMAZON TURK. This is important to be paid and finish the study</p>
</div>
<div class="container">
<p><h2>Fun fact: During the study, you shared a total of {{ no_images }} posts and {{ failure_count }} were not published!</h2></p><hr>
Expand All @@ -23,4 +24,4 @@ <h1 class="display-3">Thank you!</h1>
<p><h4>You can logout now!</h4></p>
<a href="/accounts/logout/" class="btn btn-outline-info" role="button" aria-pressed="true">Logout</a></p>
</div>
{% endblock %}
{% endblock %}
10 changes: 6 additions & 4 deletions accounts/templates/accounts/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
{% block body %}
<div class="jumbotron">
<h1 class="display-3">Welcome!</h1>
<p class="lead">We are conducting this user study to investigate and explore how a user's data sharing privacy
preference evolve over time.</p>
<p class="lead">We are conducting this research study to investigate users' data sharing privacy
preferences.</p>
<p> Before logging in you must register. You can obtain the password FOR REGISTRATION upon completing this survey following
this <a href="https://pennstate.qualtrics.com/jfe/form/SV_0VxnXmKRSo1MIex" target="_blank"> link </a>
<hr>
<p>Thank you for agreeing to take part in our study.</p>


</div>
<div class="container">
Expand All @@ -37,4 +39,4 @@ <h1 class="display-3">Welcome!</h1>
</form>

</div>
{% endblock %}
{% endblock %}
4 changes: 2 additions & 2 deletions accounts/templates/accounts/logout.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<h1>Logged Out</h1>
</div>
<div class="container">
<p><h2>You have logged out!</h2></p><hr>
<p><h2>You have logged out! Bye!</h2></p><hr>
<p><a href="/accounts/login/" class="btn btn-outline-success" role="button" aria-pressed="true">Login Again</a>
</div>
{% endblock %}
{% endblock %}
65 changes: 37 additions & 28 deletions accounts/templates/accounts/model_form_upload.html
Original file line number Diff line number Diff line change
@@ -1,49 +1,45 @@
{% extends 'base.html' %}
{% block head %}
<title>Content</title>
````<style>
<style>
button {
cursor: pointer;
}
img {
border-style: none !important;
}
</style>
<script>
$( document ).ready(function() {
$('#privacy').hide()
$('#next').hide()
$('#Yes').click(function() {
$('#next').hide()
$('#privacy').show()
});
$('#No').click(function() {
$('#privacy').hide()
$('#next').show();
});
});
</script>


{% endblock %}
{% block body %}
<br><br><br>
<div class="container">
{% if form and not image_id %}
<!--<div class="alert alert-warning" role="alert">-->
<!--<strong>Warning!</strong> Please reload the page if you're not seeing the image after uploading!-->
<!--</div>-->
{% if error %}

{% if form and not image_id %}
<div class="alert alert-warning" role="alert">-->
<strong>Warning!</strong> Please reload the page if you're not seeing the image after uploading!-->
</div>
{% if error %}
<div class="alert alert-danger">
<strong>{{ error|escape }}</strong>
</div>
{% endif %}
<!--Please select a photo from the Flickr album and copy the link below after opening the photo.</p>-->

Please select a photo from the Flickr album and copy the link below after opening the photo.</p> -->

<p>Please select a photo you wish to share from the Flickr album and link to it below</p>
<p><a target="_blank" href="https://www.flickr.com/photos/166878378@N08/albums/72157701200346045" class="btn btn-info" role="button" aria-pressed="true">Go to album</a></p>
<p>Please note that we need you to post the URL or link of the photo; which will appear on the address bar (where you enter the website name) <b>after</b> you've opened the photo by clicking on it.</p>
<p><form method="post" name="photo">
<p><form method="post" name="photo">
{% csrf_token %}
{{ form.as_p }}
<button class="btn btn-info" type="submit" role="button" name="change" aria-pressed="true">Upload</button>
</form></p>
{% endif %}
{% if image_id %}

{% if image_id %}

<p>You are tagged in this photo with <b>{{ name }}</b> (one of your {{ role }}).</p>
<p>According to what you set for your privacy setting, this image will be shared with <b>{{ setting }}</b>.</p>
<p>If you wish to select a different setting than the default,
Expand All @@ -53,9 +49,9 @@

<!-- Modal -->

<div height="200" width="200">
<div>
{% load static %}
<center><img src="{% static imagePath %}" alt="My image" height="100%" width="500" /></center>
<img src="{% static imagePath %}" alt="My image" />
</div><br>
<!--<p>Would you like to share this photo?</p>-->

Expand All @@ -66,10 +62,10 @@
<a href="{% url 'upload' %}" class="btn btn-info">ReUpload</a>

</form></p>
{% endif %}
{% endif %}
{% if result %}
{% if 'pass' in result %}
<p>Yayy! <b>{{ name }}</b> accepted your request for tagging!</p>
<p>Great! <b>{{ name }}</b> accepted your request for tagging!</p>
<form method="post">
{% csrf_token %}
<b>Let's continue with the study!</b>
Expand Down Expand Up @@ -149,5 +145,18 @@ <h4 class="modal-title">Privacy Setting</h4>
</div>
</div>
</div>

<script>
$( document ).ready(function() {
$('#privacy').hide()
$('#next').hide()
$('#Yes').click(function() {
$('#next').hide()
$('#privacy').show()
});
$('#No').click(function() {
$('#privacy').hide()
$('#next').show();
});
});
</script>
{% endblock %}
Loading