Changeset 1517:055caf38ee9f
- Timestamp:
- 08/21/13 15:33:12 (10 years ago)
- Branch:
- twig
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/class.dc.filter.php
r1498 r1517 874 874 */ 875 875 public function init() { 876 echo $this->name.":".($this->multiple?"MULTIPLE":"SIMPLE");877 876 $this->field = new dcFieldCombo( 878 877 $this->filter_id, -
inc/admin/class.dc.form.php
r1507 r1517 162 162 'form_field', 163 163 array($this,'renderField'), 164 array('is_safe' => array('html')) 165 ), 166 new Twig_SimpleFunction( 167 'form_hidden', 168 array($this,'renderHiddenWidgets'), 164 169 array('is_safe' => array('html')) 165 170 ), … … 299 304 } 300 305 } 301 306 302 307 /** 303 308 * getFieldAttributes - binding for 'form_field_attr' twig function; returns all field attributes … … 337 342 */ 338 343 public function renderHiddenWidgets() 339 { 344 { 345 if ($this->currentForm->areHiddenfieldsDisplayed()) { 346 return; 347 } 340 348 foreach ($this->currentForm->getHiddenFields() as $h) { 341 349 $this->renderField($h->getName()); 342 350 } 351 $this->currentForm->setHiddenfieldsDisplayed(); 343 352 } 344 353 … … 433 442 protected $properties; 434 443 444 protected $hiddendisplayed; 435 445 436 446 /** … … 461 471 $this->addNonce(); 462 472 } 463 } 464 473 $this->hiddendisplayed = false; 474 } 475 476 /** 477 * areHiddenFieldsDisplayed - tells whether hidden fields have been rendered or not 478 * 479 * @return boolean true if hidden fields have already been displayed, false otherwise 480 * @access public 481 */ 482 public function areHiddenFieldsDisplayed() { 483 return $this->hiddendisplayed; 484 } 485 486 /** 487 * setHiddenFieldsDisplayed - sets whether hidden fields have been rendered or not 488 * 489 * @param boolean true (default) if hidden fields are to be set as displayed, false otherwise 490 * @access public 491 */ 492 public function setHiddenFieldsDisplayed($value=true) { 493 $this->hiddendisplayed = $value; 494 } 465 495 466 496 /** -
inc/admin/default-templates/auth.html.twig
r1507 r1517 41 41 <p>{{ form_field('user_id') }}</p> 42 42 <p>{{ form_field('user_email') }}</p> 43 <p>{{ form_field('auth_recover')}} </p>43 <p>{{ form_field('auth_recover')}}{{form_hidden()}}</p> 44 44 </fieldset> 45 45 <div id="issue"> -
inc/admin/default-templates/forms/form_layout.html.twig
r1507 r1517 32 32 33 33 {% block field_hidden %} 34 {% spaceless %} 34 35 {% set type = type|default('hidden') %} 35 36 {{ block('field_input') }} 37 {% endspaceless %} 36 38 {% endblock field_hidden %} 37 39 … … 48 50 49 51 {% block field_checkbox %} 52 {% spaceless %} 50 53 {% set type = type|default('checkbox') %} 51 54 {% set nestedlabel = true %} … … 53 56 {% set descafter = true %} 54 57 {{ block('field_input') }} 58 {% endspaceless %} 55 59 {% endblock field_checkbox %} 56 60 -
inc/admin/default-templates/forms/formfilter_layout.html.twig
r1507 r1517 29 29 <p class="clear">{{form_field(fenv.prefix ~ 'clear_filters',{'class':'delete'})}} {{form_field(fenv.prefix ~ 'reset')}}</p> 30 30 <p class="clear margintop"> 31 {{ form_field(fenv.prefix ~ 'apply')}} 31 {{ form_field(fenv.prefix ~ 'apply')}}{{ form_hidden()}} 32 32 </p> 33 33 </div> -
inc/admin/default-templates/forms/lists_layout.html.twig
r1507 r1517 33 33 <div class="two-cols"> 34 34 <p class="col checkboxes-helpers"></p> 35 <p class="col right">{{ form_field ('action',{},{'labelclass':'classic'})}} {{form_field('ok')}} </p>35 <p class="col right">{{ form_field ('action',{},{'labelclass':'classic'})}} {{form_field('ok')}}{{form_hidden()}}</p> 36 36 </div> 37 37 {% endspaceless %} -
inc/admin/default-templates/index.html.twig
r1147 r1517 33 33 <p class="area">{{ form_field('post_content',{'rows':current_user.options.edit_size,'cols':5}) }}</p> 34 34 <p>{{ form_field('cat_id')}}</p> 35 <p>{{ form_field('save')}} </p>35 <p>{{ form_field('save')}}{{form_hidden()}}</p> 36 36 </fieldset> 37 37 {% endform %} -
inc/admin/default-templates/layout.html.twig
r1507 r1517 39 39 {% if blogs is not empty %} - <a href="blogs.php">{{__('Change blog')}}</a>{% endif %} 40 40 {% endif %} 41 <p class="nomobile"><a href="{{current_blog.url}}" onclick="window.open(this.href);return false;" title="{{__('Go to site')}} ({{__('new window')}})">{{__('Go to site')}} <img src="{{theme_url}}images/outgoing.png" alt="" /></a> </p>41 <p class="nomobile"><a href="{{current_blog.url}}" onclick="window.open(this.href);return false;" title="{{__('Go to site')}} ({{__('new window')}})">{{__('Go to site')}} <img src="{{theme_url}}images/outgoing.png" alt="" /></a>{{form_hidden()}}</p> 42 42 {% endform %} 43 43 </div> … … 101 101 {% form 'search-menu' with {'id':'search-menu'} %} 102 102 <p> {{ form_field('q',{'size':30},{'labelclass':'hidden'}) }} 103 {{ form_field('ok') }} 103 {{ form_field('ok') }}{{form_hidden()}} 104 104 </p> 105 105 {% endform %} -
inc/admin/default-templates/post.html.twig
r1507 r1517 60 60 {% endif %} 61 61 62 {{form_field('delete',{'class':'delete'})}} </p>62 {{form_field('delete',{'class':'delete'})}}{{form_hidden()}}</p> 63 63 64 64 </div> … … 96 96 <p>{{ form_field('comment_site',{'size': 30})}}</p> 97 97 <p class="area">{{ form_field('comment_content',{'cols': 50,'rows':8})}}</p> 98 <p>{{ form_field('add') }} </p>98 <p>{{ form_field('add') }}{{form_hidden()}}</p> 99 99 </div> 100 100 -
plugins/aboutConfig/admtpl/index.html.twig
r1507 r1517 14 14 {% if local_settings is not empty %} 15 15 {% form 'local_nav_form' %} 16 <p class="anchor-nav">{{ form_field('local_nav') }} {{ form_field('local_nav_submit') }} </p>16 <p class="anchor-nav">{{ form_field('local_nav') }} {{ form_field('local_nav_submit') }}{{form_hidden()}}</p> 17 17 {% endform %} 18 18 {% endif %} … … 41 41 </tbody></table> 42 42 {% endfor %} 43 <p>{{ form_field('local_submit') }} </p>43 <p>{{ form_field('local_submit') }}{{form_hidden()}}</p> 44 44 {% endform %} 45 45 {% endtab %} … … 48 48 {% if global_settings is not empty %} 49 49 {% form 'global_nav_form' %} 50 <p class="anchor-nav">{{ form_field('global_nav') }} {{ form_field('global_nav_submit') }} </p>50 <p class="anchor-nav">{{ form_field('global_nav') }} {{ form_field('global_nav_submit') }}{{form_hidden()}}</p> 51 51 {% endform %} 52 52 {% endif %} … … 74 74 </tbody></table> 75 75 {% endfor %} 76 <p>{{ form_field('global_submit') }} </p>76 <p>{{ form_field('global_submit') }}{{form_hidden()}}</p> 77 77 {% endform %} 78 78 {% endtab %}
Note: See TracChangeset
for help on using the changeset viewer.