@@ -36,12 +36,12 @@ class IXP_Form_Customer extends IXP_Form
3636 public function init ()
3737 {
3838 $ this ->setDecorators ( [ [ 'ViewScript ' , [ 'viewScript ' => 'customer/forms/edit.phtml ' ] ] ] );
39-
39+
4040 $ name = $ this ->createElement ( 'text ' , 'name ' );
4141 $ name ->addValidator ( 'stringLength ' , false , array ( 1 , 255 ) )
4242 ->setRequired ( true )
4343 ->setLabel ( 'Name ' )
44- ->setAttrib ( 'class ' , 'span6 ' )
44+ ->setAttrib ( 'class ' , 'span10 ' )
4545 ->addFilter ( 'StringTrim ' )
4646 ->addFilter ( new OSS_Filter_StripSlashes () );
4747 $ this ->addElement ( $ name );
@@ -51,7 +51,7 @@ public function init()
5151 ->setRegisterInArrayValidator ( true )
5252 ->setLabel ( 'Type ' )
5353 ->setRequired ( true )
54- ->setAttrib ( 'class ' , 'chzn-select span4 ' )
54+ ->setAttrib ( 'class ' , 'chzn-select span8 ' )
5555 ->setErrorMessages ( array ( 'Please select a customer type ' ) );
5656 $ this ->addElement ( $ type );
5757
@@ -60,7 +60,7 @@ public function init()
6060 ->addValidator ( 'alnum ' )
6161 ->addValidator ( 'regex ' , false , array ('/^[a-z0-9]+/ ' ) )
6262 ->setRequired ( true )
63- ->setAttrib ( 'class ' , 'span4 ' )
63+ ->setAttrib ( 'class ' , 'span8 ' )
6464 ->setLabel ( 'Short Name ' )
6565 ->addFilter ( 'StringToLower ' )
6666 ->addFilter ( 'StringTrim ' );
@@ -70,7 +70,7 @@ public function init()
7070 $ corpwww ->addValidator ( 'stringLength ' , false , array ( 0 , 255 ) )
7171 ->setRequired ( false )
7272 ->setAttrib ( 'placeholder ' , 'http://www.example.com/ ' )
73- ->setAttrib ( 'class ' , 'span6 ' )
73+ ->setAttrib ( 'class ' , 'span10 ' )
7474 ->setLabel ( 'Corporate Website ' )
7575 ->addFilter ( 'StringTrim ' )
7676 ->addFilter ( new OSS_Filter_StripSlashes () );
@@ -102,21 +102,21 @@ public function init()
102102 ->setRegisterInArrayValidator ( true )
103103 ->setLabel ( 'Status ' )
104104 ->setRequired ( true )
105- ->setAttrib ( 'class ' , 'chzn-select span3 ' )
105+ ->setAttrib ( 'class ' , 'chzn-select span8 ' )
106106 ->setErrorMessages ( array ( 'Please set the customer \'s status ' ) );
107107 $ this ->addElement ( $ status );
108-
108+
109109 $ MD5Support = $ this ->createElement ( 'select ' , 'MD5Support ' );
110110 $ MD5Support ->setMultiOptions ( \Entities \Customer::$ MD5_SUPPORT )
111111 ->setRegisterInArrayValidator ( true )
112112 ->setLabel ( 'MD5 Support ' )
113113 ->setRequired ( false )
114- ->setAttrib ( 'class ' , 'chzn-select span6 ' );
114+ ->setAttrib ( 'class ' , 'chzn-select span8 ' );
115115 $ this ->addElement ( $ MD5Support );
116-
116+
117117 $ abbreviatedName = $ this ->createElement ( 'text ' , 'abbreviatedName ' );
118118 $ abbreviatedName ->setRequired ( false )
119- ->setAttrib ( 'class ' , 'span6 ' )
119+ ->setAttrib ( 'class ' , 'span10 ' )
120120 ->setLabel ( 'Abbreviated Name ' )
121121 ->addFilter ( 'StringTrim ' )
122122 ->addFilter ( new OSS_Filter_StripSlashes () );
@@ -127,23 +127,23 @@ public function init()
127127 $ autsys ->addValidator ('int ' )
128128 ->addValidator ( 'greaterThan ' , false , array ( -1 ) )
129129 ->setRequired ( false )
130- ->setAttrib ( 'class ' , 'span4 ' )
130+ ->setAttrib ( 'class ' , 'span6 ' )
131131 ->setLabel ( 'AS Number ' );
132132 $ this ->addElement ( $ autsys );
133133
134134 $ maxprefixes = $ this ->createElement ( 'text ' , 'maxprefixes ' );
135135 $ maxprefixes ->addValidator ('int ' )
136136 ->addValidator ( 'greaterThan ' , false , array ( -1 ) )
137137 ->setRequired ( false )
138- ->setAttrib ( 'class ' , 'span2 ' )
138+ ->setAttrib ( 'class ' , 'span6 ' )
139139 ->setLabel ( 'Max Prefixes ' );
140140 $ this ->addElement ( $ maxprefixes );
141141
142142 $ peeringemail = $ this ->createElement ( 'text ' , 'peeringemail ' );
143143 $ peeringemail ->addValidator ('emailAddress ' )
144144 ->addValidator ( 'stringLength ' , false , array ( 0 , 64 ) )
145145 ->setRequired ( false )
146- ->setAttrib ( 'class ' , 'span6 ' )
146+ ->setAttrib ( 'class ' , 'span8 ' )
147147 ->
setAttrib (
'placeholder ' ,
'[email protected] ' )
148148 ->setLabel ( 'Email ' );
149149 $ this ->addElement ( $ peeringemail );
@@ -153,17 +153,17 @@ public function init()
153153 ->setRegisterInArrayValidator ( true )
154154 ->setLabel ( 'Peering Policy ' )
155155 ->setRequired ( false )
156- ->setAttrib ( 'class ' , 'chzn-select span3 ' );
157-
156+ ->setAttrib ( 'class ' , 'chzn-select span8 ' );
157+
158158 $ this ->addElement ( $ peeringpolicy );
159-
160-
159+
160+
161161 $ peeringmacro = $ this ->createElement ( 'text ' , 'peeringmacro ' );
162162 $ peeringmacro ->addValidator ( 'stringLength ' , false , array ( 0 , 255 ) )
163163 ->setRequired ( false )
164164 ->setLabel ( 'Peering Macro ' )
165165 ->addFilter ( 'StringTrim ' )
166- ->setAttrib ( 'class ' , 'span4 ' )
166+ ->setAttrib ( 'class ' , 'span8 ' )
167167 ->addFilter ( new OSS_Filter_StripSlashes () );
168168 $ this ->addElement ( $ peeringmacro );
169169
@@ -183,13 +183,13 @@ public function init()
183183 'peeringDisplayGroup '
184184 );
185185 $ this ->getDisplayGroup ( 'peeringDisplayGroup ' )->setLegend ( 'Peering Details ' );
186-
186+
187187 $ nocphone = $ this ->createElement ( 'text ' , 'nocphone ' );
188188 $ nocphone ->addValidator ( 'stringLength ' , false , array ( 0 , 255 ) )
189189 ->setRequired ( false )
190190 ->setLabel ( 'Phone ' )
191191 ->setAttrib ( 'placeholder ' , '+353 1 123 4567 ' )
192- ->setAttrib ( 'class ' , 'span4 ' )
192+ ->setAttrib ( 'class ' , 'span8 ' )
193193 ->addFilter ( 'StringTrim ' )
194194 ->addFilter ( new OSS_Filter_StripSlashes () );
195195 $ this ->addElement ( $ nocphone );
@@ -198,7 +198,7 @@ public function init()
198198 $ noc24hphone ->addValidator ( 'stringLength ' , false , array ( 0 , 255 ) )
199199 ->setRequired ( false )
200200 ->setAttrib ( 'placeholder ' , '+353 86 876 5432 ' )
201- ->setAttrib ( 'class ' , 'span4 ' )
201+ ->setAttrib ( 'class ' , 'span8 ' )
202202 ->setLabel ( '24h Phone ' )
203203 ->addFilter ( 'StringTrim ' )
204204 ->addFilter ( new OSS_Filter_StripSlashes () );
@@ -209,7 +209,7 @@ public function init()
209209 ->setRequired ( false )
210210 ->setLabel ( 'Fax ' )
211211 ->setAttrib ( 'placeholder ' , '+353 1 765 4321 ' )
212- ->setAttrib ( 'class ' , 'span4 ' )
212+ ->setAttrib ( 'class ' , 'span8 ' )
213213 ->addFilter ( 'StringTrim ' )
214214 ->addFilter ( new OSS_Filter_StripSlashes () );
215215 $ this ->addElement ( $ nocfax );
@@ -218,7 +218,7 @@ public function init()
218218 $ nocemail ->addValidator ('emailAddress ' )
219219 ->addValidator ( 'stringLength ' , false , array ( 0 , 40 ) )
220220 ->setRequired ( false )
221- ->setAttrib ( 'class ' , 'span6 ' )
221+ ->setAttrib ( 'class ' , 'span8 ' )
222222 ->
setAttrib (
'placeholder ' ,
'[email protected] ' )
223223 ->setLabel ( 'E-Mail ' );
224224 $ this ->addElement ( $ nocemail );
@@ -228,16 +228,16 @@ public function init()
228228 ->setRegisterInArrayValidator ( true )
229229 ->setLabel ( 'Hours ' )
230230 ->setRequired ( false )
231- ->setAttrib ( 'class ' , 'chzn-select span2 ' );
231+ ->setAttrib ( 'class ' , 'chzn-select span8 ' );
232232 $ this ->addElement ( $ nochours );
233-
234-
233+
234+
235235 $ nocwww = $ this ->createElement ( 'text ' , 'nocwww ' );
236236 $ nocwww ->addValidator ( 'stringLength ' , false , array ( 0 , 255 ) )
237237 ->setRequired ( false )
238238 ->setLabel ( 'Website ' )
239239 ->setAttrib ( 'placeholder ' , 'http://www.noc.example.com/ ' )
240- ->setAttrib ( 'class ' , 'span6 ' )
240+ ->setAttrib ( 'class ' , 'span10 ' )
241241 ->addFilter ( 'StringTrim ' )
242242 ->addFilter ( new OSS_Filter_StripSlashes () );
243243 $ this ->addElement ( $ nocwww );
@@ -253,7 +253,7 @@ public function init()
253253 }
254254
255255
256-
256+
257257 /**
258258 * Create a SELECT / dropdown element of all customer names indexed by their id.
259259 *
@@ -263,16 +263,16 @@ public function init()
263263 public static function getPopulatedSelect ( $ name = 'custid ' )
264264 {
265265 $ cust = new Zend_Form_Element_Select ( $ name );
266-
266+
267267 $ maxId = self ::populateSelectFromDatabase ( $ cust , '\\Entities \\Customer ' , 'id ' , 'name ' , 'name ' , 'ASC ' );
268-
268+
269269 $ cust ->setRegisterInArrayValidator ( true )
270270 ->setRequired ( true )
271271 ->setLabel ( _ ( 'Customer ' ) )
272272 ->setAttrib ( 'class ' , 'span2 chzn-select ' )
273273 ->addValidator ( 'between ' , false , array ( 1 , $ maxId ) )
274274 ->setErrorMessages ( array ( _ ( 'Please select a customer ' ) ) );
275-
275+
276276 return $ cust ;
277277 }
278278
@@ -335,4 +335,3 @@ public function setMultiIXP( $multiIXP, $isEdit )
335335 }
336336
337337}
338-
0 commit comments