Repository: akvo/akvo-rsr

Issue:
Photo credit field character length
The 'photo credit' field currently only allows for 25 characters (although according to @KasperBrandt  it's set to 50).

http://rsr.akvo.org/en/project/projectid/add_update/

This field should allow for more characters not only because it's  even too short of full name right now, bu also often a website may be added as a photo credit. (eg. http://microlancer.lancerassets.com - is the one I was trying to add http://rsr.akvo.org/en/project/3324/update/10642/ ).
## Test plan

GIVEN the add update page
WHEN filling in a new update
THEN it should be possible to enter 75 characters in the 'photo credit' and 'video credit' fields



Discussion:

Resolving patch:
diff --git a/akvo/rsr/forms.py b/akvo/rsr/forms.py
--- a/akvo/rsr/forms.py
+++ b/akvo/rsr/forms.py
@@ -244,7 +244,7 @@ class ProjectUpdateForm(forms.ModelForm):
     photo_credit = forms.CharField(label='', required=False, widget=forms.TextInput(attrs={
         'class': 'input',
         'size': '25',
-        'maxlength': '25',
+        'maxlength': '75',
         'placeholder': _(u'Photo credit'),
         }))
     video = forms.CharField(required=False, widget=forms.TextInput(attrs={
@@ -262,7 +262,7 @@ class ProjectUpdateForm(forms.ModelForm):
     video_credit = forms.CharField(label='', required=False, widget=forms.TextInput(attrs={
         'class': 'input',
         'size': '25',
-        'maxlength': '25',
+        'maxlength': '75',
         'placeholder': _(u'Video credit'),
         }))
     latitude = forms.FloatField(widget=forms.HiddenInput())
diff --git a/akvo/rsr/migrations/0013_auto_20150803_0905.py b/akvo/rsr/migrations/0013_auto_20150803_0905.py
new file mode 100644
--- /dev/null
+++ b/akvo/rsr/migrations/0013_auto_20150803_0905.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+import akvo.rsr.fields
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('rsr', '0012_partnersite_show_keyword_logos'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='projectupdate',
+            name='photo_credit',
+            field=akvo.rsr.fields.ValidXMLCharField(help_text='75 characters', max_length=75, verbose_name='photo credit', blank=True),
+            preserve_default=True,
+        ),
+        migrations.AlterField(
+            model_name='projectupdate',
+            name='video_credit',
+            field=akvo.rsr.fields.ValidXMLCharField(help_text='75 characters', max_length=75, verbose_name='video credit', blank=True),
+            preserve_default=True,
+        ),
+    ]
diff --git a/akvo/rsr/models/project_update.py b/akvo/rsr/models/project_update.py
--- a/akvo/rsr/models/project_update.py
+++ b/akvo/rsr/models/project_update.py
@@ -59,7 +59,7 @@ class ProjectUpdate(TimestampsMixin, models.Model):
         _(u'photo caption'), blank=True, max_length=75, help_text=_(u'75 characters')
     )
     photo_credit = ValidXMLCharField(
-        _(u'photo credit'), blank=True, max_length=25, help_text=_(u'25 characters')
+        _(u'photo credit'), blank=True, max_length=75, help_text=_(u'75 characters')
     )
     video = EmbedVideoField(
         _(u'video URL'), blank=True, help_text=_(u'Supported providers: YouTube and Vimeo')
@@ -68,7 +68,7 @@ class ProjectUpdate(TimestampsMixin, models.Model):
         _(u'video caption'), blank=True, max_length=75, help_text=_(u'75 characters')
     )
     video_credit = ValidXMLCharField(
-        _(u'video credit'), blank=True, max_length=25, help_text=_(u'25 characters')
+        _(u'video credit'), blank=True, max_length=75, help_text=_(u'75 characters')
     )
     update_method = ValidXMLCharField(
         _(u'update method'), blank=True, max_length=1, choices=UPDATE_METHODS, db_index=True,


Test patch: