-
Notifications
You must be signed in to change notification settings - Fork 0
Improve ContactForm #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Improve ContactForm #301
Conversation
a024ca5
to
9ceb4f8
Compare
8c775fd
to
ffe680c
Compare
ffe680c
to
8ef7576
Compare
afe1b01
to
65928a3
Compare
15afc4c
to
c57238f
Compare
@@ -112,7 +112,7 @@ public function addAction() | |||
$form->getValue('name') | |||
) | |||
); | |||
$this->redirectNow(Links::channels()); | |||
$this->redirectNow('__CLOSE__'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->redirectNow('__CLOSE__'); | |
$this->switchToSingleColumnLayout(); |
TemplateString::create( | ||
$this->translate( | ||
'No contacts found. To add a new contact, please {{#link}}configure a Channel{{/link}} first.' | ||
.' A default channel is required for the contact.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reasoning to include?:
A default channel is required for the contact.
The time the contact form first appears, this message is gone and the user forgot what it mentioned because he had to click on Add Contact first to actually see the form.
To me, it just adds complexity to the message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see.
"Link existing Icinga Web users. Users from external authentication backends" | ||
. " won't be suggested and must be entered manually." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We add a description now, but don't explain what the purpose is to link Icinga Web users? Missed opportunity, I'd say.
public/css/form.less
Outdated
} | ||
|
||
input.search { | ||
padding-left: 1.5em; // property was overwritten .icinga-controls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without an icon, this padding serves no purpose. Plus, if we really want the icon, this should be standardized somewhat, so a new element type or behavior (completion) should be provided by ipl-web.
"Contact will be notified via the default channel, when no specific channel is configured" | ||
. " in a schedule or event rule" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes there's a trailing period, sometimes not. Please clean that up, so all descriptions have one.
] | ||
); | ||
|
||
$this->addAddressElements(); | ||
$this | ||
->registerElement($defaultChannel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you'd register this in the fieldset, you don't have to move the value back and forth later on.
public/css/form.less
Outdated
fieldset[name="contact_address"] { | ||
padding-bottom: 1em; | ||
border-bottom: 1px solid @gray-light; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use an hr
element instead.
public/css/form.less
Outdated
.icinga-form p.description { | ||
color: @text-color-light; | ||
|
||
&:last-child { // fieldset > .control-group:last-of-type rule unset the last element's bottom margin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it only applies to fieldsets, then please make sure this rule does so as well!
public/css/form.less
Outdated
} | ||
} | ||
|
||
.icinga-form p.description { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
form p.description
should suffice.
|
||
if ($backend instanceof DomainAwareInterface) { | ||
$names = array_map(function ($name) use ($backend) { | ||
return $name . '@' . $backend->getDomain(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the element `default_channel_id` is no longer part of the field set `contact`, it must be handled accordingly
c57238f
to
dfe35cc
Compare
b765153
to
251fde3
Compare
…equired` AvailableChannelType: Make channel a left join relation
ContactControler: Add suggestion action and cleanup code
- ChannelsContoller: Closing the container is sufficient.
251fde3
to
89f0630
Compare
resolves #276, #74
Requires:
.action-link
andbutton-link
css icingaweb2#5370SuggestionElement
ipl-web#305