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

[Freeipa-devel] [PATCH] simple patch to remove colons from fields



This is a simple patch to remove the colons from the label widgets.
That way I can use them in tables/lists where a colon doesn't look good.

-Kevin

# HG changeset patch
# User Kevin McCarthy <kmccarth redhat com>
# Date 1187373582 25200
# Node ID 0648e56c8c3afd91beaeae01364f1a471bcca1a0
# Parent  9da05dd9abe18fdda85b1ca24a2ca806fb65e0c1
Remove ':' from the label widgets so they can be used outside forms.
Add ':' into the edit/new/show pages.

diff -r 9da05dd9abe1 -r 0648e56c8c3a ipa-server/ipa-gui/ipagui/forms/user.py
--- a/ipa-server/ipa-gui/ipagui/forms/user.py	Fri Aug 17 10:58:56 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/forms/user.py	Fri Aug 17 10:59:42 2007 -0700
@@ -2,14 +2,14 @@ from turbogears import validators, widge
 from turbogears import validators, widgets
 
 class UserFields():
-    uid = widgets.TextField(name="uid", label="Login:")
-    userpassword = widgets.TextField(name="userpassword", label="Password:")
-    uidnumber = widgets.TextField(name="uidnumber", label="UID:")
-    gidnumber = widgets.TextField(name="gidnumber", label="GID:")
-    givenname = widgets.TextField(name="givenname", label="First name:")
-    sn = widgets.TextField(name="sn", label="Last name:")
-    mail = widgets.TextField(name="mail", label="E-mail address:")
-    telephonenumber = widgets.TextField(name="telephonenumber", label="Phone:")
+    uid = widgets.TextField(name="uid", label="Login")
+    userpassword = widgets.TextField(name="userpassword", label="Password")
+    uidnumber = widgets.TextField(name="uidnumber", label="UID")
+    gidnumber = widgets.TextField(name="gidnumber", label="GID")
+    givenname = widgets.TextField(name="givenname", label="First name")
+    sn = widgets.TextField(name="sn", label="Last name")
+    mail = widgets.TextField(name="mail", label="E-mail address")
+    telephonenumber = widgets.TextField(name="telephonenumber", label="Phone")
 
     uid.validator = validators.PlainText(not_empty=True)
     userpassword.validator = validators.String(not_empty=True)
diff -r 9da05dd9abe1 -r 0648e56c8c3a ipa-server/ipa-gui/ipagui/templates/usereditform.kid
--- a/ipa-server/ipa-gui/ipagui/templates/usereditform.kid	Fri Aug 17 10:58:56 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/templates/usereditform.kid	Fri Aug 17 10:59:42 2007 -0700
@@ -12,7 +12,7 @@
       <tr>
         <th>
           <label class="fieldlabel" for="${user.uid.field_id}"
-            py:content="user.uid.label" />
+            py:content="user.uid.label" />:
         </th>
         <td>
           ${value_for(user.uid)}
@@ -22,7 +22,7 @@
       <tr>
         <th valign="top">
           <label class="fieldlabel" for="${user.userpassword.field_id}"
-            py:content="user.userpassword.label" />
+            py:content="user.userpassword.label" />:
         </th>
         <td valign="top">
           <span py:replace="user.userpassword.display(value_for(user.userpassword))" />
@@ -67,7 +67,7 @@
       <tr>
         <th>
           <label class="fieldlabel" for="${user.uidnumber.field_id}"
-            py:content="user.uidnumber.label" />
+            py:content="user.uidnumber.label" />:
         </th>
         <td>
           ${value_for(user.uidnumber)}
@@ -77,7 +77,7 @@
       <tr>
         <th>
           <label class="fieldlabel" for="${user.gidnumber.field_id}"
-            py:content="user.gidnumber.label" />
+            py:content="user.gidnumber.label" />:
         </th>
         <td>
           ${value_for(user.gidnumber)}
@@ -90,7 +90,7 @@
       <tr>
         <th>
           <label class="fieldlabel" for="${user.givenname.field_id}"
-            py:content="user.givenname.label" />
+            py:content="user.givenname.label" />:
         </th>
         <td>
           <span py:replace="user.givenname.display(value_for(user.givenname))" />
@@ -103,7 +103,7 @@
       <tr>
         <th>
           <label class="fieldlabel" for="${user.sn.field_id}"
-            py:content="user.sn.label" />
+            py:content="user.sn.label" />:
         </th>
         <td>
           <span py:replace="user.sn.display(value_for(user.sn))" />
@@ -118,7 +118,7 @@
       <tr>
         <th>
           <label class="fieldlabel" for="${user.mail.field_id}"
-            py:content="user.mail.label" />
+            py:content="user.mail.label" />:
         </th>
         <td>
           <span py:replace="user.mail.display(value_for(user.mail))" />
@@ -129,7 +129,7 @@
       <tr>
         <th>
           <label class="fieldlabel" for="${user.telephonenumber.field_id}"
-            py:content="user.telephonenumber.label" />
+            py:content="user.telephonenumber.label" />:
         </th>
         <td>
           <span py:replace="user.telephonenumber.display(value_for(user.telephonenumber))" />
diff -r 9da05dd9abe1 -r 0648e56c8c3a ipa-server/ipa-gui/ipagui/templates/usernewform.kid
--- a/ipa-server/ipa-gui/ipagui/templates/usernewform.kid	Fri Aug 17 10:58:56 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/templates/usernewform.kid	Fri Aug 17 10:59:42 2007 -0700
@@ -7,7 +7,7 @@
       <tr>
         <th>
           <label class="fieldlabel" for="${user.uid.field_id}"
-            py:content="user.uid.label" />
+            py:content="user.uid.label" />:
         </th>
         <td>
           <span py:replace="user.uid.display(value_for(user.uid))" />
@@ -19,7 +19,7 @@
       <tr>
         <th>
           <label class="fieldlabel" for="${user.userpassword.field_id}"
-            py:content="user.userpassword.label" />
+            py:content="user.userpassword.label" />:
         </th>
         <td>
           <span py:replace="user.userpassword.display(value_for(user.userpassword))" />
@@ -41,7 +41,7 @@
       <tr>
         <th>
           <label class="fieldlabel" for="${user.uidnumber.field_id}"
-            py:content="user.uidnumber.label" />
+            py:content="user.uidnumber.label" />:
         </th>
         <td>
           <span py:replace="user.uidnumber.display(value_for(user.uidnumber))" />
@@ -53,7 +53,7 @@
       <tr>
         <th>
           <label class="fieldlabel" for="${user.gidnumber.field_id}"
-            py:content="user.gidnumber.label" />
+            py:content="user.gidnumber.label" />:
         </th>
         <td>
           <span py:replace="user.gidnumber.display(value_for(user.gidnumber))" />
@@ -68,7 +68,7 @@
       <tr>
         <th>
           <label class="fieldlabel" for="${user.givenname.field_id}"
-            py:content="user.givenname.label" />
+            py:content="user.givenname.label" />:
         </th>
         <td>
           <span py:replace="user.givenname.display(value_for(user.givenname))" />
@@ -81,7 +81,7 @@
       <tr>
         <th>
           <label class="fieldlabel" for="${user.sn.field_id}"
-            py:content="user.sn.label" />
+            py:content="user.sn.label" />:
         </th>
         <td>
           <span py:replace="user.sn.display(value_for(user.sn))" />
@@ -96,7 +96,7 @@
       <tr>
         <th>
           <label class="fieldlabel" for="${user.mail.field_id}"
-            py:content="user.mail.label" />
+            py:content="user.mail.label" />:
         </th>
         <td>
           <span py:replace="user.mail.display(value_for(user.mail))" />
@@ -107,7 +107,7 @@
       <tr>
         <th>
           <label class="fieldlabel" for="${user.telephonenumber.field_id}"
-            py:content="user.telephonenumber.label" />
+            py:content="user.telephonenumber.label" />:
         </th>
         <td>
           <span py:replace="user.telephonenumber.display(value_for(user.telephonenumber))" />
diff -r 9da05dd9abe1 -r 0648e56c8c3a ipa-server/ipa-gui/ipagui/templates/usershow.kid
--- a/ipa-server/ipa-gui/ipagui/templates/usershow.kid	Fri Aug 17 10:58:56 2007 -0700
+++ b/ipa-server/ipa-gui/ipagui/templates/usershow.kid	Fri Aug 17 10:59:42 2007 -0700
@@ -12,19 +12,19 @@
     <table class="formtable" cellpadding="2" cellspacing="0" border="0">
         <tr>
           <th>
-            <label class="fieldlabel" py:content="fields.uid.label" />
+            <label class="fieldlabel" py:content="fields.uid.label" />:
           </th>
           <td>${user.get("uid")}</td>
         </tr>
         <tr>
           <th>
-            <label class="fieldlabel" py:content="fields.uidnumber.label" />
+            <label class="fieldlabel" py:content="fields.uidnumber.label" />:
           </th>
           <td>${user.get("uidnumber")}</td>
         </tr>
         <tr>
           <th>
-            <label class="fieldlabel" py:content="fields.gidnumber.label" />
+            <label class="fieldlabel" py:content="fields.gidnumber.label" />:
           </th>
           <td>${user.get("gidnumber")}</td>
         </tr>
@@ -34,13 +34,13 @@
     <table class="formtable" cellpadding="2" cellspacing="0" border="0">
         <tr>
           <th>
-            <label class="fieldlabel" py:content="fields.givenname.label" />
+            <label class="fieldlabel" py:content="fields.givenname.label" />:
           </th>
           <td>${user.get("givenname")}</td>
         </tr>
         <tr>
           <th>
-            <label class="fieldlabel" py:content="fields.sn.label" />
+            <label class="fieldlabel" py:content="fields.sn.label" />:
           </th>
           <td>${user.get("sn")}</td>
         </tr>
@@ -50,13 +50,13 @@
     <table class="formtable" cellpadding="2" cellspacing="0" border="0">
         <tr>
           <th>
-            <label class="fieldlabel" py:content="fields.mail.label" />
+            <label class="fieldlabel" py:content="fields.mail.label" />:
           </th>
           <td>${user.get("mail")}</td>
         </tr>
         <tr>
           <th>
-            <label class="fieldlabel" py:content="fields.telephonenumber.label" />
+            <label class="fieldlabel" py:content="fields.telephonenumber.label" />:
           </th>
           <td>${user.get("telephonenumber")}</td>
         </tr>

Attachment: smime.p7s
Description: S/MIME cryptographic signature


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