[extensions-web/ui-cleanup: 5/12] upload: Make sure extension authors agree to the terms of service



commit 65412beaff2df43ad20aa6c1d49b29653beeca4d
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Dec 27 21:43:58 2011 -0500

    upload: Make sure extension authors agree to the terms of service

 sweettooth/extensions/forms.py                     |   10 ++++++++++
 .../extensions/templates/extensions/upload.html    |    5 +++++
 2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/extensions/forms.py b/sweettooth/extensions/forms.py
index 04d7189..4619526 100644
--- a/sweettooth/extensions/forms.py
+++ b/sweettooth/extensions/forms.py
@@ -7,8 +7,18 @@ class UploadForm(forms.Form):
 I verify that my extension can be distributed under the terms of the GPLv2+
 """.strip(), required=False)
 
+    tos_compliant = forms.BooleanField(label="""
+I agree that GNOME Shell Extensions can remove, modify or reassign maintainership of my extension
+""".strip(), required=False)
+
     def clean_gplv2_compliant(self):
         gplv2_compliant = self.cleaned_data['gplv2_compliant']
         if not gplv2_compliant:
             raise forms.ValidationError("You must be able to distribute your extension under the terms of the GPLv2+.")
         return gplv2_compliant
+
+    def clean_tos_compliant(self):
+        tos_compliant = self.cleaned_data['tos_compliant']
+        if not tos_compliant:
+            raise forms.ValidationError("You must agree to the GNOME Shell Extensions terms of service.")
+        return tos_compliant
diff --git a/sweettooth/extensions/templates/extensions/upload.html b/sweettooth/extensions/templates/extensions/upload.html
index c61d413..5e87aaa 100644
--- a/sweettooth/extensions/templates/extensions/upload.html
+++ b/sweettooth/extensions/templates/extensions/upload.html
@@ -43,6 +43,11 @@
     {{ form.gplv2_compliant.errors }}
 
     <br>
+    {{ form.tos_compliant }}
+    {{ form.tos_compliant.label_tag }}
+    {{ form.tos_compliant.errors }}
+
+    <br>
     <input type="submit" value="Upload extension">
   </form>
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]