Commit 3dc738fe authored by Dave Lane's avatar Dave Lane

just before removing now-redundant replacement functions

parent 91b78455
......@@ -661,6 +661,7 @@ class OREMain extends OREBase {
'user_id' => $user_id,
'username' => $username,
'fullname' => $display,
'display_name' => $display,
'email' => $new_email,
'firstname' => $first,
'lastname' => $last,
......
......@@ -6,7 +6,7 @@
* 'title' = the title of the dialogue
* 'token' = used to build relevant CSS classes/ids for the markup, usually the key with _ replaced by -
* 'markup' = the HTML exposition and/or form content, not including a wrapper
* replaceable tokens, with a default or dynamic value are in {}
* replaceable tokens, with a default or dynamic value are in {{}}}
* default_action = is the same as the name... this is triggered if the user
* clicks the button with the 'default_label' or hits the 'ENTR' key
* An action can have a success or failed outcome, each with a different
......@@ -62,7 +62,7 @@ $dialog_definitions = array(
'auth' => false,
'markup' => '<div class="form-group">'.
'<label for="credential">'.__('Username or Email', 'oeru-register-enrol').'</label>'.
'<input type="text" class="form-control" id="credential" name="credential" placeholder="'.__('username or user@email', 'oeru-register-enrol').'" aria-describedby="helpCredential" value="{email}">'.
'<input type="text" class="form-control" id="credential" name="credential" placeholder="'.__('username or user@email', 'oeru-register-enrol').'" aria-describedby="helpCredential" value="{{user.email}}">'.
'<span id="helpCredential" class="help-block">'.__('Either is acceptable, because both uniquely identify you in this system.', 'oeru-register-enrol').'</span>'.
'</div>'.
'<div class="form-group">'.
......@@ -95,7 +95,7 @@ $dialog_definitions = array(
'title' => __('Login successful', 'oeru-register-enrol'),
'token' => 'successful-login',
'purpose' => 'confirmation',
'markup' => '<p>'.__('You have successfully logged in as {display_name} ({username}) - please wait while we refresh the page.', 'oeru-register-enrol').'</p>',
'markup' => '<p>'.__('You have successfully logged in as {{user.display_name}} ({{user.username}}) - please wait while we refresh the page.', 'oeru-register-enrol').'</p>',
'default' => array(
'label' => __('Ok', 'oeru-register-enrol'),
'class' => 'submit',
......@@ -124,7 +124,7 @@ $dialog_definitions = array(
__('Enter your Username or Email to identify yourself.', 'oeru-register-enrol').'</label>'.
'<div id="ore-error-wrapper"></div>'.
'<input type="text" class="form-control" id="credential" name="credential" placeholder="'.
__('username or user@email', 'oeru-register-enrol').'" value="{email}" aria-describedby="helpCredential">'.
__('username or user@email', 'oeru-register-enrol').'" value="{{user.email}}" aria-describedby="helpCredential">'.
'<span id="helpCredential" class="help-block">'.
__('Either is acceptable, because both uniquely identify you in this system.', 'oeru-register-enrol').'</span>'.
'</div>',
......@@ -210,13 +210,13 @@ $dialog_definitions = array(
'<div class="form-group">'.
'<label for="email">'.__('Email', 'oeru-register-enrol').'</label>'.
'<input type="email" class="form-control" id="email" name="email" placeholder="'.
__('me@example.com', 'oeru-register-enrol').'" value="{email}" aria-describedby="helpEmail">'.
__('me@example.com', 'oeru-register-enrol').'" value="{{user.email}}" aria-describedby="helpEmail">'.
'<span id="helpEmail" class="help-block">'.
__('Your full email address (must include an "@"). It must be unique in this OERu system.', 'oeru-register-enrol').'</span>'.
'</div>'.
'<div class="form-group">'.
'<label for="usercountry">'.__('Country of origin', 'oeru-register-enrol').'</label>'.
'{country_selector}'.
'{{ore_data.country_select}}'.
'<span id="helpUserCountry" class="help-block">'.
__('Select the country with which you most closely identify, which may not be the one in which you currently are, or where you live.', 'oeru-register-enrol').'</span>'.
'</div>',
......@@ -238,7 +238,7 @@ $dialog_definitions = array(
'title' => __('Registration successful', 'oeru-register-enrol'),
'token' => 'successful-login',
'purpose' => 'confirmation',
'markup' => '<p>'.__('You have successfully created a user account called <strong>{display_name}</strong> with username <strong>{username}</strong>, and email <strong>{email}</strong>.', 'oeru-register-enrol').
'markup' => '<p>'.__('You have successfully created a user account called <strong>{{user.display_name}}</strong> with username <strong>{{user.username}}</strong>, and email <strong>{{user.email}}</strong>.', 'oeru-register-enrol').
'</p><p><em>'.__('Please double-check your email is correct, as it will be used to send you a link to reset your password if you forget it.</em> If you spot an error, you can go to the "edit profile" on the user menu <em>after you log in</em> to fix it.', 'oeru-register-enrol').
'</p><p>'._('You can now Login with those details using the password you specified.', 'oeru-register-enrol').'</p>',
'default' => array(
......@@ -260,37 +260,37 @@ $dialog_definitions = array(
),
),
'edit_profile' => array(
'title' => __('Edit profile for user "{username}"', 'oeru-register-enrol'),
'title' => __('Edit profile for user "{{user.username}}"', 'oeru-register-enrol'),
'token' => 'edit-profile',
'auth' => true,
'markup' => '<div class="form-group">'.
'<label for="firstname">'.__('First Name', 'oeru-register-enrol').'</label>'.
'<input type="text" class="form-control" id="first-name" name="first-name" placeholder="'.
__('your first name', 'oeru-register-enrol').'" aria-describedby="helpFirstName" value="{first_name}">'.
__('your first name', 'oeru-register-enrol').'" aria-describedby="helpFirstName" value="{{user.first_name}}">'.
'<span id="helpFirstName" class="help-block">'.__('Your first or given name(s) as you would like it(them) displayed.', 'oeru-register-enrol').'</span>'.
'<label for="lastname">'.__('Last Name', 'oeru-register-enrol').'</label>'.
'<input type="text" class="form-control" id="last-name" name="last-name" placeholder="'.
__('your last name', 'oeru-register-enrol').'" aria-describedby="helpLastName" value="{last_name}">'.
__('your last name', 'oeru-register-enrol').'" aria-describedby="helpLastName" value="{{user.last_name}}">'.
'<span id="helpLastName" class="help-block">'.
__('Your last or family name(s) as you would like it(them) displayed.', 'oeru-register-enrol').'</span>'.
'</div>'.
'<div class="form-group">'.
'<label for="display-name">'.__('Display Name', 'oeru-register-enrol').'</label>'.
'<input type="text" class="form-control" id="display-name" name="display-name" placeholder="'.
__('Ms Sue Smith', 'oeru-register-enrol').'" aria-describedby="helpDisplayName" value="{display_name}">'.
__('Ms Sue Smith', 'oeru-register-enrol').'" aria-describedby="helpDisplayName" value="{{user.display_name}}">'.
'<span id="helpDisplayName" class="help-block">'.
__('Your publicly visible name or preferred nickname.', 'oeru-register-enrol').'</span>'.
'</div>'.
'<div class="form-group">'.
'<label for="email">'.__('Email', 'oeru-register-enrol').'</label>'.
'<input type="text" class="form-control" id="email" name="email" placeholder="'.
__('me@example.com', 'oeru-register-enrol').'" value="{email}" aria-describedby="helpEmail">'.
__('me@example.com', 'oeru-register-enrol').'" value="{{user.email}}" aria-describedby="helpEmail">'.
'<span id="helpEmail" class="help-block">'.
__('Your full email address (must include an "@"). It must be unique in this OERu system.', 'oeru-register-enrol').'</span>'.
'</div>'.
'<div class="form-group">'.
'<label for="usercountry">'.__('Country of origin', 'oeru-register-enrol').'</label>'.
'{country_selector}'.
'{{ore_data.country_select}}'.
'<span id="helpUserCountry" class="help-block">'.
__('Select the country with which you most closely identify, which may not be the one in which you currently are, or where you live.', 'oeru-register-enrol').'</span>'.
'</div>',
......@@ -308,20 +308,20 @@ $dialog_definitions = array(
),
),
'profile_saved' => array(
'title' => __('Profile for user "{username}" has been saved', 'oeru-register-enrol'),
'title' => __('Profile for user "{{user.username}}" has been saved', 'oeru-register-enrol'),
'token' => 'profile-saved',
'purpose' => 'confirmation',
'markup' => '<p>'.__('Profile for <strong>{display_name}</strong> successfully updated.', 'oeru-register-enrol').'</p>',
'markup' => '<p>'.__('Profile for <strong>{{user.display_name}}</strong> successfully updated.', 'oeru-register-enrol').'</p>',
'default' => array(
'label' => __('Ok', 'oeru-register-enrol'),
'class' => 'submit',
),
),
'profile_save_failed' => array(
'title' => __('Profile for user "{username}" was not saved', 'oeru-register-enrol'),
'title' => __('Profile for user "{{user.username}}" was not saved', 'oeru-register-enrol'),
'token' => 'profile-saved',
'purpose' => 'confirmation',
'markup' => '<p>'.__('Error: profile for {display_name} ({username}) <strong>not</strong> updated.', 'oeru-register-enrol').'</p>'.
'markup' => '<p>'.__('Error: profile for {{user.display_name}} ({{user.username}}) <strong>not</strong> updated.', 'oeru-register-enrol').'</p>'.
'<div id="ore-error-wrapper"></div>',
'default' => array(
'label' => __('Ok', 'oeru-register-enrol'),
......@@ -329,7 +329,7 @@ $dialog_definitions = array(
),
),
'update_password' => array(
'title' => __('Update password for user "{username}"', 'oeru-register-enrol'),
'title' => __('Update password for user "{{user.username}}"', 'oeru-register-enrol'),
'token' => 'update-password',
'markup' => '<div class="form-group">'.
'<label for="current-password">'.__('Current Password', 'oeru-register-enrol').'</label>'.
......@@ -365,17 +365,17 @@ $dialog_definitions = array(
'title' => __('Your password has been updated', 'oeru-register-enrol'),
'token' => 'password-updated',
'purpose' => 'confirmation',
'markup' => '<p>'.__('The password for {display_name} has been updated.', 'oeru-register-enrol').'</p>',
'markup' => '<p>'.__('The password for {{user.display_name}} has been updated.', 'oeru-register-enrol').'</p>',
'default' => array(
'label' => __('Ok', 'oeru-register-enrol'),
'class' => 'submit',
),
),
'password_update_failed' => array(
'title' => __('Password for user "{username}" was not updated', 'oeru-register-enrol'),
'title' => __('Password for user "{{user.username}}" was not updated', 'oeru-register-enrol'),
'token' => 'password-update-failed',
'purpose' => 'confirmation',
'markup' => '<p>'.__('Password for <strong>{username}</strong> was <strong>not</strong> updated.', 'oeru-register-enrol').'</p>'.
'markup' => '<p>'.__('Password for <strong>{{user.username}}</strong> was <strong>not</strong> updated.', 'oeru-register-enrol').'</p>'.
'<div id="ore-error-wrapper">&nbsp;</div>',
'default' => array(
'label' => __('Ok', 'oeru-register-enrol'),
......@@ -384,7 +384,7 @@ $dialog_definitions = array(
),
'session_expired' => array(
'title' => __('Session Expired', 'oeru-register-enrol'),
'markup' => '<p>'.__('Your session has timed out. To continue, you must renew your session by entering the password for user {username}.', 'oeru-register-enrol').
'markup' => '<p>'.__('Your session has timed out. To continue, you must renew your session by entering the password for user {{user.username}}.', 'oeru-register-enrol').
'</p><p class="password"><input id="password" name="password" class="password" type="password">'.__('password', 'oeru-register-enrol').'</input></p>',
'token' => 'session-expired',
'default' => array(
......@@ -397,7 +397,7 @@ $dialog_definitions = array(
'title' => __('Enrol in this OERu course', 'oeru-register-enrol'),
'auth' => true,
'token' => 'enrol',
'markup' => '<p>'.__('You can enrol in "{course_title}" ({course_tag}).', 'oeru-register-enrol').'</p>',
'markup' => '<p>'.__('You can enrol in "{{user.course.course_title}}" ({{user.course.course_tag}}).', 'oeru-register-enrol').'</p>',
'default' => array(
'label' => __('Enrol', 'oeru-register-enrol'),
'class' => 'submit',
......@@ -411,17 +411,17 @@ $dialog_definitions = array(
),
),
'successfully_enrolled' => array(
'title' => __('Successfully enrolled in "{course_title}" ({course_tag})', 'oeru-register-enrol'),
'title' => __('Successfully enrolled in "{{user.course.course_title}}" ({{user.course.course_tag}})', 'oeru-register-enrol'),
'token' => 'successfully-enrolled',
'purpose' => 'confirmation',
'markup' => '<p>'.__('You have successfully enrolled as {display_name} ({username}).', 'oeru-register-enrol').'</p>',
'markup' => '<p>'.__('You have successfully enrolled as {{user.display_name}} ({{user.username}}).', 'oeru-register-enrol').'</p>',
'default' => array(
'label' => __('Ok', 'oeru-register-enrol'),
'class' => 'submit',
),
),
'failed_to_enrol' => array(
'title' => __('Enrollment in "{course_title}" ({course_tag}) failed.', 'oeru-register-enrol'),
'title' => __('Enrollment in "{{user.course.course_title}}" ({{user.course.course_tag}}) failed.', 'oeru-register-enrol'),
'token' => 'failed-to-enrol',
'purpose' => 'confirmation',
'markup' => '<p>'.__('It is not clear why your enrollment attempt failed - please ', 'oeru-register-enrol').'<a href="'.ORE_SUPPORT_CONTACT.'">'.__('contact OERu', 'oeru-register-enrol').'</a>'.__(' to report this problem.', 'oeru-register-enrol'),
......@@ -434,7 +434,7 @@ $dialog_definitions = array(
'title' => __('Leave this OERu Course', 'oeru-register-enrol'),
'token' => 'leave',
'auth' => true,
'markup' => '<p>'.__('You can unenrol from this course, "{course_title}" at any time. You can also rejoin in future if you like.', 'oeru-register-enrol').'</p>',
'markup' => '<p>'.__('You can unenrol from this course, "{{user.course.course_title}}" at any time. You can also rejoin in future if you like.', 'oeru-register-enrol').'</p>',
'default' => array(
'label' => __('Unenrol', 'oeru-register-enrol'),
'class' => 'submit',
......@@ -446,17 +446,17 @@ $dialog_definitions = array(
),
),
'successfully_unenrolled' => array(
'title' => __('Successfully unenrolled from "{course_title}" ({course_tag})', 'oeru-register-enrol'),
'title' => __('Successfully unenrolled from "{{user.course.course_title}}" ({{user.course.course_tag}})', 'oeru-register-enrol'),
'token' => 'successfully-unenrolled',
'purpose' => 'confirmation',
'markup' => '<p>'.__('You have successfully removed your user, {display_name} ({username}).', 'oeru-register-enrol').'</p>',
'markup' => '<p>'.__('You have successfully removed your user, {{user.display_name}} ({{user.username}}).', 'oeru-register-enrol').'</p>',
'default' => array(
'label' => __('Ok', 'oeru-register-enrol'),
'class' => 'submit',
),
),
'failed_to_unenrol' => array(
'title' => 'Unenrolling you from "{course_title}" ({course_tag}) failed.',
'title' => 'Unenrolling you from "{{user.course.course_title}}" ({{user.course.course_tag}}) failed.',
'token' => 'failed-to-unenrol',
'purpose' => 'confirmation',
'markup' => '<p>'.__('It is not clear why your unenrollment attempt failed - please ', 'oeru-register-enrol').
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment