email.tpl 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <div id="tv-input-properties-form{$tv|default}"></div>
  2. {literal}
  3. <script type="text/javascript">
  4. // <![CDATA[
  5. var params = {
  6. {/literal}{foreach from=$params key=k item=v name='p'}
  7. '{$k}': '{$v|escape:"javascript"}'{if NOT $smarty.foreach.p.last},{/if}
  8. {/foreach}{literal}
  9. };
  10. var oc = {'change':{fn:function(){Ext.getCmp('modx-panel-tv').markDirty();},scope:this}};
  11. var element = Ext.getCmp('modx-tv-elements');
  12. if (element) {
  13. element.hide();
  14. }
  15. MODx.load({
  16. xtype: 'panel'
  17. ,layout: 'form'
  18. ,cls: 'form-with-labels'
  19. ,labelAlign: 'top'
  20. ,autoHeight: true
  21. ,border: false
  22. ,items: [{
  23. xtype: 'combo-boolean'
  24. ,fieldLabel: _('required')
  25. ,description: MODx.expandHelp ? '' : _('required_desc')
  26. ,name: 'inopt_allowBlank'
  27. ,hiddenName: 'inopt_allowBlank'
  28. ,id: 'inopt_allowBlank{/literal}{$tv|default}{literal}'
  29. ,width: 200
  30. ,value: (params['allowBlank']) ? !(params['allowBlank'] === 0 || params['allowBlank'] === 'false') : true
  31. ,listeners: oc
  32. },{
  33. xtype: MODx.expandHelp ? 'label' : 'hidden'
  34. ,forId: 'inopt_allowBlank{/literal}{$tv|default}{literal}'
  35. ,html: _('required_desc')
  36. ,cls: 'desc-under'
  37. },{
  38. xtype: 'textfield'
  39. ,fieldLabel: _('max_length')
  40. ,description: MODx.expandHelp ? '' : _('max_length_desc')
  41. ,name: 'inopt_maxLength'
  42. ,id: 'inopt_maxLength{/literal}{$tv|default}{literal}'
  43. ,value: params['maxLength'] || ''
  44. ,width: 200
  45. ,listeners: oc
  46. },{
  47. xtype: MODx.expandHelp ? 'label' : 'hidden'
  48. ,forId: 'inopt_maxLength{/literal}{$tv|default}{literal}'
  49. ,html: _('max_length_desc')
  50. ,cls: 'desc-under'
  51. },{
  52. xtype: 'textfield'
  53. ,fieldLabel: _('min_length')
  54. ,description: MODx.expandHelp ? '' : _('min_length_desc')
  55. ,name: 'inopt_minLength'
  56. ,id: 'inopt_minLength{/literal}{$tv|default}{literal}'
  57. ,value: params['minLength'] || ''
  58. ,width: 200
  59. ,listeners: oc
  60. },{
  61. xtype: MODx.expandHelp ? 'label' : 'hidden'
  62. ,forId: 'inopt_minLength{/literal}{$tv|default}{literal}'
  63. ,html: _('min_length_desc')
  64. ,cls: 'desc-under'
  65. }]
  66. ,renderTo: 'tv-input-properties-form{/literal}{$tv|default}{literal}'
  67. });
  68. // ]]>
  69. </script>
  70. {/literal}