public function get_edit($id) { //LOAD JS LIBS Asset::container('footer')->add('form', 'bundles/cms/js/jquery.form.js', 'jquery'); Asset::container('footer')->add('users', 'bundles/cms/js/sections/users_edit.js', 'cms'); $this->layout->header_data = array('title' => LL('cms::title.users_edit', CMSLANG)); $this->layout->top_data = array('search' => false); //GET PAGE DATA $user = CmsUser::find($id); $this->layout->content = View::make('cms::interface.pages.user_new_edit')->with('title', LL('cms::title.users_edit', CMSLANG))->with('user_id', $id)->with('user_username', $user->username)->with('user_email', $user->email)->with('user_role', CmsRole::select_user_roles())->with('user_role_selected', $user->role_id)->with('user_lang', Config::get('cms::settings.interface'))->with('user_lang_selected', $user->lang)->with('user_is_valid', (bool) $user->is_valid); }
public function get_edit($id) { //LOAD JS LIBS Asset::container('footer')->add('form', 'bundles/cms/js/jquery.form.js', 'jquery'); Asset::container('footer')->add('users', 'bundles/cms/js/sections/users_edit.js', 'cms'); $this->layout->header_data = array('title' => LL('cms::title.users_edit', CMSLANG)); $this->layout->top_data = array('search' => false); //GET PAGE DATA $user = CmsUser::find($id); $has_details = !is_null($user->details); $this->layout->content = View::make('cms::interface.pages.user_new_edit')->with('title', LL('cms::title.users_edit', CMSLANG))->with('user_id', $id)->with('user_username', $user->username)->with('user_email', $user->email)->with('user_role', CmsRole::select_user_roles())->with('user_role_selected', $user->role_id)->with('user_lang', Config::get('cms::settings.interface'))->with('user_lang_selected', $user->lang)->with('user_editor', Config::get('cms::settings.editor'))->with('user_editor_selected', $user->editor)->with('user_is_valid', (bool) $user->is_valid)->with('detail_id', $has_details ? $user->details->id : '')->with('user_name', $has_details ? $user->details->name : '')->with('user_surname', $has_details ? $user->details->surname : '')->with('user_address', $has_details ? $user->details->address : '')->with('user_info', $has_details ? $user->details->info : '')->with('user_number', $has_details ? $user->details->number : '')->with('user_city', $has_details ? $user->details->city : '')->with('user_zip', $has_details ? $user->details->zip : '')->with('user_state', $has_details ? $user->details->state : '')->with('user_country', $has_details ? $user->details->country : '')->with('user_tel', $has_details ? $user->details->tel : '')->with('user_cel', $has_details ? $user->details->cel : ''); }