Commit 76013de9 authored by EL HASSANE GARGEM's avatar EL HASSANE GARGEM
Browse files

undo onboarding flags

parent cafbdac3
......@@ -78,7 +78,7 @@ class TranscriptionSerializer(serializers.ModelSerializer):
class UserOnboardingSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ('onboarding_images','onboarding_edit','onboarding_models','onboarding_trans')
fields = ('onboarding',)
class BlockTypeSerializer(serializers.ModelSerializer):
......
......@@ -21,13 +21,12 @@ class UserViewSetTestCase(CoreFactoryTestCase):
self.client.force_login(user)
uri = reverse('api:user-onboarding')
resp = self.client.put(uri, {
'onboarding_edit' : 'False',
'onboarding' : 'False',
}, content_type='application/json')
user.refresh_from_db()
self.assertEqual(resp.status_code, 200)
self.assertEqual(user.onboarding_edit, False)
self.assertEqual(user.onboarding_images, True)
self.assertEqual(user.onboarding, False)
......
......@@ -147,7 +147,7 @@ class DocumentImages(LoginRequiredMixin, DocumentMixin, DetailView):
context['process_form'] = DocumentProcessForm(self.object, self.request.user)
context['import_form'] = ImportForm(self.object, self.request.user)
context['export_form'] = ExportForm(self.object, self.request.user)
context['onboarding_images'] = self.request.user.onboarding_images
context['onboarding'] = self.request.user.onboarding
return context
......@@ -250,8 +250,7 @@ class EditPart(LoginRequiredMixin, DetailView):
context['object'] = self.object.document
context['document'] = self.object.document
context['part'] = self.object
context['onboarding_edit'] = self.request.user.onboarding_edit
context['onboarding_trans'] = self.request.user.onboarding_trans
context['onboarding'] = self.request.user.onboarding
return context
def dispatch(self, *args, **kwargs):
......@@ -288,7 +287,7 @@ class ModelsList(LoginRequiredMixin, ListView):
if self.document:
context['document'] = self.document
context['object'] = self.document # legacy
context['onboarding_models'] = self.request.user.onboarding_models
context['onboarding'] = self.request.user.onboarding
return context
......
# Generated by Django 2.1.4 on 2020-08-20 11:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0009_auto_20200818_1010'),
]
operations = [
migrations.RemoveField(
model_name='user',
name='onboarding_edit',
),
migrations.RemoveField(
model_name='user',
name='onboarding_images',
),
migrations.RemoveField(
model_name='user',
name='onboarding_models',
),
migrations.RemoveField(
model_name='user',
name='onboarding_trans',
),
migrations.AddField(
model_name='user',
name='onboarding',
field=models.BooleanField(default=True, verbose_name='first connection'),
),
]
......@@ -20,23 +20,11 @@ class User(AbstractUser):
)
fields = models.ManyToManyField('ResearchField', blank=True)
onboarding_images = models.BooleanField(
onboarding = models.BooleanField(
_('first connection'),
default=True
)
onboarding_edit = models.BooleanField(
default=True
)
onboarding_models = models.BooleanField(
default=True
)
onboarding_trans = models.BooleanField(
default=True
)
class Meta:
permissions = (('can_invite', 'Can invite users'),)
......
steps_trans = [
{
element: '#modal-img-container',
intro: "This shows the transcription pane where you can enter or correct a transcription line-by-line.<br>" +
" Clicking on a line of text will bring up a window showing the image of that line, and a box where you can enter or correct the transcription.\n",
position: 'top'
},
{
element: '#trans-input-container',
intro : "Here you can select which transcriptions to show in the transcription pane for comparison.",
position: 'top'
}
]
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment