Graham Quince Posted July 16, 2019 Share Posted July 16, 2019 Just something I'm working on, a new widget which you can link to a form and display a list of people from the group and a tick and time / date of submission. I think it needs more work with formatting - I've used the group selector from the Random Name Selector (included here because I know @pconkie was also talking about group selectors and I bet others are interested too) 'widget.live': function(el, ev, data) { this.element.html( this.view( 'main.ejs', {widgettitle: this.prefs.widgettitle.value} ) ); this.element.find('.memberlist').hide(); var warn = this.element.find('.warning'); if (JSON.parse(this.prefs.preselected_form.value).formUuid=="") { warn.html('<h4>No Form selected</h4>'); warn.addClass('alert-danger'); } else { warn.hide(); } steal.import('frogui/modules/selectusers/selectusers!frog-component').then(function() { var groupName = this.element.find("div.group-select input.groupName"), groupSelect = this.element.find("div.group-select"); groupSelect.frogui_modules_selectusers({ show_label: false, show_permission: false, show_submit: true, submit_label: 'Check submissions', allow_convert: false, search_users: false, max_selections: 1, profiles: ['admin','staff','parent','governor','student','external admin','external staff'] }); }.bind(this)); }, 'selectusers.submitted': function() { var groupSelect = this.element.find("div.group-select"); groupSelect.trigger('selectusers.getSelected', function(data) { if (!data.groups.length) { return; } var selectedGroup = data.groups[0].uuid, formData = JSON.parse(this.prefs.preselected_form.value), formEntries = [], timeEntries = []; .... 1 Link to comment Share on other sites More sharing options...
ADT Posted July 16, 2019 Share Posted July 16, 2019 Useful bit of kit... Link to comment Share on other sites More sharing options...
gbligh Posted July 18, 2019 Share Posted July 18, 2019 Can I get this? @Graham Quince Link to comment Share on other sites More sharing options...
pconkie Posted July 21, 2019 Share Posted July 21, 2019 Great @Graham Quince What other frogui modules are there and is there any documentation? For example is there a user selector or a subject selector? Maybe a date picker? Link to comment Share on other sites More sharing options...
adamw Posted July 22, 2019 Share Posted July 22, 2019 On 21/07/2019 at 09:47, pconkie said: Great @Graham Quince What other frogui modules are there and is there any documentation? For example is there a user selector or a subject selector? Maybe a date picker? There are tonnes of them. Pretty much everything in Frog is either a component or a module (at least, we always try to do that). Unfortunately they were for internal use, so we don't have any documentation as such. All of the things you mentioned have either a component or a module associated with them (for easy reuse and consistency throughout the platform). However, we shall need to call upon the front-end guru's of Frog in order to unlock this mystical power. To get started though, I can see that we have: frogui_components_date_time_picker //date time picker frogui_components_curriculumbrowser_subject //subject picker (I think) frogui._modules_selectusers //users select A quick check shows we have around ~60 modules and 100 components - so if you're trying to do anything in particular, it might be worth asking if we have a component available for it first (pretty much if you can see some functionality in the front end, there's a good chance we have something already) 1 Link to comment Share on other sites More sharing options...
Graham Quince Posted July 31, 2019 Author Share Posted July 31, 2019 Update: This widget is now published: Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now