< 052021-03-06⋎07 >

farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Feature requests and bug reports: github.com/farmOS/farmOS/issuesSet by ChanServ on 2018-08-16 at 14:32
02:53*farmBOT has joined
11:36*skipper_is[m] has joined
11:47skipper_is[m]o/ Morning. I'm trying to hook into farm_asset_form_alter, but nothing is being returned.... Does it need declaring somewhere?
11:54skipper_is[m]I've used the eggs module as an example, but it doesn't seem to work...
11:54skipper_is[m]Cannot figure out why
12:18skipper_is[m]..So it turns out that it was an ID 10 T error... Didn't Clear Caches....
12:48mstenta[m]Ah ha! When in doubt... ;-)
12:48skipper_is[m]Yup :) Is there a human readable time since formatter?
12:49skipper_is[m]Like there is a JS module called Moment.js, that you can have time since formatted like "1 Day, 2 Hours and 36 secons"
12:50mstenta[m]I think there's a "custom" option that let's you use PHP date() string options
12:51mstenta[m]www.php.net/manual/en/datetime.format.ph
12:51mstenta[m]Oh wait I might be confusing that with something else
12:53mstenta[m]drupal.stackexchange.com/questions/19928
12:53mstenta[m]Maybe some options there
13:18skipper_is[m]Yea, I'll have a look
13:18skipper_is[m]Otherwise, can we use external js modules in Drupal?
13:21mstenta[m]Yup! Just a matter of adding the JS (drupal_add_js()) and modifying the markup to match
13:21skipper_is[m]Ah sweet, I'll probably just use moment.js then
13:21mstenta[m]Sometimes modifying the markup is the tricky part. Depending on what you're trying to override
13:22skipper_is[m]For flags, how do we get the formatting?
13:22skipper_is[m]A list of particular logs (hoof trimming logs) with the days since it was completed
13:23skipper_is[m]Or rather, a list of animals and when they last had their hooves trimmed
13:41skipper_is[m]Also, in forms, is there just a text element? Not editable, but just some content?
14:18skipper_is[m]...And searching logs? Is there a nice function for finding logs with x title and x assets?
15:07mstenta[m]> Also, in forms, is there just a text element? Not editable, but just some content?
15:07mstenta[m]Yes #markup
15:07mstenta[m]api.drupal.org/api/drupal/developer!topi
15:08mstenta[m]> For flags, how do we get the formatting?
15:08mstenta[m]Not sure I understand
15:08mstenta[m]> ...And searching logs? Is there a nice function for finding logs with x title and x assets?
15:08mstenta[m]From within a form you mean?
15:10skipper_is[m]Yea, or just within a module/php.
15:11skipper_is[m]Used farm_log_asset_query
15:11skipper_is[m]and innerjoin on notes
15:12skipper_is[m]Oh with the flags, so in the log list there is the flags for the logs. It has a specific formatting (with the colours etc), is there a way of just pulling in the flag styling into a form/markup?
15:13mstenta[m]Hmm what's the end goal?
15:14mstenta[m](I'm out right now but will add thoughts as I can)
15:16skipper_is[m]So my quick form will have two parts - one being a simple form to log hoof trimmings, the other is previous hoof trimming records - with the most recent for each animal being listed. If someone has flagged the log as "Monitor", i'd like that flag to be visible in my hoof trimming record list at the bottom. At the moment this list is pure html - just
15:16skipper_is[m]Animal 1: Date trimmed - Some notes here (Monitor Flag)
15:16skipper_is[m]Animal 2: Date trimmed - some other notes here
16:00*trishlatalera[m] has quit (Quit: Idle for 30+ days)
21:22*mstenta[m] has quit (Ping timeout: 265 seconds)
21:22*mstenta[m] has joined
23:38*svenn_ has quit
23:40*svenn has joined

< 052021-03-06⋏07 >