Sorry for bumping this, but after upgrading to 5.4.0 I’m having some difficulty getting the “Set Access Duration” to appear as the first Action in the list, and as such the one that appears by default on the user create page.
It looks like this is because the actions are now split into Admin and Auth sections, and Admin always seems to be the first in the list. In the previous version I changed the order of the actions in the array in the /lib/pf/Authentication/constants.pm file. Can anyone tell me how this is ordered now please? Cheers, Andi From: Derek Wuelfrath [mailto:[email protected]] Sent: 14 October 2015 14:36 To: ML PF <[email protected]> Subject: Re: [PacketFence-users] tweaking the create users page Excellent! Cheers! dw. — Derek Wuelfrath [email protected]<mailto:[email protected]> :: +1.514.447.4918 (x110) :: +1.866.353.6153 (x110) Inverse inc. :: Leaders behind SOGo (www.sogo.nu<http://www.sogo.nu>) and PacketFence (www.packetfence.org<http://www.packetfence.org>) On Oct 14, 2015, at 4:51 AM, Morris, Andi <[email protected]<mailto:[email protected]>> wrote: That’s got it, thanks. I just needed the following line: <input type=“hidden” name=“expiration” value=“YYYY-MM-DD”> All seems to be working perfectly now. Thanks very much. From: Derek Wuelfrath [mailto:[email protected]] Sent: 13 October 2015 19:45 To: ML PF <[email protected]<mailto:[email protected]>> Subject: Re: [PacketFence-users] tweaking the create users page Andi, What is the “expiration” action type ? Can you send me the whole file so I see what you are trying to do. If you try to hide the “registration window” section use the followings: <input type=“hidden” name=“valid_from” value=“YYYY-MM-DD”> <input type=“hidden” name=“expiration” value=“YYYY-MM-DD”> For the “actions” section, the followings: <input type=“hidden” name=“actions.1.type” value=“MY FIRST ACTION”> <input type=“hidden” name=“actions.1.value” value=“ACTION1 VALUE”> <input type=“hidden” name=“actions.2.type” value=“MY SECOND ACTION”> <input type=“hidden” name=“actions.2.value” value=“ACTION2 VALUE”> Cheers! dw. — Derek Wuelfrath [email protected]<mailto:[email protected]> :: +1.514.447.4918 (x110) :: +1.866.353.6153 (x110) Inverse inc. :: Leaders behind SOGo (www.sogo.nu<http://www.sogo.nu/>) and PacketFence (www.packetfence.org<http://www.packetfence.org/>) On Oct 13, 2015, at 9:22 AM, Morris, Andi <[email protected]<mailto:[email protected]>> wrote: Thanks Derek, That’s been a really big help and I’m nearly there. What is the format for the date field? I’ve tried the following, but I get errors: <input type="hidden" name="actions.3.type" value="expiration"> <input type="hidden" name="actions.3.value" value="2016-10-13 00:00"> The errors I get when creating a user are: Error! Expiration field is required Error! ‘expiration’ is not a valid value The values for dates I’ve tried are: “yyyy-mm-dd” “yyyy/mm/dd” “yyyy-mm-dd hh:mm” “yyyy/mm/dd hh:mm” Cheers, Andi From: Derek Wuelfrath [mailto:[email protected]] Sent: 08 October 2015 18:00 To: ML PF <[email protected]<mailto:[email protected]>> Subject: Re: [PacketFence-users] tweaking the create users page I’ll keep looking for ways to give the users a default unreg date. Here’s how I usually do it: <input type="hidden" name="actions.0.type" value="set_access_duration”> <input type="hidden" name="actions.0.value" value=“"> <input type="hidden" name="actions.1.type" value="set_role”> <input type="hidden" name="actions.1.value" value="Invite"> Cheers! dw. — Derek Wuelfrath [email protected]<mailto:[email protected]> :: +1.514.447.4918 (x110) :: +1.866.353.6153 (x110) Inverse inc. :: Leaders behind SOGo (www.sogo.nu<http://www.sogo.nu/>) and PacketFence (www.packetfence.org<http://www.packetfence.org/>) On Oct 8, 2015, at 12:04 PM, Morris, Andi <[email protected]<mailto:[email protected]>> wrote: Aha, I found the Actions array in /lib/pf/Authentication/constants.pm and changed the order. That means that the Actions now shows ‘Set access duration’ by default on the create screen, perfect. I’ll keep looking for ways to give the users a default unreg date. Cheers, Andi From: Morris, Andi [mailto:[email protected]] Sent: 08 October 2015 16:32 To: [email protected]<mailto:[email protected]> Subject: Re: [PacketFence-users] tweaking the create users page Thanks Derek, I can see how that would work for a simple field such as Name, but I can’t work it out for the unregistration date. 77 <div class="control-group"> 78 <label class="control-label" for="valid_from">[% l('Registration Window') %]</label> 79 <div class="controls input-daterange datepicker"> 80 [% form.field('valid_from').render_element | none %] <i class="icon-arrow-right"></i> 81 [% form.field('expiration').render_element | none %] 82 </div> 83 </div> I still need to swap access duration for the set role action too. 85 <div class="control-group"> 86 <label class="control-label">[% l('Actions') %]</label> 87 <div class="controls"> 88 <table id="ruleActions" class="table table-dynamic table-sortable table-condensed"> 89 <tbody> 90 [% FOREACH action IN form.field('actions').fields -%] 91 <tr[% ' class="hidden"' IF loop.last %]> 92 <td class="sort-handle"> 93 <span>[% IF loop.last %]1[% ELSE %][% loop.index + 1 %][% END %]</span> 94 </td> 95 <td> 96 [% action.field('type').render_element | none %] 97 [% action.field('value').render_element | none %] 98 </td> 99 <td class="action"> 100 <a class="btn-icon" href="#add"><i class="icon-plus-sign"></i></a> 101 <a class="btn-icon[% ' hidden' IF loop.size == 2 %]" href="#delete"><i class="icon-minus-sign"></i></a> 102 </td> 103 </tr> 104 [% END -%] 105 <tr><td colspan="3"><!-- allow dnd to the bottom of the table --></td></tr> 106 </tbody> 107 </table> 108 </div> 109 </div> From: Derek Wuelfrath [mailto:[email protected]] Sent: 08 October 2015 15:44 To: ML PF <[email protected]<mailto:[email protected]>> Subject: Re: [PacketFence-users] tweaking the create users page I managed to hide the registration window from view, but the user couldn’t be created as this seems to be a required field. Is there a way I can make all created users have a certain registration window by default? I’m finding that having the registration time, and access duration is confusing to users. Can you make the fields “hidden” with a value ? That’s how I usually do it Cheers! dw. — Derek Wuelfrath [email protected]<mailto:[email protected]> :: +1.514.447.4918 (x110) :: +1.866.353.6153 (x110) Inverse inc. :: Leaders behind SOGo (www.sogo.nu<http://www.sogo.nu/>) and PacketFence (www.packetfence.org<http://www.packetfence.org/>) On Oct 7, 2015, at 11:38 AM, Morris, Andi <[email protected]<mailto:[email protected]>> wrote: Thanks Derek. That was really helpful. I managed to hide the registration window from view, but the user couldn’t be created as this seems to be a required field. Is there a way I can make all created users have a certain registration window by default? I’m finding that having the registration time, and access duration is confusing to users. Cheers, Andi From: Derek Wuelfrath [mailto:[email protected]] Sent: 01 October 2015 21:39 To: ML PF <[email protected]<mailto:[email protected]>> Subject: Re: [PacketFence-users] tweaking the create users page Andi, It is indeed possible to do it (it’s like zombocom, everything is possible). I actually did it for some specific use cases You would need to create some custom code. You could have a look at html/pfappserver/root/user/create.tt and add some “hidden” fields. There’s of course, may have more file to check but basically, that should do it :) Cheers! dw. — Derek Wuelfrath [email protected]<mailto:[email protected]> :: www.inverse.ca<http://www.inverse.ca/> +1.514.447.4918 (x110) :: +1.866.353.6153 (x110) Inverse inc. :: Leaders behind SOGo (www.sogo.nu<http://www.sogo.nu/>) and PacketFence (www.packetfence.org<http://www.packetfence.org/>) On Oct 1, 2015, at 11:45, Morris, Andi <[email protected]<mailto:[email protected]>> wrote: Is there a way to remove the registration window option and make two actions appear by default (access duration and role) in the create users window? I’m trying to make this page as simple as possible for the staff creating users. Cheers, Andi ------------------------------------- Andi Morris IT Security Officer Cardiff Metropolitan University T: 02920 205720 E: [email protected]<mailto:[email protected]> -------------------------------------- ________________________________ <image001.jpg><http://www.cardiffmet.ac.uk/cardiffmet150> ------------------------------------------------------------------------------ _______________________________________________ PacketFence-users mailing list [email protected]<mailto:[email protected]> https://lists.sourceforge.net/lists/listinfo/packetfence-users ------------------------------------------------------------------------------ Full-scale, agent-less Infrastructure Monitoring from a single dashboard Integrate with 40+ ManageEngine ITSM Solutions for complete visibility Physical-Virtual-Cloud Infrastructure monitoring from one console Real user monitoring with APM Insights and performance trend reports Learn More http://pubads.g.doubleclick.net/gampad/clk?id=247754911&iu=/4140_______________________________________________ PacketFence-users mailing list [email protected]<mailto:[email protected]> https://lists.sourceforge.net/lists/listinfo/packetfence-users ------------------------------------------------------------------------------ _______________________________________________ PacketFence-users mailing list [email protected]<mailto:[email protected]> https://lists.sourceforge.net/lists/listinfo/packetfence-users ------------------------------------------------------------------------------ _______________________________________________ PacketFence-users mailing list [email protected]<mailto:[email protected]> https://lists.sourceforge.net/lists/listinfo/packetfence-users ------------------------------------------------------------------------------ _______________________________________________ PacketFence-users mailing list [email protected]<mailto:[email protected]> https://lists.sourceforge.net/lists/listinfo/packetfence-users
------------------------------------------------------------------------------
_______________________________________________ PacketFence-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/packetfence-users
