Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-61395

Make tag element look nicer when freeze

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_35_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • Hide
      1. Log in as admin
      2. Navigate to own profile
      3. Press Edit profile
      4. Set interests to Cat, Dog, Monkey and save
      5. Edit user/editlib.php, around line 390-395 so it looks like the following:

            if (core_tag_tag::is_enabled('core', 'user') and empty($USER->newadminuser)) {
                $mform->addElement('header', 'moodle_interests', get_string('interests'));
                $mform->addElement('tags', 'interests', get_string('interestslist'),
                    array('itemtype' => 'user', 'component' => 'core'));
                $mform->addHelpButton('interests', 'interestslist');
                $mform->freeze('interests'); // <-- ADD THIS LINE!
            }
        

      6. Press Edit profile from your profile page again
      7. Confirm the List of interests frozen element shows each tag styles as an "info" badge (as per user profile page)
      Show
      Log in as admin Navigate to own profile Press Edit profile Set interests to Cat, Dog, Monkey and save Edit user/editlib.php , around line 390-395 so it looks like the following: if (core_tag_tag::is_enabled('core', 'user') and empty($USER->newadminuser)) { $mform->addElement('header', 'moodle_interests', get_string('interests')); $mform->addElement('tags', 'interests', get_string('interestslist'), array('itemtype' => 'user', 'component' => 'core')); $mform->addHelpButton('interests', 'interestslist'); $mform->freeze('interests'); // <-- ADD THIS LINE! } Press Edit profile from your profile page again Confirm the List of interests frozen element shows each tag styles as an "info" badge (as per user profile page)

      Tag element looks ugly when you freeze it, it does not apply bootstrap classes tag taginfo and it looks ugly, see attached screenshot.

      It might be a bit tricky, since the content of the tags are raw text, they are not inside a div or a span which makes it harder to apply css.

        1. MDL-61395_master.png
          MDL-61395_master.png
          31 kB
        2. MDL-61395_v311.png
          MDL-61395_v311.png
          42 kB
        3. MDL-61395_v400.png
          MDL-61395_v400.png
          31 kB
        4. MDL-61395.png
          MDL-61395.png
          8 kB
        5. tag element freeze.png
          tag element freeze.png
          3 kB
        6. Tags elsewhere.png
          Tags elsewhere.png
          3 kB

            pholden Paul Holden
            lameze Simey Lameze
            Simey Lameze Simey Lameze
            Huong Nguyen Huong Nguyen
            John Edward Pedregosa John Edward Pedregosa
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 2 minutes
                2h 2m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.