Mage_Core_Adminhtml - Version 1.6.1.0

Version Notes

1.6.1.0

Download this release

Release Info

Developer Magento Core Team
Extension Mage_Core_Adminhtml
Version 1.6.1.0
Comparing to
See all releases


Version 1.6.1.0

Files changed (262) hide show
  1. app/code/core/Mage/Adminhtml/Block/Abstract.php +47 -0
  2. app/code/core/Mage/Adminhtml/Block/Api/Buttons.php +102 -0
  3. app/code/core/Mage/Adminhtml/Block/Api/Editroles.php +64 -0
  4. app/code/core/Mage/Adminhtml/Block/Api/Edituser.php +57 -0
  5. app/code/core/Mage/Adminhtml/Block/Api/Grid/Role.php +81 -0
  6. app/code/core/Mage/Adminhtml/Block/Api/Role.php +46 -0
  7. app/code/core/Mage/Adminhtml/Block/Api/Role/Grid/User.php +182 -0
  8. app/code/core/Mage/Adminhtml/Block/Api/Roles.php +51 -0
  9. app/code/core/Mage/Adminhtml/Block/Api/Tab/Roleinfo.php +81 -0
  10. app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php +117 -0
  11. app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php +57 -0
  12. app/code/core/Mage/Adminhtml/Block/Api/Tab/Userroles.php +49 -0
  13. app/code/core/Mage/Adminhtml/Block/Api/User.php +45 -0
  14. app/code/core/Mage/Adminhtml/Block/Api/User/Edit.php +58 -0
  15. app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Form.php +45 -0
  16. app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php +153 -0
  17. app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Roles.php +119 -0
  18. app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tabs.php +62 -0
  19. app/code/core/Mage/Adminhtml/Block/Api/User/Grid.php +106 -0
  20. app/code/core/Mage/Adminhtml/Block/Api/Users.php +54 -0
  21. app/code/core/Mage/Adminhtml/Block/Backup.php +68 -0
  22. app/code/core/Mage/Adminhtml/Block/Backup/Grid.php +108 -0
  23. app/code/core/Mage/Adminhtml/Block/Cache.php +67 -0
  24. app/code/core/Mage/Adminhtml/Block/Cache/Additional.php +38 -0
  25. app/code/core/Mage/Adminhtml/Block/Cache/Grid.php +182 -0
  26. app/code/core/Mage/Adminhtml/Block/Cache/Notifications.php +66 -0
  27. app/code/core/Mage/Adminhtml/Block/Catalog.php +41 -0
  28. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Abstract.php +209 -0
  29. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Checkboxes/Tree.php +98 -0
  30. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit.php +45 -0
  31. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit/Form.php +234 -0
  32. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Image.php +44 -0
  33. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Pricestep.php +64 -0
  34. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Available.php +67 -0
  35. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Default.php +67 -0
  36. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php +179 -0
  37. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Design.php +58 -0
  38. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php +137 -0
  39. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php +162 -0
  40. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php +167 -0
  41. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php +352 -0
  42. app/code/core/Mage/Adminhtml/Block/Catalog/Category/Widget/Chooser.php +178 -0
  43. app/code/core/Mage/Adminhtml/Block/Catalog/Form.php +48 -0
  44. app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Attribute/Urlkey.php +65 -0
  45. app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/DateFieldsOrder.php +61 -0
  46. app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/YearRange.php +54 -0
  47. app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php +183 -0
  48. app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg.php +72 -0
  49. app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php +65 -0
  50. app/code/core/Mage/Adminhtml/Block/Catalog/Product.php +94 -0
  51. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute.php +46 -0
  52. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php +101 -0
  53. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Form.php +46 -0
  54. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php +106 -0
  55. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Main.php +261 -0
  56. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Options.php +36 -0
  57. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/System.php +134 -0
  58. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tabs.php +73 -0
  59. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Grid.php +123 -0
  60. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Attributes.php +94 -0
  61. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Created.php +89 -0
  62. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php +78 -0
  63. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php +409 -0
  64. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formattribute.php +70 -0
  65. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formgroup.php +88 -0
  66. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formset.php +87 -0
  67. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Attribute.php +39 -0
  68. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Group.php +39 -0
  69. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php +88 -0
  70. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main.php +71 -0
  71. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main/Filter.php +64 -0
  72. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Configure.php +74 -0
  73. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Error.php +47 -0
  74. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset.php +62 -0
  75. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Configurable.php +76 -0
  76. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Grouped.php +146 -0
  77. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Options.php +73 -0
  78. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Qty.php +75 -0
  79. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Update/Result.php +50 -0
  80. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Created.php +152 -0
  81. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php +249 -0
  82. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php +136 -0
  83. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Attributes.php +124 -0
  84. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php +102 -0
  85. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Websites.php +75 -0
  86. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tabs.php +45 -0
  87. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Js.php +52 -0
  88. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Ajax/Serializer.php +71 -0
  89. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts.php +77 -0
  90. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Price.php +122 -0
  91. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php +114 -0
  92. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php +161 -0
  93. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Create.php +103 -0
  94. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Categories.php +239 -0
  95. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Crosssell.php +260 -0
  96. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Inventory.php +145 -0
  97. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options.php +72 -0
  98. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php +345 -0
  99. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Abstract.php +69 -0
  100. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Date.php +44 -0
  101. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/File.php +43 -0
  102. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Select.php +90 -0
  103. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Text.php +44 -0
  104. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price.php +63 -0
  105. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Recurring.php +49 -0
  106. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Tier.php +382 -0
  107. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Related.php +258 -0
  108. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Reviews.php +55 -0
  109. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Settings.php +90 -0
  110. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php +341 -0
  111. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid.php +312 -0
  112. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Filter/Inventory.php +56 -0
  113. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Checkbox.php +72 -0
  114. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Inventory.php +51 -0
  115. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php +196 -0
  116. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php +236 -0
  117. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php +159 -0
  118. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Tag.php +108 -0
  119. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Tag/Customer.php +103 -0
  120. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Upsell.php +257 -0
  121. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php +111 -0
  122. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php +238 -0
  123. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php +59 -0
  124. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Grouped.php +46 -0
  125. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Frontend/Product/Watermark.php +107 -0
  126. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php +291 -0
  127. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php +71 -0
  128. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Boolean.php +50 -0
  129. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Config.php +70 -0
  130. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php +191 -0
  131. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php +170 -0
  132. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php +64 -0
  133. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Enabled.php +49 -0
  134. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Price.php +49 -0
  135. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php +90 -0
  136. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Price.php +37 -0
  137. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser.php +294 -0
  138. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser/Container.php +46 -0
  139. app/code/core/Mage/Adminhtml/Block/Catalog/Search.php +46 -0
  140. app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit.php +59 -0
  141. app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php +157 -0
  142. app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php +178 -0
  143. app/code/core/Mage/Adminhtml/Block/Checkout/Agreement.php +44 -0
  144. app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit.php +66 -0
  145. app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php +151 -0
  146. app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Grid.php +110 -0
  147. app/code/core/Mage/Adminhtml/Block/Cms/Block.php +45 -0
  148. app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php +83 -0
  149. app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php +140 -0
  150. app/code/core/Mage/Adminhtml/Block/Cms/Block/Grid.php +132 -0
  151. app/code/core/Mage/Adminhtml/Block/Cms/Block/Widget/Chooser.php +159 -0
  152. app/code/core/Mage/Adminhtml/Block/Cms/Page.php +67 -0
  153. app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php +142 -0
  154. app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Form.php +46 -0
  155. app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php +153 -0
  156. app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php +184 -0
  157. app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php +175 -0
  158. app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php +135 -0
  159. app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tabs.php +44 -0
  160. app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid.php +150 -0
  161. app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid/Renderer/Action.php +41 -0
  162. app/code/core/Mage/Adminhtml/Block/Cms/Page/Widget/Chooser.php +165 -0
  163. app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content.php +161 -0
  164. app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php +155 -0
  165. app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Newfolder.php +37 -0
  166. app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php +71 -0
  167. app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Tree.php +99 -0
  168. app/code/core/Mage/Adminhtml/Block/Customer.php +46 -0
  169. app/code/core/Mage/Adminhtml/Block/Customer/Edit.php +123 -0
  170. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Form.php +60 -0
  171. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php +56 -0
  172. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php +69 -0
  173. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php +244 -0
  174. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php +274 -0
  175. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Cart.php +158 -0
  176. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Carts.php +64 -0
  177. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter.php +99 -0
  178. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid.php +126 -0
  179. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Filter/Status.php +71 -0
  180. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Action.php +73 -0
  181. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Status.php +65 -0
  182. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Orders.php +136 -0
  183. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Reviews.php +55 -0
  184. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tag.php +122 -0
  185. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tags.php +122 -0
  186. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php +204 -0
  187. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Accordion.php +88 -0
  188. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Cart.php +123 -0
  189. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Grid/Renderer/Item.php +136 -0
  190. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Orders.php +126 -0
  191. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Sales.php +139 -0
  192. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php +137 -0
  193. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist.php +279 -0
  194. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist/Grid/Renderer/Description.php +42 -0
  195. app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php +131 -0
  196. app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/Boolean.php +56 -0
  197. app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/File.php +212 -0
  198. app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/Image.php +104 -0
  199. app/code/core/Mage/Adminhtml/Block/Customer/Grid.php +221 -0
  200. app/code/core/Mage/Adminhtml/Block/Customer/Grid/Filter/Country.php +44 -0
  201. app/code/core/Mage/Adminhtml/Block/Customer/Grid/Renderer/Multiaction.php +92 -0
  202. app/code/core/Mage/Adminhtml/Block/Customer/Group.php +57 -0
  203. app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit.php +64 -0
  204. app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit/Form.php +98 -0
  205. app/code/core/Mage/Adminhtml/Block/Customer/Group/Grid.php +90 -0
  206. app/code/core/Mage/Adminhtml/Block/Customer/Online.php +60 -0
  207. app/code/core/Mage/Adminhtml/Block/Customer/Online/Filter.php +77 -0
  208. app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php +166 -0
  209. app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php +42 -0
  210. app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Type.php +42 -0
  211. app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Url.php +47 -0
  212. app/code/core/Mage/Adminhtml/Block/Dashboard.php +88 -0
  213. app/code/core/Mage/Adminhtml/Block/Dashboard/Abstract.php +80 -0
  214. app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php +116 -0
  215. app/code/core/Mage/Adminhtml/Block/Dashboard/Diagrams.php +59 -0
  216. app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php +560 -0
  217. app/code/core/Mage/Adminhtml/Block/Dashboard/Grid.php +50 -0
  218. app/code/core/Mage/Adminhtml/Block/Dashboard/Grids.php +89 -0
  219. app/code/core/Mage/Adminhtml/Block/Dashboard/Orders/Grid.php +124 -0
  220. app/code/core/Mage/Adminhtml/Block/Dashboard/Sales.php +71 -0
  221. app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Last.php +102 -0
  222. app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Renderer/Searchquery.php +47 -0
  223. app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Top.php +104 -0
  224. app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Amounts.php +69 -0
  225. app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Most.php +118 -0
  226. app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Newest.php +116 -0
  227. app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Orders.php +68 -0
  228. app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Ordered.php +126 -0
  229. app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Viewed.php +105 -0
  230. app/code/core/Mage/Adminhtml/Block/Dashboard/Totals.php +79 -0
  231. app/code/core/Mage/Adminhtml/Block/Denied.php +37 -0
  232. app/code/core/Mage/Adminhtml/Block/Html/Date.php +48 -0
  233. app/code/core/Mage/Adminhtml/Block/Html/Select.php +47 -0
  234. app/code/core/Mage/Adminhtml/Block/Media/Editor.php +152 -0
  235. app/code/core/Mage/Adminhtml/Block/Media/Uploader.php +218 -0
  236. app/code/core/Mage/Adminhtml/Block/Messages.php +48 -0
  237. app/code/core/Mage/Adminhtml/Block/Newsletter/Problem.php +90 -0
  238. app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php +102 -0
  239. app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Filter/Checkbox.php +46 -0
  240. app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Renderer/Checkbox.php +47 -0
  241. app/code/core/Mage/Adminhtml/Block/Newsletter/Queue.php +47 -0
  242. app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php +262 -0
  243. app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit/Form.php +202 -0
  244. app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid.php +130 -0
  245. app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid/Renderer/Action.php +79 -0
  246. app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview.php +79 -0
  247. app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview/Form.php +69 -0
  248. app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber.php +96 -0
  249. app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php +208 -0
  250. app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Checkbox.php +46 -0
  251. app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php +71 -0
  252. app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Renderer/Checkbox.php +52 -0
  253. app/code/core/Mage/Adminhtml/Block/Newsletter/Template.php +59 -0
  254. app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php +350 -0
  255. app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit/Form.php +155 -0
  256. app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid.php +121 -0
  257. app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php +62 -0
  258. app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Sender.php +51 -0
  259. app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview.php +76 -0
  260. app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview/Form.php +70 -0
  261. app/code/core/Mage/Adminhtml/Block/Notification/Baseurl.php +64 -0
  262. app/code/core/Mage/Adminhtml/Block/Notification/Grid.php +68 -0
app/code/core/Mage/Adminhtml/Block/Abstract.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Adminhtml abstract block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Abstract extends Mage_Core_Block_Template
35
+ {
36
+
37
+ /**
38
+ * Enter description here...
39
+ *
40
+ * @return string
41
+ */
42
+ protected function _getUrlModelClass()
43
+ {
44
+ return 'adminhtml/url';
45
+ }
46
+
47
+ }
app/code/core/Mage/Adminhtml/Block/Api/Buttons.php ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ class Mage_Adminhtml_Block_Api_Buttons extends Mage_Adminhtml_Block_Template
28
+ {
29
+
30
+ public function __construct()
31
+ {
32
+ parent::__construct();
33
+ $this->setTemplate('api/userinfo.phtml');
34
+ }
35
+
36
+ protected function _prepareLayout()
37
+ {
38
+ $this->setChild('backButton',
39
+ $this->getLayout()->createBlock('adminhtml/widget_button')
40
+ ->setData(array(
41
+ 'label' => Mage::helper('adminhtml')->__('Back'),
42
+ 'onclick' => 'window.location.href=\''.$this->getUrl('*/*/').'\'',
43
+ 'class' => 'back'
44
+ ))
45
+ );
46
+
47
+ $this->setChild('resetButton',
48
+ $this->getLayout()->createBlock('adminhtml/widget_button')
49
+ ->setData(array(
50
+ 'label' => Mage::helper('adminhtml')->__('Reset'),
51
+ 'onclick' => 'window.location.reload()'
52
+ ))
53
+ );
54
+
55
+ $this->setChild('saveButton',
56
+ $this->getLayout()->createBlock('adminhtml/widget_button')
57
+ ->setData(array(
58
+ 'label' => Mage::helper('adminhtml')->__('Save Role'),
59
+ 'onclick' => 'roleForm.submit();return false;',
60
+ 'class' => 'save'
61
+ ))
62
+ );
63
+
64
+ $this->setChild('deleteButton',
65
+ $this->getLayout()->createBlock('adminhtml/widget_button')
66
+ ->setData(array(
67
+ 'label' => Mage::helper('adminhtml')->__('Delete Role'),
68
+ 'onclick' => 'deleteConfirm(\'' . Mage::helper('adminhtml')->__('Are you sure you want to do this?') . '\', \'' . $this->getUrl('*/*/delete', array('rid' => $this->getRequest()->getParam('rid'))) . '\')',
69
+ 'class' => 'delete'
70
+ ))
71
+ );
72
+ return parent::_prepareLayout();
73
+ }
74
+
75
+ public function getBackButtonHtml()
76
+ {
77
+ return $this->getChildHtml('backButton');
78
+ }
79
+
80
+ public function getResetButtonHtml()
81
+ {
82
+ return $this->getChildHtml('resetButton');
83
+ }
84
+
85
+ public function getSaveButtonHtml()
86
+ {
87
+ return $this->getChildHtml('saveButton');
88
+ }
89
+
90
+ public function getDeleteButtonHtml()
91
+ {
92
+ if( intval($this->getRequest()->getParam('rid')) == 0 ) {
93
+ return;
94
+ }
95
+ return $this->getChildHtml('deleteButton');
96
+ }
97
+
98
+ public function getUser()
99
+ {
100
+ return Mage::registry('user_data');
101
+ }
102
+ }
app/code/core/Mage/Adminhtml/Block/Api/Editroles.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ class Mage_Adminhtml_Block_Api_Editroles extends Mage_Adminhtml_Block_Widget_Tabs {
28
+ public function __construct()
29
+ {
30
+ parent::__construct();
31
+ $this->setId('role_info_tabs');
32
+ $this->setDestElementId('role_edit_form');
33
+ $this->setTitle(Mage::helper('adminhtml')->__('Role Information'));
34
+ }
35
+
36
+ protected function _beforeToHtml()
37
+ {
38
+ $roleId = $this->getRequest()->getParam('rid', false);
39
+ $role = Mage::getModel("api/roles")
40
+ ->load($roleId);
41
+
42
+ $this->addTab('info', array(
43
+ 'label' => Mage::helper('adminhtml')->__('Role Info'),
44
+ 'title' => Mage::helper('adminhtml')->__('Role Info'),
45
+ 'content' => $this->getLayout()->createBlock('adminhtml/api_tab_roleinfo')->setRole($role)->toHtml(),
46
+ 'active' => true
47
+ ));
48
+
49
+ $this->addTab('account', array(
50
+ 'label' => Mage::helper('adminhtml')->__('Role Resources'),
51
+ 'title' => Mage::helper('adminhtml')->__('Role Resources'),
52
+ 'content' => $this->getLayout()->createBlock('adminhtml/api_tab_rolesedit')->toHtml(),
53
+ ));
54
+
55
+ if( intval($roleId) > 0 ) {
56
+ $this->addTab('roles', array(
57
+ 'label' => Mage::helper('adminhtml')->__('Role Users'),
58
+ 'title' => Mage::helper('adminhtml')->__('Role Users'),
59
+ 'content' => $this->getLayout()->createBlock('adminhtml/api_tab_rolesusers', 'role.users.grid')->toHtml(),
60
+ ));
61
+ }
62
+ return parent::_beforeToHtml();
63
+ }
64
+ }
app/code/core/Mage/Adminhtml/Block/Api/Edituser.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ class Mage_Adminhtml_Block_Api_Edituser extends Mage_Adminhtml_Block_Widget_Tabs {
28
+ public function __construct()
29
+ {
30
+ parent::__construct();
31
+ $this->setId('customer_info_tabs');
32
+ $this->setDestElementId('user_edit_form');
33
+ }
34
+
35
+ protected function _beforeToHtml()
36
+ {
37
+ $this->addTab('account', array(
38
+ 'label' => Mage::helper('adminhtml')->__('User Info'),
39
+ 'title' => Mage::helper('adminhtml')->__('User Info'),
40
+ 'content' => $this->getLayout()->createBlock('adminhtml/api_tab_useredit')->toHtml(),
41
+ 'active' => true
42
+ ));
43
+ if( $this->getUser()->getUserId() ) {
44
+ $this->addTab('roles', array(
45
+ 'label' => Mage::helper('adminhtml')->__('Roles'),
46
+ 'title' => Mage::helper('adminhtml')->__('Roles'),
47
+ 'content' => $this->getLayout()->createBlock('adminhtml/api_tab_userroles')->toHtml(),
48
+ ));
49
+ }
50
+ return parent::_beforeToHtml();
51
+ }
52
+
53
+ public function getUser()
54
+ {
55
+ return Mage::registry('user_data');
56
+ }
57
+ }
app/code/core/Mage/Adminhtml/Block/Api/Grid/Role.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * roles grid
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Api_Grid_Role extends Mage_Adminhtml_Block_Widget_Grid
35
+ {
36
+ public function __construct()
37
+ {
38
+ parent::__construct();
39
+ $this->setId('roleGrid');
40
+ $this->setSaveParametersInSession(true);
41
+ $this->setDefaultSort('role_id');
42
+ $this->setDefaultDir('asc');
43
+ $this->setUseAjax(true);
44
+ }
45
+
46
+ protected function _prepareCollection()
47
+ {
48
+ $collection = Mage::getModel("api/roles")->getCollection();
49
+ $this->setCollection($collection);
50
+
51
+ return parent::_prepareCollection();
52
+ }
53
+
54
+ protected function _prepareColumns()
55
+ {
56
+
57
+ $this->addColumn('role_id', array(
58
+ 'header' =>Mage::helper('adminhtml')->__('ID'),
59
+ 'index' =>'role_id',
60
+ 'align' => 'right',
61
+ 'width' => '50px'
62
+ ));
63
+
64
+ $this->addColumn('role_name', array(
65
+ 'header' =>Mage::helper('adminhtml')->__('Role Name'),
66
+ 'index' =>'role_name'
67
+ ));
68
+
69
+ return parent::_prepareColumns();
70
+ }
71
+
72
+ public function getGridUrl()
73
+ {
74
+ return $this->getUrl('*/*/roleGrid', array('_current'=>true));
75
+ }
76
+
77
+ public function getRowUrl($row)
78
+ {
79
+ return $this->getUrl('*/*/editrole', array('rid' => $row->getRoleId()));
80
+ }
81
+ }
app/code/core/Mage/Adminhtml/Block/Api/Role.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Adminhtml permissioms role block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+
35
+ class Mage_Adminhtml_Block_Api_Role extends Mage_Adminhtml_Block_Widget_Grid_Container
36
+ {
37
+
38
+ public function __construct()
39
+ {
40
+ $this->_controller = 'api_role';
41
+ $this->_headerText = Mage::helper('adminhtml')->__('Roles');
42
+ $this->_addButtonLabel = Mage::helper('adminhtml')->__('Add New Role');
43
+ parent::__construct();
44
+ }
45
+
46
+ }
app/code/core/Mage/Adminhtml/Block/Api/Role/Grid/User.php ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Acl role user grid
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Api_Role_Grid_User extends Mage_Adminhtml_Block_Widget_Grid
35
+ {
36
+
37
+ public function __construct()
38
+ {
39
+ parent::__construct();
40
+ $this->setDefaultSort('role_user_id');
41
+ $this->setDefaultDir('asc');
42
+ $this->setId('roleUserGrid');
43
+ $this->setDefaultFilter(array('in_role_users'=>1));
44
+ $this->setUseAjax(true);
45
+ }
46
+
47
+ protected function _addColumnFilterToCollection($column)
48
+ {
49
+ if ($column->getId() == 'in_role_users') {
50
+ $inRoleIds = $this->_getUsers();
51
+ if (empty($inRoleIds)) {
52
+ $inRoleIds = 0;
53
+ }
54
+ if ($column->getFilter()->getValue()) {
55
+ $this->getCollection()->addFieldToFilter('user_id', array('in'=>$inRoleIds));
56
+ }
57
+ else {
58
+ if($inRoleIds) {
59
+ $this->getCollection()->addFieldToFilter('user_id', array('nin'=>$inRoleIds));
60
+ }
61
+ }
62
+ }
63
+ else {
64
+ parent::_addColumnFilterToCollection($column);
65
+ }
66
+ return $this;
67
+ }
68
+
69
+ protected function _prepareCollection()
70
+ {
71
+ $roleId = $this->getRequest()->getParam('rid');
72
+ Mage::register('RID', $roleId);
73
+ $collection = Mage::getModel('api/roles')->getUsersCollection();
74
+ $this->setCollection($collection);
75
+ return parent::_prepareCollection();
76
+ }
77
+
78
+ protected function _prepareColumns()
79
+ {
80
+ $this->addColumn('in_role_users', array(
81
+ 'header_css_class' => 'a-center',
82
+ 'type' => 'checkbox',
83
+ 'name' => 'in_role_users',
84
+ 'values' => $this->_getUsers(),
85
+ 'align' => 'center',
86
+ 'index' => 'user_id'
87
+ ));
88
+
89
+ $this->addColumn('role_user_id', array(
90
+ 'header' =>Mage::helper('adminhtml')->__('User ID'),
91
+ 'width' =>5,
92
+ 'align' =>'left',
93
+ 'sortable' =>true,
94
+ 'index' =>'user_id'
95
+ ));
96
+
97
+ $this->addColumn('role_user_username', array(
98
+ 'header' =>Mage::helper('adminhtml')->__('User Name'),
99
+ 'align' =>'left',
100
+ 'index' =>'username'
101
+ ));
102
+
103
+ $this->addColumn('role_user_firstname', array(
104
+ 'header' =>Mage::helper('adminhtml')->__('First Name'),
105
+ 'align' =>'left',
106
+ 'index' =>'firstname'
107
+ ));
108
+
109
+ $this->addColumn('role_user_lastname', array(
110
+ 'header' =>Mage::helper('adminhtml')->__('Last Name'),
111
+ 'align' =>'left',
112
+ 'index' =>'lastname'
113
+ ));
114
+
115
+ $this->addColumn('role_user_email', array(
116
+ 'header' =>Mage::helper('adminhtml')->__('Email'),
117
+ 'width' =>40,
118
+ 'align' =>'left',
119
+ 'index' =>'email'
120
+ ));
121
+
122
+ $this->addColumn('role_user_is_active', array(
123
+ 'header' => Mage::helper('adminhtml')->__('Status'),
124
+ 'index' => 'is_active',
125
+ 'align' =>'left',
126
+ 'type' => 'options',
127
+ 'options' => array('1' => Mage::helper('adminhtml')->__('Active'), '0' => Mage::helper('adminhtml')->__('Inactive')),
128
+ ));
129
+
130
+ /*
131
+ $this->addColumn('grid_actions',
132
+ array(
133
+ 'header'=>Mage::helper('adminhtml')->__('Actions'),
134
+ 'width'=>5,
135
+ 'sortable'=>false,
136
+ 'filter' =>false,
137
+ 'type' => 'action',
138
+ 'actions' => array(
139
+ array(
140
+ 'caption' => Mage::helper('adminhtml')->__('Remove'),
141
+ 'onClick' => 'role.deleteFromRole($role_id);'
142
+ )
143
+ )
144
+ )
145
+ );
146
+ */
147
+
148
+ return parent::_prepareColumns();
149
+ }
150
+
151
+ public function getGridUrl()
152
+ {
153
+ $roleId = $this->getRequest()->getParam('rid');
154
+ return $this->getUrl('*/*/editrolegrid', array('rid' => $roleId));
155
+ }
156
+
157
+ protected function _getUsers($json=false)
158
+ {
159
+ if ( $this->getRequest()->getParam('in_role_user') != "" ) {
160
+ return $this->getRequest()->getParam('in_role_user');
161
+ }
162
+ $roleId = ( $this->getRequest()->getParam('rid') > 0 ) ? $this->getRequest()->getParam('rid') : Mage::registry('RID');
163
+ $users = Mage::getModel('api/roles')->setId($roleId)->getRoleUsers();
164
+ if (sizeof($users) > 0) {
165
+ if ( $json ) {
166
+ $jsonUsers = Array();
167
+ foreach($users as $usrid) $jsonUsers[$usrid] = 0;
168
+ return Mage::helper('core')->jsonEncode((object)$jsonUsers);
169
+ } else {
170
+ return array_values($users);
171
+ }
172
+ } else {
173
+ if ( $json ) {
174
+ return '{}';
175
+ } else {
176
+ return array();
177
+ }
178
+ }
179
+ }
180
+
181
+ }
182
+
app/code/core/Mage/Adminhtml/Block/Api/Roles.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * user roles block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Api_Roles extends Mage_Adminhtml_Block_Template
35
+ {
36
+ public function __construct()
37
+ {
38
+ parent::__construct();
39
+ $this->setTemplate('api/roles.phtml');
40
+ }
41
+
42
+ public function getAddNewUrl()
43
+ {
44
+ return $this->getUrl('*/*/editrole');
45
+ }
46
+
47
+ public function getGridHtml()
48
+ {
49
+ return $this->getLayout()->createBlock('adminhtml/api_grid_role')->toHtml();
50
+ }
51
+ }
app/code/core/Mage/Adminhtml/Block/Api/Tab/Roleinfo.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * implementing now
29
+ *
30
+ */
31
+ class Mage_Adminhtml_Block_Api_Tab_Roleinfo extends Mage_Adminhtml_Block_Widget_Form
32
+ {
33
+ public function __construct()
34
+ {
35
+ parent::__construct();
36
+ }
37
+
38
+ public function _beforeToHtml() {
39
+ $this->_initForm();
40
+
41
+ return parent::_beforeToHtml();
42
+ }
43
+
44
+ protected function _initForm()
45
+ {
46
+ $roleId = $this->getRequest()->getParam('rid');
47
+
48
+ $form = new Varien_Data_Form();
49
+
50
+ $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('adminhtml')->__('Role Information')));
51
+
52
+ $fieldset->addField('role_name', 'text',
53
+ array(
54
+ 'name' => 'rolename',
55
+ 'label' => Mage::helper('adminhtml')->__('Role Name'),
56
+ 'id' => 'role_name',
57
+ 'class' => 'required-entry',
58
+ 'required' => true,
59
+ )
60
+ );
61
+
62
+ $fieldset->addField('role_id', 'hidden',
63
+ array(
64
+ 'name' => 'role_id',
65
+ 'id' => 'role_id',
66
+ )
67
+ );
68
+
69
+ $fieldset->addField('in_role_user', 'hidden',
70
+ array(
71
+ 'name' => 'in_role_user',
72
+ 'id' => 'in_role_userz',
73
+ )
74
+ );
75
+
76
+ $fieldset->addField('in_role_user_old', 'hidden', array('name' => 'in_role_user_old'));
77
+
78
+ $form->setValues($this->getRole()->getData());
79
+ $this->setForm($form);
80
+ }
81
+ }
app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ class Mage_Adminhtml_Block_Api_Tab_Rolesedit extends Mage_Adminhtml_Block_Widget_Form {
28
+
29
+ public function __construct() {
30
+ parent::__construct();
31
+
32
+ $rid = Mage::app()->getRequest()->getParam('rid', false);
33
+
34
+ $resources = Mage::getModel('api/roles')->getResourcesList();
35
+
36
+ $rules_set = Mage::getResourceModel('api/rules_collection')->getByRoles($rid)->load();
37
+
38
+ $selrids = array();
39
+
40
+ foreach ($rules_set->getItems() as $item) {
41
+ if (array_key_exists(strtolower($item->getResource_id()), $resources) && $item->getPermission() == 'allow') {
42
+ $resources[$item->getResource_id()]['checked'] = true;
43
+ array_push($selrids, $item->getResource_id());
44
+ }
45
+ }
46
+
47
+ $this->setSelectedResources($selrids);
48
+
49
+ $this->setTemplate('api/rolesedit.phtml');
50
+ //->assign('resources', $resources);
51
+ //->assign('checkedResources', join(',', $selrids));
52
+ }
53
+
54
+ public function getEverythingAllowed()
55
+ {
56
+ return in_array('all', $this->getSelectedResources());
57
+ }
58
+
59
+ public function getResTreeJson()
60
+ {
61
+ $rid = Mage::app()->getRequest()->getParam('rid', false);
62
+ $resources = Mage::getModel('api/roles')->getResourcesTree();
63
+
64
+ $rootArray = $this->_getNodeJson($resources,1);
65
+
66
+ $json = Mage::helper('core')->jsonEncode(isset($rootArray['children']) ? $rootArray['children'] : array());
67
+
68
+ return $json;
69
+ }
70
+
71
+ protected function _sortTree($a, $b)
72
+ {
73
+ return $a['sort_order']<$b['sort_order'] ? -1 : ($a['sort_order']>$b['sort_order'] ? 1 : 0);
74
+ }
75
+
76
+
77
+ protected function _getNodeJson($node, $level=0)
78
+ {
79
+ $item = array();
80
+ $selres = $this->getSelectedResources();
81
+
82
+ if ($level != 0) {
83
+ $item['text']= (string)$node->title;
84
+ $item['sort_order']= isset($node->sort_order) ? (string)$node->sort_order : 0;
85
+ $item['id'] = (string)$node->attributes()->aclpath;
86
+
87
+ if (in_array($item['id'], $selres))
88
+ $item['checked'] = true;
89
+ }
90
+ if (isset($node->children)) {
91
+ $children = $node->children->children();
92
+ } else {
93
+ $children = $node->children();
94
+ }
95
+ if (empty($children)) {
96
+ return $item;
97
+ }
98
+
99
+ if ($children) {
100
+ $item['children'] = array();
101
+ //$item['cls'] = 'fiche-node';
102
+ foreach ($children as $child) {
103
+ if ($child->getName()!='title' && $child->getName()!='sort_order' && $child->attributes()->module) {
104
+ if ($level != 0) {
105
+ $item['children'][] = $this->_getNodeJson($child, $level+1);
106
+ } else {
107
+ $item = $this->_getNodeJson($child, $level+1);
108
+ }
109
+ }
110
+ }
111
+ if (!empty($item['children'])) {
112
+ usort($item['children'], array($this, '_sortTree'));
113
+ }
114
+ }
115
+ return $item;
116
+ }
117
+ }
app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ class Mage_Adminhtml_Block_Api_Tab_Rolesusers extends Mage_Adminhtml_Block_Widget_Tabs {
28
+
29
+ public function __construct()
30
+ {
31
+ parent::__construct();
32
+
33
+ $roleId = $this->getRequest()->getParam('rid', false);
34
+
35
+ $users = Mage::getModel("api/user")->getCollection()->load();
36
+ $this->setTemplate('api/rolesusers.phtml')
37
+ ->assign('users', $users->getItems())
38
+ ->assign('roleId', $roleId);
39
+ }
40
+
41
+ protected function _prepareLayout()
42
+ {
43
+ $this->setChild('userGrid', $this->getLayout()->createBlock('adminhtml/api_role_grid_user', 'roleUsersGrid'));
44
+ return parent::_prepareLayout();
45
+ }
46
+
47
+ protected function _getGridHtml()
48
+ {
49
+ return $this->getChildHtml('userGrid');
50
+ }
51
+
52
+ protected function _getJsObjectName()
53
+ {
54
+ return $this->getChild('userGrid')->getJsObjectName();
55
+ }
56
+
57
+ }
app/code/core/Mage/Adminhtml/Block/Api/Tab/Userroles.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+ class Mage_Adminhtml_Block_Api_Tab_Userroles extends Mage_Adminhtml_Block_Widget_Tabs
27
+ {
28
+
29
+ public function __construct()
30
+ {
31
+ parent::__construct();
32
+
33
+ $uid = $this->getRequest()->getParam('id', false);
34
+ $uid = !empty($uid) ? $uid : 0;
35
+ $roles = Mage::getModel("api/roles")
36
+ ->getCollection()
37
+ ->load();
38
+
39
+ $user_roles = Mage::getModel("api/roles")
40
+ ->getUsersCollection()
41
+ ->setUserFilter($uid)
42
+ ->load();
43
+
44
+ $this->setTemplate('api/userroles.phtml')
45
+ ->assign('roles', $roles)
46
+ ->assign('user_roles', $user_roles);
47
+ }
48
+
49
+ }
app/code/core/Mage/Adminhtml/Block/Api/User.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Adminhtml permissions user block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Api_User extends Mage_Adminhtml_Block_Widget_Grid_Container
35
+ {
36
+
37
+ public function __construct()
38
+ {
39
+ $this->_controller = 'api_user';
40
+ $this->_headerText = Mage::helper('adminhtml')->__('Users');
41
+ $this->_addButtonLabel = Mage::helper('adminhtml')->__('Add New User');
42
+ parent::__construct();
43
+ }
44
+
45
+ }
app/code/core/Mage/Adminhtml/Block/Api/User/Edit.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Adminhtml permissions user edit page
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Api_User_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
35
+ {
36
+
37
+ public function __construct()
38
+ {
39
+ $this->_objectId = 'user_id';
40
+ $this->_controller = 'api_user';
41
+
42
+ parent::__construct();
43
+
44
+ $this->_updateButton('save', 'label', Mage::helper('adminhtml')->__('Save User'));
45
+ $this->_updateButton('delete', 'label', Mage::helper('adminhtml')->__('Delete User'));
46
+ }
47
+
48
+ public function getHeaderText()
49
+ {
50
+ if (Mage::registry('api_user')->getId()) {
51
+ return Mage::helper('adminhtml')->__("Edit User '%s'", $this->htmlEscape(Mage::registry('api_user')->getUsername()));
52
+ }
53
+ else {
54
+ return Mage::helper('adminhtml')->__('New User');
55
+ }
56
+ }
57
+
58
+ }
app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Form.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Adminhtml permissions user edit form
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Api_User_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
35
+ {
36
+
37
+ protected function _prepareForm()
38
+ {
39
+ $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post'));
40
+ $form->setUseContainer(true);
41
+ $this->setForm($form);
42
+ return parent::_prepareForm();
43
+ }
44
+
45
+ }
app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php ADDED
@@ -0,0 +1,153 @@