Commit 8ef0791f authored by Timo Heikkilä's avatar Timo Heikkilä
Browse files

uusi päivitys

parent 4ea529d8
No preview for this file type
......@@ -5,17 +5,64 @@ from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_login import LoginManager
from flask_babel import Babel
from flask import request
from flask import session
from flask import flash
app = Flask(__name__)
app.config['BABEL_DEFAULT_LOCALE'] = 'en'
#app.config['BABEL_DEFAULT_LOCALE'] = 'fin'
#app.config['BABEL_TRANSLATION_DIRECTORIES'] ='C:/Users/Timo/git/pet-rating/app/translations'
babel = Babel(app)
@babel.localeselector
def get_locale():
if request.args.get('lang'):
session['lang'] = request.args.get('lang')
if session['lang'] == 'en':
session['language'] = 'English'
if session['lang'] == 'fi':
session['language'] = 'Finnish'
if session['lang'] == 'fa':
session['language'] = 'Persian'
if session['lang'] == 'el':
session['language'] = 'Greek'
if session['lang'] == 'it':
session['language'] = 'Italian'
if session['lang'] == 'zh':
session['language'] = 'Chinese'
return session.get('lang', 'en')
"""
@babel.localeselector
def get_locale():
if session:
return 'fi'
else:
return 'en'
"""
"""
@babel.localeselector
def get_locale():
return request.accept_languages.best_match(app.config['LANGUAGES'])
"""
return 'fin'
#mariabd mysql portti 3306 tarkista?
......
......@@ -5,8 +5,10 @@ from wtforms_sqlalchemy.fields import QuerySelectField
from flask_bootstrap import Bootstrap
from app.models import background_question
from wtforms import Form, TextField, TextAreaField, SubmitField, FieldList, FormField
from wtforms import Form, BooleanField, StringField, PasswordField, validators, RadioField
from wtforms import Form, BooleanField, StringField, PasswordField, validators, RadioField, IntegerField
from flask_wtf.file import FileField, FileAllowed, FileRequired
from flask_babel import _
from flask_babel import lazy_gettext as _l
class LoginForm(FlaskForm):
......@@ -31,13 +33,12 @@ class TaskForm(Form):
class ContinueTaskForm(FlaskForm):
participant_id = StringField('participant_id', validators=[DataRequired()])
submit = SubmitField('Continue rating')
submit = SubmitField( _l('Continue rating') )
class StartWithIdForm(FlaskForm):
participant_id = StringField('participant_id', validators=[DataRequired()])
submit = SubmitField('Start rating')
submit = SubmitField( _l('Start rating') )
class Questions(FlaskForm):
......@@ -80,7 +81,11 @@ class TestForm2(Form):
class CreateExperimentForm(Form):
name = StringField('Name', [validators.DataRequired()])
instruction = StringField('Instruction', [validators.DataRequired()])
creator_name = StringField('Creator_name', [validators.DataRequired()])
single_sentence_instruction = StringField('Single_sentence_instruction', [validators.DataRequired()])
short_instruction = TextAreaField('Short_instruction', [validators.DataRequired()])
instruction = TextAreaField('Instruction', [validators.DataRequired()])
consent_text = TextAreaField('Instruction', [validators.DataRequired()])
language = StringField('Language', [validators.DataRequired()])
submit = SubmitField('Send')
......@@ -88,10 +93,14 @@ class CreateExperimentForm(Form):
class EditExperimentForm(Form):
name = StringField('Name', [validators.DataRequired()])
instruction = StringField('Instruction', [validators.DataRequired()])
creator_name = StringField('Creator_name', [validators.DataRequired()])
instruction = TextAreaField('Instruction', [validators.DataRequired()])
consent_text = TextAreaField('Instruction', [validators.DataRequired()])
short_instruction = TextAreaField('Short_instruction', [validators.DataRequired()])
single_sentence_instruction = StringField('Single_sentece_instruction', [validators.DataRequired()])
language = SelectField('Language', choices=[
('Afrikanns', 'Afrikanns'), ('Albanian', 'Albanian'), ('Arabic', 'Arabic'), ('Armenian', 'Armenian'), ('Basque', 'Basque'), ('Bengali', 'Bengali'), ('Bulgarian', 'Bulgarian'),
('Catalan', 'Catalan'), ('Cambodian', 'Cambodian'), ('Chinese (Mandarin)', 'Chinese (Mandarin)'), ('Croation', 'Croation'), ('Czech', 'Czech'), ('Danish', 'Danish'),
('Catalan', 'Catalan'), ('Cambodian', 'Cambodian'), ('Chinese', 'Chinese'), ('Croation', 'Croation'), ('Czech', 'Czech'), ('Danish', 'Danish'),
('Dutch', 'Dutch'), ('English', 'English'), ('Estonian', 'Estonian'), ('Fiji', 'Fiji'), ('Finnish', 'Finnish'), ('French', 'French'), ('Georgian', 'Georgian'),
('German', 'German'), ('Greek', 'Greek'), ('Gujarati', 'Gujarati'), ('Hebrew', 'Hebrew'), ('Hindi', 'Hindi'), ('Hungarian', 'Hungarian'), ('Icelandic', 'Icelandic'),
('Indonesian', 'Indonesian'), ('Irish', 'Irish'), ('Italian', 'Italian'), ('Japanese', 'Japanese'), ('Javanese', 'Javanese'), ('Korean', 'Korean'), ('Latin', 'Latin'),
......@@ -101,6 +110,9 @@ class EditExperimentForm(Form):
('Slovenian', 'Slovenian'), ('Spanish', 'Spanish'), ('Swahili', 'Swahili'), ('Swedish ', 'Swedish '), ('Tamil', 'Tamil'), ('Tatar', 'Tatar'), ('Telugu', 'Telugu'),
('Thai', 'Thai'), ('Tibetan', 'Tibetan'), ('Tonga', 'Tonga'), ('Turkish', 'Turkish'), ('Ukranian', 'Ukranian'), ('Urdu', 'Urdu'), ('Uzbek', 'Uzbek'), ('Vietnamese', 'Vietnamese'),
('Welsh', 'Welsh'), ('Xhosa', 'Xhosa')])
stimulus_size = SelectField('Stimulus_size', choices=[
('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'), ('7', '7'), ('8', '8'), ('9', '9'), ('10', '10'), ('11', '11'), ('12', '12')])
submit = SubmitField('Send')
......@@ -137,6 +149,13 @@ class UploadStimuliForm(Form):
media = TextAreaField('Media filename')
file = FileField('Upload file')
submit = SubmitField('Send')
class UploadResearchBulletinForm(Form):
file = FileField('Upload file')
submit = SubmitField('Send')
class EditPageForm(Form):
......@@ -152,3 +171,9 @@ class RemoveExperimentForm(Form):
remove = TextAreaField('Remove')
submit = SubmitField('Send')
class GenerateIdForm(Form):
number = IntegerField('number', [validators.DataRequired()])
string = StringField('string', [validators.DataRequired()])
submit = SubmitField('Submit')
# Translations template for PROJECT.
# Copyright (C) 2018 ORGANIZATION
# This file is distributed under the same license as the PROJECT project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2018.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2018-11-04 17:30+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.6.0\n"
from app import db
from sqlalchemy import Column, Integer, String
from sqlalchemy import Column, Integer, String, Text
from flask_sqlalchemy import SQLAlchemy
from flask_wtf import FlaskForm
from wtforms_sqlalchemy.fields import QuerySelectField, QuerySelectMultipleField
......@@ -7,6 +7,7 @@ from flask_bootstrap import Bootstrap
from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
from app import login
from datetime import datetime
"""DATABASE CLASSES"""
......@@ -38,14 +39,23 @@ class experiment (db.Model):
__tablename__ = "experiment"
idexperiment = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(120), index=True)
instruction = db.Column(db.String(120), index=True)
instruction = db.Column(db.Text, index=True)
directoryname = db.Column(db.String(120), index=True, unique=True)
language = db.Column(db.String(120))
status = db.Column(db.String(120))
randomization = db.Column(db.String(120))
short_instruction = db.Column(db.Text, index=True)
single_sentence_instruction = db.Column(db.Text, index=True)
is_archived = db.Column(db.String(120))
creator_name = db.Column(db.String(120))
research_notification_filename = db.Column(db.String(120))
creation_time = db.Column(db.DateTime, index=True, default=datetime.utcnow)
stimulus_size = db.Column(db.String(120))
consent_text = db.Column(db.Text, index=True)
use_forced_id = db.Column(db.String(120))
def __repr__(self):
return "<idexperiment = '%s', name='%s', instruction='%s', directoryname='%s', language='%s', status='%s', randomization='%s'>" % (self.idexperiment, self.name, self.instruction, self.directoryname, self.language, self.status, self.randomization)
return "<idexperiment = '%s', name='%s', instruction='%s', directoryname='%s', language='%s', status='%s', randomization='%s', short_instruction='%s', single_sentence_instruction='%s', is_archived='%s', creator_name='%s', research_notification_filename='%s', creation_time='%s', stimulus_size='%s', consent_text='%s', use_forced_id='%s'>" % (self.idexperiment, self.name, self.instruction, self.directoryname, self.language, self.status, self.randomization, self.short_instruction, self.single_sentence_instruction, self.is_archived, self.creator_name, self.research_notification_filename, self.creation_time, self.stimulus_size, self.consent_text, self.use_forced_id)
class answer_set (db.Model):
......@@ -55,9 +65,11 @@ class answer_set (db.Model):
session = db.Column(db.String(120))
agreement = db.Column(db.String(120))
answer_counter = db.Column(db.Integer)
registration_time = db.Column(db.DateTime, index=True, default=datetime.utcnow)
last_answer_time = db.Column(db.DateTime, index=True, default=datetime.utcnow)
def __repr__(self):
return "<idanswer_set = '%s', experiment_idexperiment = '%s', session = '%s', agreement = '%s', answer_counter = '%s'>" % (self.idanswer_set, self.experiment_idexperiment, self.session, self.agreement, self.answer_counter)
return "<idanswer_set = '%s', experiment_idexperiment = '%s', session = '%s', agreement = '%s', answer_counter = '%s', registration_time = '%s', last_answer_time = '%s'>" % (self.idanswer_set, self.experiment_idexperiment, self.session, self.agreement, self.answer_counter, self.registration_time, self.last_answer_time)
class background_question_answer(db.Model):
......@@ -148,6 +160,21 @@ class trial_randomization (db.Model):
return "<idtrial_randomization = '%s', page_idpage = '%s', randomized_idpage = '%s', answer_set_idanswer_set = '%s', experiment_idexperiment = '%s'>" % (self.idtrial_randomization, self.page_idpage, self.randomized_idpage, self.answer_set_idanswer_set, self.experiment_idexperiment)
class forced_id (db.Model):
__tablename__ = "forced_id"
idforced_id = db.Column(db.Integer, primary_key=True)
experiment_idexperiment = db.Column(db.Integer, db.ForeignKey('experiment.idexperiment'))
pregenerated_id = db.Column(db.String(120))
def __repr__(self):
return "<idforced_id = '%s', experiment_idexperiment = '%s', pregenerated_id = '%s'>" % (self.idforced_id, self.experiment_idexperiment, self.pregenerated_id)
class user(UserMixin, db.Model):
__tablename__ = "user"
id = db.Column(db.Integer, primary_key=True)
......
......@@ -4,7 +4,7 @@ from app.models import experiment
from app.models import answer_set
from app.models import background_question_answer
from app.models import question, page, answer
from app.models import user, trial_randomization
from app.models import user, trial_randomization, forced_id
......@@ -20,10 +20,12 @@ def make_shell_context():
'page': page,
'answer': answer,
'user': user,
'trial_randomization': trial_randomization
'trial_randomization': trial_randomization,
'forced_id': forced_id
}
"""
from app import app, db
......
This diff is collapsed.
.btn {
border-radius: 0px;
}
.navbar-custom{
background-color:red;
border-color: green;
}
body{
background-color: #000000;
}
\ No newline at end of file
input[type='range'] {
-webkit-appearance: none;
height: 50px;
}
......@@ -10,18 +10,33 @@
<legend>Paste the new texts to the textarea and mark the end of each stimulus with a /n. Do not place the marker at the end of the last text. Example: Text1/n Text2/n Text3</legend>
<textarea class="form-control" rows="10" id="text" name="text"></textarea>
</div>
{% else %}
{% endif %}
{% if stimulus_type == 'video' or stimulus_type == 'audio' or stimulus_type == 'picture' %}
<div class="input-group mb-3">
<legend>Add files:</legend>
<div class="input-group-prepend">
<span class="input-group-text">Upload:</span>
</div>
<div class="custom-file">
<input type="file" class="custom-file-input" id="file" name="file" accept="audio/*,video/*,image/*" multiple>
<input type="file" class="custom-file-input" id="file" name="file" accept="audio/*,image/*, .mp4" multiple>
<label class="custom-file-label" for="upload_file">Choose file</label>
</div>
</div>
{% endif %}
{% endif %}
<br>
<button type="submit" class="btn btn-primary">Submit</button>
<a class="btn btn-primary" href="{{ request.referrer }}" role="button">Cancel</a>
......
{% extends "base.html" %}
{% block content %}
<div class="container text-center">
<div class="row mt-5 display-4"><br></div>
<h1 class="mt-5 display-4"><br>Run experiment with any ID:</h1><br>
<br>
<h3 class="display-5 text-center text-danger"> Notice!</h3>
<div class="lead text-center">You can use any login name for a testrun that is not currently in database for this experiment.</div>
<br><br>
<form action="" method="post">
{{ form.hidden_tag() }}
<p>
{{ form.participant_id(size=32) }}<br>
{% for error in form.participant_id.errors %}
<span style="color: red;">[{{ error }}]</span>
{% endfor %}
</p>
<p>{{ form.submit() }}</p>
</form>
</div>
{% endblock %}
\ No newline at end of file
......@@ -2,7 +2,7 @@
{% import "bootstrap/wtf.html" as wtf %}
<!doctype html>
<html lang="en">
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
......@@ -12,22 +12,24 @@
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>
<title>Mega-fMRI Stimulus Rating Tool</title>
<title>Onni</title>
<!-- Bootstrap core CSS -->
<link href="../../dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="sticky-footer-navbar.css" rel="stylesheet">
<link href="/static/css/slider.css" rel="stylesheet">
</head>
<body>
<header>
<!-- Navigation -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<nav class="navbar navbar-expand navbar-dark bg-dark fixed-top">
<div class="col navbar-brand">
<img src="/static/img/madam-300x250.jpg" alt="Logo" style="width:70px;">
{% if pages %}
<a class="navbar-brand pl-5 font-weight-light">Participant ID: <span class="text-success font-weight-bold">{{ session['user']}}</span></a>
<a class="navbar-brand pl-5 font-weight-light"><span class="text-success font-weight-bold">{{ session['user']}}</span></a>
{% else %}
......@@ -36,9 +38,9 @@
{% endif %}
</div>
<div class="col-6 navbar-nav">
<div class="navbar-nav w-50">
{% if pages %}
<div class="progress-bar bg-success progress-bar-striped" role="progressbar" style="width: {{ progress_bar_percentage }}%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">Task progress: {{ progress_bar_percentage }}%</div>
<div class="progress-bar bg-success progress-bar-striped" role="progressbar" style="width: {{ progress_bar_percentage }}%" aria-valuemin="0" aria-valuemax="100">{{ _('Task progress:') }} {{ progress_bar_percentage }}%</div>
{% endif %}
</div>
<div class="col text-success text-right">
......@@ -52,7 +54,6 @@
{% endwith %}
{% endblock %}
{% if current_user.is_authenticated %}
<a class="nav-item" href="{{ url_for('researcher_info') }}" class="nav-link">Info |</a>
......@@ -62,16 +63,17 @@
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{ url_for('set_language', language='Finnish') }}">Finnish</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='English') }}">English</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Persian') }}">Persian</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Greek') }}">Greek</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Italian') }}">Italian</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Chinese') }}">Chinese</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='All') }}">Show all languages</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Finnish', lang='fi') }}">Finnish</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='English', lang='en') }}">English</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Persian', lang='fa') }}">Persian</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Greek', lang='el') }}">Greek</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Italian', lang='it') }}">Italian</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Chinese', lang='zh') }}">Chinese</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='All') }}">Show all experiments</a>
</div>
<a class="nav-item" href="{{ url_for('create_experiment') }}" class="nav-link">| Create experiment |</a>
<a class="nav-item" href="{{ url_for('researcher_info') }}" class="nav-link">| Info |</a>
<a class="nav-item" href="{{ url_for('create_experiment') }}" class="nav-link">Create |</a>
<a class="nav-item" href="" class="nav-link">Archives |</a>
{% endif %}
{% if current_user.is_anonymous %}
......@@ -83,13 +85,13 @@
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{ url_for('set_language', language='Finnish') }}">Finnish</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='English') }}">English</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Persian') }}">Persian</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Greek') }}">Greek</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Italian') }}">Italian</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Chinese') }}">Chinese</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='All') }}">Show all languages</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Finnish', lang='fi') }}">Finnish</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='English', lang='en') }}">English</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Persian', lang='fa') }}">Persian</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Greek', lang='el') }}">Greek</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Italian', lang='it') }}">Italian</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='Chinese', lang='zh') }}">Chinese</a>
<a class="dropdown-item" href="{{ url_for('set_language', language='All') }}">Show all experiments</a>
</div>
......
......@@ -5,11 +5,14 @@
<div class="container text-center">
<div class="row mt-5 display-4"><br></div>
<h1 class="mt-5 display-4"><br>Please insert your ID-code below:</h1><br>
<h1 class="mt-5 display-4"><br>{{ _('Please insert your ID-code below:') }}</h1><br>
<br>
<h3 class="display-5 text-center text-danger"> Notice!</h3>
<div class="row lead">This login is meant only for participants who have received an identification code from a researcher to be used in the rating task. If you have not received such please return to the previous page and select the "Begin task" function instead.</div>
<h3 class="display-5 text-center text-danger">{{ _('Notice!') }}</h3>
<div class="lead text-center">{{ _('Participation in this experiment requires a login with a predetermined ID code. Please input ID below.') }}</div>
<br><br>
<form action="" method="post">
......
{% extends "base.html" %}
{% block content %}
<h1 class="row mt-5 display-4"><br>This is the consent page for experiment ID: {{ exp_id }}</h1>
<h1 class="container mt-5 display-4"><br> {{ experiment_info.name }}</h1>
<br>
<p class="lead">{{ experiment_info.short_instruction }}</p>
<br>
<h4>Lue tutkimustiedote <a href="tiedote.pdf">t&auml;st&auml;.</a></h4>
<br/>
<p class="lead">Prior to giving the consent I have read and understood the Experiment/ Research Bulletin I received, and I have received sufficient information about the course of the experiment. I have been clarified that the experiment data collected from me will be treated confidentially in such way that my identity can not be identified. I understand that my participation in the study is completely voluntary and that I can stop the experiment at any stage of the experiment without giving any reason. Furthermore, I have been clarified that I will receive further information about the general principles and the progress of the experiment from the researcher mentioned at the Experiment/ Research Bulletin, if I wish to do so. I understand that the data is collected only for purposes of the scientific research and it is not even partially disclosed to the participant himself/ herself and that my IP address or other identifying information will not be saved.
</p>
<p class="lead">By clicking on the button below, I give my consent to the collection and processing of the data in this experiment, as described in the Experiment/ Research Bulletin.
<h3>{{ _('Consent for participation:') }}</h3>
</p>
<p class="lead">Of this electronical consent, there will be a digital entry saved in the files of the researcher responsible for the experiment.
{% if experiment_info.research_notification_filename %}
<h5> {{ _('Research bulletin can be read') }} <a href="{{ url_for('view_research_notification', exp_id=experiment_info.idexperiment) }}">{{ _('here.') }}</a></h5>
{% endif %}
</p>
<p>
<a class="btn btn-primary" href="{{ url_for('participant_session', exp_id=exp_id, agree='true') }}" role="button">Agree</a>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">Disagree</button>
<p class="lead"> {{ experiment_info.consent_text }} </p>
<a class="btn btn-primary" href="{{ url_for('participant_session', exp_id=exp_id, agree='true') }}" role="button">{{ _('Agree') }}</a>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">{{ _('Disagree') }}</button>
<!-- Modal -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog modal-dialog-centered">
......@@ -24,19 +26,20 @@
<div class="modal-content modal-dialog-centered">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Notice!</h4>
<h4 class="modal-title">{{ _('Notice!') }}</h4>
</div>
<div class="modal-body">
<p>In order to participate for the study you need to agree with the terms presented.</p>
<p>{{ _('In order to participate for the study you need to agree with the terms presented.') }}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close Notice</button>
<a class="btn btn-primary" href="/" role="button">Return Home</a>
<button type="button" class="btn btn-default" data-dismiss="modal">{{ _('Close Notice') }}</button>
<a class="btn btn-primary" href="/" role="button">{{ _('Return Home') }}</a>
</div>
</div>
</div>
</div>
{% endblock %}
......
......@@ -6,7 +6,9 @@
<div class="row mt-5 display-4"><br></div>
<br>
<h1 class="mt-5 display-4"><br>Please insert your participant ID:</h1><br>
<h1 class="mt-5 display-4"><br>{{ _('Please insert your participant ID:') }}</h1><br>
<form action="" method="post">
{{ form.hidden_tag() }}
<p>
......
......@@ -11,15 +11,15 @@
<div class="col-12">
<form action="" method="post" role="form">
<div class="form-group">
<label for="name">Experiment name:</label>
<input required type="text" class="form-control" id="name" name="name" placeholder="Name?">
<label for="name">Your name:</label>
<input required type="text" class="form-control" id="creator_name" name="creator_name" placeholder="Creator name?">
<br>
<label for="name">Name of the experiment:</label>
<input required type="text" class="form-control" id="name" name="name" placeholder="Experiment name?">
<br>
<label for="instruction">Instructions:</label>
<input required type="text" class="form-control" id="instruction" name="instruction" placeholder="Instructions?">
<br>
<div class="form-group">
<label for="language">Language:</label>
<label for="language">Select a language for the experiment:</label>
<select class="form-control" id="language" name="language">
<option disabled selected value></option>
<option value="Afrikanns">Afrikanns</option>
......@@ -95,8 +95,35 @@
<option value="Welsh">Welsh</option>
<option value="Xhosa">Xhosa</option>
</select>
</div>
</div>
<br>
<p>Instructions for the experiment come in three forms:
<br> (1) A single sentence instruction that is shown during the rating task above the sliders.
<br> (2) A short general description of the task that is shown on the experiment listing on Onni's front page and on the informed consent page.
<br> (3) a longer detailed explanation of the instructions that is shown to the participant after the consent and before the rating task begins.
<br> Please input all three types of instructions below:
</p>
<label for="single_sentence_instruction">(1) Single sentence:</label>
<input required type="text" class="form-control" id="single_sentence_instruction" name="single_sentence_instruction" placeholder="Input here" required>
<br>
<label for="short_instruction">(2) Short description:</label>
<textarea class="form-control" rows="5" id="short_instruction" name="short_instruction" placeholder="Input here" required></textarea>